GNOME Shell consistently ignores mouse clicks in a particular app window

Bug #1816634 reported by Steve McConnel
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mutter
New
Unknown
gnome-shell (Ubuntu)
Triaged
High
Unassigned

Bug Description

https://gitlab.gnome.org/GNOME/mutter/issues/475

---

This is similar in some ways to https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1181666 but affects only the mouse, not the keyboard, and is consistent almost all (99%+) of the time. This is happening for Ubuntu 18.04.2 LTS (bionic) in the default desktop environment (Ubuntu). It also happens for the GNOME and GNOME Classic desktop environments. The version of gnome-shell is 3.28.3-0ubuntu0.18.04.4.

Our program is a blend of C# winforms (Mono) with embedded web browser windows using Geckofx45 (mozilla version 45). Editing windows in the program use HTML to display formatting and typescript/javascript code to assist with popup dialogs and other editing help. Inside these editing windows, left mouse clicks are essentially ignored. Keyboarding still works fine as far as I can tell. Clicking on the gear button inside the editing window fails to bring up the Styles dialog more than 95% of the time. When the dialog does display, it is always (100%) nonfunctional as the first click in it causes it to close immediately.

Tracing the internal behavior of the code, it appears that clicking the first time inside the editing (browser) window causes a series of WM_FOCUS messages to be sent and the javascript to hook up a left mouse click handler to a gear button displayed in the lower left corner of the editing window. This is the expected behavior, and the same as on other window managers. But then, on GNOME Shell only, a series of WM_KILLFOCUS messages are sent immediately. This does not happen for other window managers. (The main window receives a WM_ACTIVATE message with the argument to make it deactivate.) Any other left mouse clicks inside that window are ignored >95% of the time, probably only when double clicking quickly enough to occur before those messages to lose focus/deactivate are handled. (Right mouse clicks are handled at a higher level and appear to function normally.)

The program in question is called Bloom. The source code is available at https://github.com/BloomBooks/BloomDesktop and prebuilt debian/ubuntu packages are available at http://packages.sil.org/ubuntu/ as bloom-desktop or bloom-desktop-beta. After spending a few days looking at this problem, I've reluctantly come to the conclusion that it must be a GNOME Shell bug that I can't work around in our code. It's working fine in Microsoft Windows and all the other Linux window managers that I've tested (Unity, Cinnamon, KDE Plasma, MATE, XFCE, and LXDE).

Tags: bionic
Revision history for this message
Steve McConnel (stephen-mcconnel) wrote :
tags: added: bionic
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Steve,

This sounds like a problem that should be reported to the Gnome developers. However before doing that, are you able to test if the problem exists in Ubuntu 18.10 or 19.04?

http://releases.ubuntu.com/18.10/
http://cdimages.ubuntu.com/daily-live/current/

Revision history for this message
Steve McConnel (stephen-mcconnel) wrote : Re: [Bug 1816634] Re: GNOME Shell consistently ignores mouse clicks in a particular app window
Download full text (4.1 KiB)

Daniel,
I tried Bloom on Ubuntu 18.10 and things have partially improved. Left
mouse clicks inside the text boxes now move the current selection point in
the text as expected. Left clicking on the gear button usually brings up
the Styles dialog (a javascript dialog), but the next left click always
closes the dialog without allowing the user to actually do anything. I
wasn't able to install Bloom on the build for 19.04 because one of its
dependencies had a dependency that couldn't be met. (chmsee /
libwebkitgtk-1.0-0)
(We'll probably phase out using .chm help files in the next year or two,
but haven't come up with a suitable replacement that all of our projects
like yet.)
--
Steve McConnel

On Tue, Feb 19, 2019 at 7:40 PM Daniel van Vugt <
<email address hidden>> wrote:

> Steve,
>
> This sounds like a problem that should be reported to the Gnome
> developers. However before doing that, are you able to test if the
> problem exists in Ubuntu 18.10 or 19.04?
>
> http://releases.ubuntu.com/18.10/
> http://cdimages.ubuntu.com/daily-live/current/
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1816634
>
> Title:
> GNOME Shell consistently ignores mouse clicks in a particular app
> window
>
> Status in gnome-shell package in Ubuntu:
> New
>
> Bug description:
> This is similar in some ways to
> https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1181666 but
> affects only the mouse, not the keyboard, and is consistent almost all
> (99%+) of the time. This is happening for Ubuntu 18.04.2 LTS (bionic)
> in the default desktop environment (Ubuntu). It also happens for the
> GNOME and GNOME Classic desktop environments. The version of gnome-
> shell is 3.28.3-0ubuntu0.18.04.4.
>
> Our program is a blend of C# winforms (Mono) with embedded web browser
> windows using Geckofx45 (mozilla version 45). Editing windows in the
> program use HTML to display formatting and typescript/javascript code
> to assist with popup dialogs and other editing help. Inside these
> editing windows, left mouse clicks are essentially ignored.
> Keyboarding still works fine as far as I can tell. Clicking on the
> gear button inside the editing window fails to bring up the Styles
> dialog more than 95% of the time. When the dialog does display, it is
> always (100%) nonfunctional as the first click in it causes it to
> close immediately.
>
> Tracing the internal behavior of the code, it appears that clicking
> the first time inside the editing (browser) window causes a series of
> WM_FOCUS messages to be sent and the javascript to hook up a left
> mouse click handler to a gear button displayed in the lower left
> corner of the editing window. This is the expected behavior, and the
> same as on other window managers. But then, on GNOME Shell only, a
> series of WM_KILLFOCUS messages are sent immediately. This does not
> happen for other window managers. (The main window receives a
> WM_ACTIVATE message with the argument to make it deactivate.) Any
> other left mouse clicks inside that window are ignored >95% of the...

Read more...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the quick response.

It sounds like the bug(s) would still exist in the latest mutter/gnome-shell code so please report the problem to the Gnome developers here:

  https://gitlab.gnome.org/GNOME/mutter/issues

and then tell us the new issue ID.

Revision history for this message
Steve McConnel (stephen-mcconnel) wrote :
Download full text (3.5 KiB)

Daniel,
This bug has been reported as
https://gitlab.gnome.org/GNOME/mutter/issues/475.
--
Steve McConnel

On Wed, Feb 20, 2019 at 6:55 PM Daniel van Vugt <
<email address hidden>> wrote:

> Thanks for the quick response.
>
> It sounds like the bug(s) would still exist in the latest mutter/gnome-
> shell code so please report the problem to the Gnome developers here:
>
> https://gitlab.gnome.org/GNOME/mutter/issues
>
> and then tell us the new issue ID.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1816634
>
> Title:
> GNOME Shell consistently ignores mouse clicks in a particular app
> window
>
> Status in gnome-shell package in Ubuntu:
> New
>
> Bug description:
> This is similar in some ways to
> https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1181666 but
> affects only the mouse, not the keyboard, and is consistent almost all
> (99%+) of the time. This is happening for Ubuntu 18.04.2 LTS (bionic)
> in the default desktop environment (Ubuntu). It also happens for the
> GNOME and GNOME Classic desktop environments. The version of gnome-
> shell is 3.28.3-0ubuntu0.18.04.4.
>
> Our program is a blend of C# winforms (Mono) with embedded web browser
> windows using Geckofx45 (mozilla version 45). Editing windows in the
> program use HTML to display formatting and typescript/javascript code
> to assist with popup dialogs and other editing help. Inside these
> editing windows, left mouse clicks are essentially ignored.
> Keyboarding still works fine as far as I can tell. Clicking on the
> gear button inside the editing window fails to bring up the Styles
> dialog more than 95% of the time. When the dialog does display, it is
> always (100%) nonfunctional as the first click in it causes it to
> close immediately.
>
> Tracing the internal behavior of the code, it appears that clicking
> the first time inside the editing (browser) window causes a series of
> WM_FOCUS messages to be sent and the javascript to hook up a left
> mouse click handler to a gear button displayed in the lower left
> corner of the editing window. This is the expected behavior, and the
> same as on other window managers. But then, on GNOME Shell only, a
> series of WM_KILLFOCUS messages are sent immediately. This does not
> happen for other window managers. (The main window receives a
> WM_ACTIVATE message with the argument to make it deactivate.) Any
> other left mouse clicks inside that window are ignored >95% of the
> time, probably only when double clicking quickly enough to occur
> before those messages to lose focus/deactivate are handled. (Right
> mouse clicks are handled at a higher level and appear to function
> normally.)
>
> The program in question is called Bloom. The source code is available
> at https://github.com/BloomBooks/BloomDesktop and prebuilt
> debian/ubuntu packages are available at
> http://packages.sil.org/ubuntu/ as bloom-desktop or bloom-desktop-
> beta. After spending a few days looking at this problem, I've
> reluctantly come to the conclusion that it must...

Read more...

description: updated
Changed in gnome-shell (Ubuntu):
importance: Undecided → High
status: New → Triaged
Changed in mutter:
status: Unknown → New
Revision history for this message
Langer Alexey (langer-alexey) wrote (last edit ):

The bug is reproduced on Eclipse IDE (screenshot https://disk.yandex.ru/i/z7kqQV47z8xeFQ). Left click always closes the popup window instead of set focus on it. Pressing the "F2" buttons leads to the same result. Environment:

X11 session
Ubuntu 20.04.3 LTS
GNOME Shell 3.36.9
Eclipse 2021-12 (4.22.0)

The bug is NOT reproduced in Wayland session if set GDK_BACKEND=x11

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.