X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=0d6af4eea8be5f9a6d7ffc65372df513c00bae4c;hb=e2ddfaf9fff1fb9dd6ebdc1a95f2b228d6baedb2;hp=df02cb7630bf7c9bff8dbc38f385437ba7f4db37;hpb=2b8b5da04b14af1639143cc332874c7e1a03a8bb;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index df02cb76..0d6af4ee 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -52,7 +52,7 @@ void focus_shutdown(gboolean reconfig) if (reconfig) return; /* reset focus to root */ - XSetInputFocus(ob_display, PointerRoot, RevertToNone, CurrentTime); + XSetInputFocus(obt_display, PointerRoot, RevertToNone, CurrentTime); } static void push_to_top(ObClient *client) @@ -91,7 +91,7 @@ void focus_set_client(ObClient *client) /* set the NET_ACTIVE_WINDOW hint, but preserve it on shutdown */ if (ob_state() != OB_STATE_EXITING) { active = client ? client->window : None; - PROP_SET32(RootWindow(ob_display, ob_screen), + PROP_SET32(RootWindow(obt_display, ob_screen), net_active_window, window, active); } } @@ -199,7 +199,7 @@ void focus_nothing(void) event_cancel_all_key_grabs(); /* when nothing will be focused, send focus to the backup target */ - XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot, + XSetInputFocus(obt_display, screen_support_win, RevertToPointerRoot, event_curtime); } @@ -337,13 +337,9 @@ gboolean focus_valid_target(ObClient *ft, that can be focused instead */ !focus_target_has_siblings(ft, iconic_windows, all_desktops)))); - /* it's not set to skip the taskbar (unless it is a type that would be - expected to set this hint, or modal) */ - ok = ok && ((ft->type == OB_CLIENT_TYPE_DOCK || - ft->type == OB_CLIENT_TYPE_DESKTOP || - ft->type == OB_CLIENT_TYPE_TOOLBAR || - ft->type == OB_CLIENT_TYPE_MENU || - ft->type == OB_CLIENT_TYPE_UTILITY) || + /* it's not set to skip the taskbar (but this only applies to normal typed + windows, and is overridden if the window is modal) */ + ok = ok && (ft->type != OB_CLIENT_TYPE_NORMAL || ft->modal || !ft->skip_taskbar);