After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791689 - On-Canvas GUI broken with extended input device
On-Canvas GUI broken with extended input device
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other Linux
: Normal blocker
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2017-12-16 21:47 UTC by Jehan
Modified: 2018-01-04 19:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jehan 2017-12-16 21:47:17 UTC
I realized that the on-canvas GUIs are broken when extended devices such as tablets.
Actually it can also be reproduced is you set your mouse as "Screen" in the "Input Devices" preferences (though I get some different behavior sometimes, but broken too).

Reproduction:

- With a tablet, click on canvas to open the color picker info window (leave it as on-canvas display, do not detach it).
- Click one of the unit dropdown menu and release with the tablet pointer.
- Click again the unit menu with the tablet pointer.

Results: the second click doesn't work (menu doesn't open).
Expected: the second click should open the dropdown menu.

Other reproduction:

- With a tablet, click on canvas with Text tool.
- Click the unit dropdown menu once and release.
- Click again the unit dropdown menu.

Results: the second click doesn't work (menu doesn't open) and worse it clicks on canvas as though you clicked *through* the menu.
Expected: the second click should open the dropdown menu.
Comment 1 Jehan 2017-12-17 14:17:06 UTC
Massimo is considering disabling on-canvas dialogs in 2.10 if we can't fix this issue and others (even some crashes in bug 791447).
See his comment: bug 791447, comment 9.

So let's set this as a 2.10 blocker which can either be worked around by disabling guilty on-canvas GUIs, or fixed.
Comment 2 Ell 2018-01-04 11:14:51 UTC
Hopefully fixed in master.

First symptom:

commit fa180443927763fbdcc928fdfabc4489a40636d4
Author: Ell <ell_se@yahoo.com>
Date:   Thu Jan 4 06:02:53 2018 -0500

    Bug 791689 - On-Canvas GUI broken with extended input device
    
    Something about the unqueueing and requeueing of the entire event
    queue during motion compression fries GTK's brain w.r.t. extended
    input events.  Instead, have gimp_display_shell_compress_motion()
    return the first non-compressed event to the caller, making it
    responsible for dispatching it after handling the motion event.

 app/display/gimpdisplayshell-tool-events.c | 484 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------
 1 file changed, 253 insertions(+), 231 deletions(-)

Second symptom:

commit d3b45f1875d9665573f8a027aee7c208ee97ef64
Author: Ell <ell_se@yahoo.com>
Date:   Thu Jan 4 06:07:44 2018 -0500

    Bug 791689 - On-Canvas GUI broken with extended input device
    
    Improve the disabling/enabling of extended input events for the
    canvas during enter/leave-notify events, in particular, so that
    enter-notify events that are a result of pointer ungrabbing don't
    erroneously reeanble extended input events.

 app/display/gimpdisplayshell-tool-events.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Test, test, test!
Comment 3 Michael Schumacher 2018-01-04 15:49:38 UTC
Any chance that fixing the second symptom may also have improved the weird flipping between core pointer and extended input devices which plagues many uses?
Comment 4 Jehan 2018-01-04 16:21:47 UTC
> Hopefully fixed in master.
> […]
> Test, test, test!

Yep that's fixed! Closing as FIXED.

There is still a thing which annoys me a bit, which is that when clicking with a pen on a dropdown, we can't release the pressure until we select (whereas with a mouse, you click once, then you scroll, then you click a second time to select). This can be annoying in particular on long dropdown menus. But I don't think this is related and this issue seems to happen on any GTK+ application. I was just saying.

(In reply to Michael Schumacher from comment #3)
> Any chance that fixing the second symptom may also have improved the weird
> flipping between core pointer and extended input devices which plagues many
> uses?

I don't know about this weird flipping issue so I can't say anything about it.
Comment 5 Jehan 2018-01-04 16:23:16 UTC
Ell: I'm sure you can find the right fix for bug 791447 as well. :-)
If you have some time left, don't hesitate! ;p
Thanks!
Comment 6 Ell 2018-01-04 19:09:29 UTC
(In reply to Michael Schumacher from comment #3)
> Any chance that fixing the second symptom may also have improved the weird
> flipping between core pointer and extended input devices which plagues many
> uses?

... Maybe?  Dunno :)