only grab keybinds on the root window, not every client window

This commit is contained in:
Mikael Magnusson 2007-04-24 21:45:43 +00:00
parent 23a43c5a40
commit fb2493115f
4 changed files with 2 additions and 12 deletions

View file

@ -374,7 +374,6 @@ void client_manage(Window window)
self->window, newx, newy, self->area.width, self->area.height);
client_apply_startup_state(self, newx, newy);
keyboard_grab_for_client(self, TRUE);
mouse_grab_for_client(self, TRUE);
if (activate) {
@ -490,7 +489,6 @@ void client_unmanage(ObClient *self)
event_ignore_queued_enters();
}
keyboard_grab_for_client(self, FALSE);
mouse_grab_for_client(self, FALSE);
/* remove the window from our save set */

View file

@ -589,7 +589,7 @@ static void event_process(const XEvent *ec, gpointer data)
mouse_event(client, e);
} else if (e->type == KeyPress) {
keyboard_event((focus_cycle_target ? focus_cycle_target :
client), e);
(client ? client : focus_client)), e);
}
}
}

View file

@ -68,18 +68,12 @@ static void grab_for_window(Window win, gboolean grab)
}
}
void keyboard_grab_for_client(ObClient *c, gboolean grab)
{
grab_for_window(c->window, grab);
}
static void grab_keys(gboolean grab)
{
GList *it;
grab_for_window(screen_support_win, grab);
for (it = client_list; it; it = g_list_next(it))
grab_for_window(((ObClient*)it->data)->window, grab);
grab_for_window(RootWindow(ob_display, ob_screen), grab);
}
static gboolean chain_timeout(gpointer data)

View file

@ -46,6 +46,4 @@ gboolean keyboard_process_interactive_grab(const XEvent *e,
struct _ObClient **client);
gboolean keyboard_interactively_grabbed();
void keyboard_grab_for_client(struct _ObClient *c, gboolean grab);
#endif