Summary: | XI2 FocusOut events missing parent of focus'd window | ||
---|---|---|---|
Product: | xorg | Reporter: | Benjamin Otte <otte> |
Component: | Server/Input/Core | Assignee: | Peter Hutterer <peter.hutterer> |
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | CC: | mclasen, peter.hutterer |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | 2011BRB_Reviewed | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 40982 | ||
Attachments: |
Description
Benjamin Otte
2011-12-22 14:17:20 UTC
Created attachment 54721 [details]
Demonstration of problem
You can see the missing event here. Run the compiled demo app and Alt-Tab out. It will show the proper events for the non-xi2 case but not emit the events for the "mid" window in xi2.
Created attachment 54722 [details] [review] dix: Send FocusOut events to all intermediates The code passed the parent to this function and then started with the parent inside the function. So the first parent never received an event. Fwiw, I'm not sure if the patch is correct in all cases or if just some callers need to be fixed to pass foo instead of foo->parent. The current patch seems to work for me so far at least. Oh yeah, final note: This bug is triggered in gtk master currently, where GTK doesn't emit FocusOut events properly. Patch does the right thing, but it's better to fix the one caller that is incorrect. http://patchwork.freedesktop.org/patch/8570/ There are at least 3 cases in DeviceFocusEvents() where 'from->parent' is used. Shouldn't all of those cases use 'from' instead? i need more coffee. you'd think staring at it for a while would show that but alas... you're right. I'll fix this up and run it through the test suite. Created attachment 55148 [details] [review] 0001-dix-send-focus-events-to-the-immediate-parent-44079.patch One of the two patches needed to restore correct behaviour Created attachment 55149 [details] [review] 0001-dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch commit a125aabda3a5cf27aa98cb61f16e49280b66f451 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 5 07:02:51 2012 -0500 dix: send focus events to the immediate parent (#44079) commit 3ce102c362cadcd7087bdcf48440d9498eaf77d0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 5 07:08:01 2012 -0500 dix: on PointerRootWin send a FocusIn to the sprite window too |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.