X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=9c4620b293e7cbea6478e2c53c4a5a26e2cd7577;hb=242dc35a36b0056029adb4b702ed0b7ffe12feae;hp=7f0c70c96ddc2e915f75dd932c46bca814a45f13;hpb=07c3a31cf5794447d3a5a52086cdeb808d817f3a;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 7f0c70c9..9c4620b2 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -457,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) @@ -860,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) {