Extended input device breakage



[CCing Dennis Auroux, the author of xournal -- sorry for sending this
twice, this message should actually hit the list]

Hi,

In recent gtk development versions, applications using XInput started
misbehaving badly.  I'm going to focus on xournal, because this is the
application I use most, but similar behavior can be seen in gimp and
other XInput-aware applications as well.  I've filed bug #588649 [1] a
while ago with no response so far.  What happens is that menus close as
soon as the mouse button is released, scrollbars are going crazy as soon
as the cursor moves outside the scrollbar area, scrolling using the
middle mouse button doesn't work etc.

The reason for this behavior seems to be a combination of two recent (?)
changes:

1. Widget implementations being changed to listen for XInput events even
though they don't know how to interpret them correctly.  I can't really
see the rationale behind this change (see for example, commit
7871e095605332ce1cfb15e19a06f36b05604d0b), since they don't really need
the additional information provided by XInput.

2. Client-side windows.  If an application requests XInput events for a
subwindow, what actually happens is that the corresponding events are
selected for the X window containing this subwindow, and subsequently
all its client-side windows will receive XInput event, even though they
didn't request them.  The documentation [2] is very clear about this:
such events should only be sent to windows that selected for them.  So
XInput events should be filtered out for client-side windows that didn't
select them.

Since I'm not sure how difficult it is to fix item 2 and if this is
feasible in the timeframe before the 2.28 release, I've been looking for
workarounds.  Dennis has provided patches for xournal that work around
the problem by filtering out the offending events [3,4], but they seem
awfully complicated and don't always work reliably (for example, they
prevent the file open/save dialog from working for me).
The next thing I tried was forcing xournal's canvas window to be native
by calling gdk_window_ensure_native (GTK_WIDGET(canvas)->window); on
line 210 in main.c after gtk_widget_show (winMain).  This approach seems
promising (menus are working as expected) but it causes xournal to crash
when moving the cursor outside the scrollbar window while scrolling.

I'd appreciate it if someone could look into those issues, as they are
critical for tablet users in the upcoming round of distributions.

Thanks,
Tom


[1] http://bugzilla.gnome.org/show_bug.cgi?id=588649
[2] http://library.gnome.org/devel/gdk/unstable/gdk-Input-Devices.html
[3]
http://sourceforge.net/tracker/?func=detail&aid=2829716&group_id=163434&atid=827735
[4]
http://sourceforge.net/tracker/?func=detail&aid=2816361&group_id=163434&atid=827735



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]