Re: Pinboard mods
Neil Graham <[email protected]> Mon, 27 Jul 2009 08:21:08 +0000 (UTC)
| Newsgroups | gmane.comp.desktop.rox.devel |
|---|---|
| Message-ID | <[email protected]> |
> Most of flicker should be fixable with a clean-slate function in place
> of Destroying and creating a new window. I can make a clean slate
> function that gets called instead of create_pinboard_window() which can
> decide whether to reuse the existing window.
Here's a diff of unknown merit. It helps with the flicker a great deal.
It keeps the window and the backdrop. Am I right in assuming that any
old backdrop gets cleared away anyway when a new one gets set?
For the other aspect of a pinboard per desktop, I was thinking a more
general solution would just be an 'execute on switch' field in pager.
Then people can hang whatever thing they want off the switch, (updating a
LED 7-segment display appeals :-) I'll be looking at that next anyway.
pinboard.c
207a208
> static void pinboard_wipe(void);
293,294d293
< if (old_board)
< pinboard_clear();
297a297,299
> if (old_board)
> pinboard_clear();
>
306d307
< number_of_windows++;
325,334c326,343
< current_pinboard = g_new(Pinboard, 1);
< current_pinboard->name = g_strdup(name);
< current_pinboard->icons = NULL;
< current_pinboard->window = NULL;
< current_pinboard->backdrop = NULL;
< current_pinboard->backdrop_style = BACKDROP_NONE;
< current_pinboard->to_backdrop_app = -1;
< current_pinboard->from_backdrop_app = -1;
< current_pinboard->input_tag = -1;
< current_pinboard->input_buffer = NULL;
---
> if (old_board) {
> pinboard_wipe();
>
> g_free(current_pinboard->name);
> current_pinboard->name = g_strdup(name);
>
> } else {
> number_of_windows++;
> current_pinboard = g_new(Pinboard, 1);
> current_pinboard->name = g_strdup(name);
> current_pinboard->icons = NULL;
> current_pinboard->window = NULL;
> current_pinboard->backdrop = NULL;
> current_pinboard->backdrop_style = BACKDROP_NONE;
> current_pinboard->to_backdrop_app = -1;
> current_pinboard->from_backdrop_app = -1;
> current_pinboard->input_tag = -1;
> current_pinboard->input_buffer = NULL;
336c345,346
< create_pinboard_window(current_pinboard);
---
> create_pinboard_window(current_pinboard);
> }
1386a1397
>
2059,2061c2070,2071
< /* Turns off the pinboard. Does not call gtk_main_quit. */
< static void pinboard_clear(void)
< {
---
> /* removes all content from the pinboard. Does not remove the window */
> static void pinboard_wipe(void) {
2064,2067d2073
< g_return_if_fail(current_pinboard != NULL);
<
< tasklist_set_active(FALSE);
<
2074a2081
> gtk_widget_hide(pi->win); /* Stops flicker - stupid
GtkFixed! */
2076a2084,2092
> current_pinboard->icons=NULL;
> }
>
> /* Turns off the pinboard. Does not call gtk_main_quit. */
> static void pinboard_clear(void)
> {
> g_return_if_fail(current_pinboard != NULL);
>
> tasklist_set_active(FALSE);
2077a2094,2095
> pinboard_wipe();
>
------------------------------------------------------------------------------
_______________________________________________
rox-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rox-devel