X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=9c4620b293e7cbea6478e2c53c4a5a26e2cd7577;hb=6f5292c87ece138a2b80d102ba0919b105b1839a;hp=2556b94c9486b7237adeff6b46d97ecca86ea1cb;hpb=40d58a1e34433c87a81d558cbc2623c6e1ff7053;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 2556b94c..9c4620b2 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -201,7 +201,7 @@ gboolean screen_annex() window, screen_support_win); /* set the _NET_SUPPORTED_ATOMS hint */ - num_support = 50; + num_support = 51; i = 0; supported = g_new(guint32, num_support); supported[i++] = prop_atoms.net_current_desktop; @@ -254,6 +254,7 @@ gboolean screen_annex() supported[i++] = prop_atoms.net_wm_state_below; supported[i++] = prop_atoms.net_moveresize_window; supported[i++] = prop_atoms.net_wm_moveresize; + supported[i++] = prop_atoms.ob_wm_state_undecorated; g_assert(i == num_support); /* supported[] = prop_atoms.net_wm_action_stick; @@ -456,7 +457,13 @@ void screen_set_desktop(guint num) event_ignore_queued_enters(); - focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); + /*! + When this focus_client check is not used, you can end up with races, as + demonstrated with gnome-panel, sometmies the window you click on on + another desktop ends up losing focus cuz of the fallback. + */ + if (!focus_client) + focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); } static void get_row_col(guint d, guint *r, guint *c) @@ -567,7 +574,7 @@ static guint translate_row_col(guint r, guint c) return 0; } -static void popup_cycle(guint d, gboolean show) +void screen_desktop_popup(guint d, gboolean show) { Rect *a; @@ -686,14 +693,14 @@ guint screen_cycle_desktop(ObDirection dir, gboolean wrap, gboolean linear, } if (dialog) { - popup_cycle(d, TRUE); + screen_desktop_popup(d, TRUE); return d; } done_cycle: first = TRUE; - popup_cycle(0, FALSE); + screen_desktop_popup(0, FALSE); return d; } @@ -859,10 +866,10 @@ void screen_install_colormap(ObClient *client, gboolean install) XWindowAttributes wa; if (client == NULL) { - if (install) - XInstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); - else - XUninstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); + if (install) + XInstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); + else + XUninstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); } else { if (XGetWindowAttributes(ob_display, client->window, &wa) && wa.colormap != None) {