Summary: | Focus switches to opposite X Screen when closing window with two heads | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Alex Leach <beamesleach> |
Component: | multi-screen | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | baron, beamesleach, thomas.luebking, xaver.hugl |
Priority: | NOR | ||
Version: | 4.11.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=333595 https://bugs.kde.org/show_bug.cgi?id=157219 |
||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Debugging work on multihead task switching
patch attempt base patch |
Description
Alex Leach
2013-09-11 11:10:00 UTC
Created attachment 82271 [details]
Debugging work on multihead task switching
events.cpp ~ line 290 if (focus == None || focus == PointerRoot) { //kWarning( 1212 ) << "X focus set to None/PointerRoot, reseting focus" ; Client *c = mostRecentlyActivatedClient(); if (c != NULL) requestFocus(c, true); else if (activateNextClient(NULL)) ; // ok, activated else focusToNull(); } I assume you're ending up here when/before this happens and preventing this block (* that is NOT USABLE FIX!) would also prevent the unwanted focus switch? * - if (focus == None || focus == PointerRoot) { + if (false /*focus == None || focus == PointerRoot*/) { *** Bug 344671 has been marked as a duplicate of this bug. *** Created attachment 95545 [details]
patch attempt
Patch, should apply to 5.4
I briefly tried it, but guess Martin would like to have it confirmed by somebody who actually uses zaphod multihead on a regular base
Created attachment 95546 [details] base patch patch for bug #348935 that's likely required to apply the actual patch cleanly; sorry. I went back to clean sources and applied the patches. It is, however, throwing errors like this from the "isOnCurrentHead" function: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 14659, resource id: 1, major code: 14 (GetGeometry), minor code: 0 which I suppose is sort of lucky because previous versions of the source just crashed there. As I explained here: https://bugs.kde.org/show_bug.cgi?id=344671#c9 the "Xcb::CurrentInput currentInput" call can have three types of return; XCB_WINDOW_NONE(0), XCB_INPUT_FOCUS_POINTER_ROOT(1) or the actual Window ID. Your code only handles XCB_WINDOW_NONE and the actual Window ID. If you attempt to execute the "Xcb::WindowGeometry geometry(currentInput.window())" line when "currentInput.window()" is "1" (i.e. XCB_INPUT_FOCUS_POINTER_ROOT), the result is undefined at best and a crash at worst. Ironically, if you had changed the window revert setting to "XCB_INPUT_FOCUS_NONE" as you threatened here: https://bugs.kde.org/show_bug.cgi?id=344671#c18 then the code would probably have run without errors although had you ever changed it back to "XCB_INPUT_FOCUS_POINTER_ROOT", then your new patch would have broken too. I look forward to testing your corrected patch. Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. |