Mutter Window Focus Selection Bug with Touchscreen Input

Hakan Bayındır hakan.bayindir at pardus.org.tr
Fri Dec 27 21:02:24 UTC 2013


Hello all,

Happy holidays. I'm Hakan Bayindir, technical leader of Pardus Project, 
a GNU/Linux distribution based on Debian which is developed and 
supported by by The Scientific and Technological Research Council of 
Turkey (TUBITAK). We are using Gnome and Mutter on a computer with a big 
touchscreen and having a strange issue with the window fosucing behavior 
of Mutter (3.8.4-2 Debian) with touch input.

For the last two weeks, I have personally debugged the problem, and 
made some progress in determining the root cause of the bug. I'm not 
familiar with window manager and X11 jargon, so if I made mistakes in 
description, please forgive me :)

The problem arises when you have more than one window on the screen and 
try to select a window by its frame. While using mouse, everything is 
perfect, but when you use touch input on the frame, the focus takeover 
signal is sent to the client/frame pair which is last focused using the 
mouse. Strangely, switching focus via clients work as expected (but you 
cannot move or resize any windows that way without a keyboard).

As far as I understood, client focus events are broadcasted to frame of 
said client, so ui/frames.c understands the event right, however when 
event is originated from the frame using touch 
"meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window))" 
call (on line 1187) returns the wrong frame as the focus requester. This 
causes wrong window to get the focus with a funny side effect: You click 
to the titlebar of the window you want to move, focus goes away to other 
window and you move or resize the wrong window with the help of the 
widgets of the intended window. This behavior is also visible in the 
debug output:

VERBOSE: Updating prelit control from 0 to 1
EVENTS: XI_Motion on 0x600000083: win: 0x1000082 x: 540,234 y: 111,237 
serial 26829
EVENTS: Frame was receiver of event for 0x1600003 (Müzik)
VERBOSE: Updating prelit control from 0 to 1
EVENTS: (Unknown event) on 0x1200000083: type: 35 serial 26829
FOCUS: Focusing window with frame 0x10001c8 due to button 1 press

However, logs (which I attached) show that the frame for client 
0x1600003 is not 0x10001c8 but 0x1000082.

Last but not least, we were unable to duplicate the issue on Compiz, 
Metacity and KWin.

Sorry again for bothering you during holidays and many thanks in 
advance for any help. Even a nudge in correct direction will help 
greatly. I can write the patch and send it in.

Best Regards,

Hakan Bayindir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mutter-1974-debug-log-LORG8W.tar.bz
Type: application/x-gzip
Size: 152151 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20131227/10395c88/attachment-0001.bin>


More information about the pkg-gnome-maintainers mailing list