Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ignore enters on windows that are raised over focused window while be…

…ing mapped.
  • Loading branch information...
commit d5a034ace49e6547ce15c10583afb16b553b04a6 1 parent 93c8eff
@danakj authored
Showing with 12 additions and 11 deletions.
  1. +8 −10 openbox/client.c
  2. +4 −1 openbox/event.c
View
18 openbox/client.c
@@ -218,6 +218,7 @@ void client_manage(Window window, ObPrompt *prompt)
Time launch_time;
guint32 user_time;
gboolean obplaced;
+ gulong ignore_start;
ob_debug("Managing window: 0x%lx", window);
@@ -483,19 +484,13 @@ void client_manage(Window window, ObPrompt *prompt)
/* grab mouse bindings before showing the window */
mouse_grab_for_client(self, TRUE);
+ if (!config_focus_under_mouse)
+ ignore_start = event_start_ignore_all_enters();
+
/* this has to happen before we try focus the window, but we want it to
happen after the client's stacking has been determined or it looks bad
*/
- {
- gulong ignore_start;
- if (!config_focus_under_mouse)
- ignore_start = event_start_ignore_all_enters();
-
- client_show(self);
-
- if (!config_focus_under_mouse)
- event_end_ignore_all_enters(ignore_start);
- }
+ client_show(self);
/* activate/hilight/raise the window */
if (try_activate) {
@@ -523,6 +518,9 @@ void client_manage(Window window, ObPrompt *prompt)
stacking_raise(CLIENT_AS_WINDOW(self));
}
+ if (!config_focus_under_mouse)
+ event_end_ignore_all_enters(ignore_start);
+
/* add to client list/map */
client_list = g_list_append(client_list, self);
window_add(&self->window, CLIENT_AS_WINDOW(self));
View
5 openbox/event.c
@@ -814,11 +814,14 @@ void event_enter_client(ObClient *client)
g_assert(config_focus_follow);
if (is_enter_focus_event_ignored(event_curserial)) {
- ob_debug_type(OB_DEBUG_FOCUS, "Ignoring enter event with serial %lu\n"
+ ob_debug_type(OB_DEBUG_FOCUS, "Ignoring enter event with serial %lu "
"on client 0x%x", event_curserial, client->window);
return;
}
+ ob_debug_type(OB_DEBUG_FOCUS, "using enter event with serial %lu "
+ "on client 0x%x", event_curserial, client->window);
+
if (client_enter_focusable(client) && client_can_focus(client)) {
if (config_focus_delay) {
ObFocusDelayData *data;
Please sign in to comment.
Something went wrong with that request. Please try again.