From: Mikael Magnusson Date: Mon, 23 Jul 2007 23:38:03 +0000 (+0200) Subject: Stop focus from moving if scroll lock is enabled. Useful when some program decides... X-Git-Tag: mikabox-3.5-7~37^2~15 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=a24bb9ecb04bb05be22c30c2f218cc0bb95ebc48;p=mikachu%2Fopenbox.git 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. --- diff --git a/openbox/client.c b/openbox/client.c index 4bbac35e..421ad5b0 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -3878,6 +3878,13 @@ gboolean client_focus(ObClient *self) { if (!client_validate(self)) return FALSE; + { + 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);