From f03399d3ed1856768ebae08bddc0de22ceff8865 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 24 Jul 2007 01:38:03 +0200 Subject: [PATCH] Stop focus from moving if scroll lock is enabled. Useful when some program decides to pop up a window every 2 seconds while you're chatting away on irc. --- openbox/client.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openbox/client.c b/openbox/client.c index 9d0f12fe..723a4a61 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -3719,6 +3719,13 @@ gboolean client_can_focus(ObClient *self) gboolean client_focus(ObClient *self) { + { + XkbStateRec state; + XkbGetState(obt_display, XkbUseCoreKbd, &state); + if (state.locked_mods & 128) + return FALSE; + } + /* we might not focus this window, so if we have modal children which would be focused instead, bring them to this desktop */ client_bring_modal_windows(self); -- 2.34.1