Browse all patches |
Author[]
Harald van Dijk
Synopsis[]
Don't grab focus on KDE menus.
Patch[]
--- sawfish/src/events.c.focus 2006-05-31 23:29:03.000000000 -0600 +++ sawfish/src/events.c 2006-12-27 10:58:45.000000000 -0700 @@ -953,13 +953,16 @@ static void focus_out (XEvent *ev) { Lisp_Window *w = find_window_by_id (ev->xfocus.window); - if (ev->xfocus.detail == NotifyPointer) + if (ev->xfocus.detail == NotifyPointer || + ev->xfocus.mode == NotifyGrab || ev->xfocus.mode == NotifyUngrab) return; if (w != 0 && ev->xfocus.detail != NotifyInferior) { if (focus_window == w) { - focus_window = 0; + if (ev->xfocus.mode == NotifyNormal || \ + ev->xfocus.mode == NotifyWhileGrabbed) + focus_window = 0; report_focus_change (w); }
Community's reasons for inclusion or rejection[]
- vote: yes. I wrote a similar patch some months ago. It works perfectly and solve all problems with qt applications - Anton Kazennikov
- vote: yes. This has needed fixing for a long time. However, possible values of xfocus.mode consist of NotifyNormal, NotifyWhileGrabbed, NotifyGrab and NotifyUngrab; hence the second if statement is moot and should be removed. With that change, I have used this patch since September without problems. I do not use shade-hover though. - Tkorvola 13:10, 2 December 2007 (UTC)
- vote: pondering. I tested it, and it is an improvement. Without, the QT app I tested was "unfocused" while I opened menus. With it applied, QT and Mozilla behaved the same way in general, focus is kept while menus are opened. OTOH, there is still an issue, no idea if in focus.c or shade-hover.jl (or both): the first menu keeps the window unshaded, all ok (even going to submenus of this first menu and back to it), but going to another menu of same level (start with File and try to open Edit by just moving the mouse) makes the window keep focus but shade (roll up). QT lets you open the others while the real window is not visible (like if it tracked motion or global position) and Mozilla not at all, only way is to unshade (sometimes moving to the title bar does the auto unshade, sometimes not and you have to click or something until you recover the unshaded status) and start from zero. GSR 21:28, 30 October 2007 (UTC)
- vote: yes. Only tested with a couple of QT applications, but seems to fix the QT unfocus issue. - Aav 09:54, 16 January 2008 (UTC)
- vote: yes. I think - let's apply it, then wait for eventual patch that will fix shade-hover behavior. If it will be too annoying I belive that someone will make such patch... or will convince us to revert this one. Janek Kozicki 12:43, 19 January 2008 (UTC)