-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touch Support / Opens Chrome app window twice #128
Comments
Hi, Can you confirm this happens because of the extension? Does it work as |
Hi, Michele notifications@github.com napsal Út, pro 23, 2014 v 5∶45 :
|
Hi, Michele notifications@github.com napsal Út, pro 23, 2014 v 5∶45 :
|
Hi, thanks for this information. I have been wondering for a while about touch gestures. Unfortunately, I don't have any device to test the code. Regarding the problem with the dash, I overwrite and extend the code handling mouse events on the appIcon and the Application button. I think the touch event is triggering twice the click . I'll investigate to understand how touch events are handled by the shell. Could you check if disabling in the settings the customization of the click actions makes the problem with the double instance launching disappear? Regarding the swipe to trigger the dash show, I have been thinking to implement such think but have been blocked but not being able to test any code as well, so I'm not surprised it doesn't work. Which widget in the shell handle swipe events? I'll try to solve the click problem as soon as I have time, but I'll need your help to double check if my code will work as expected. |
None of the optional behavior settings seem to have effect on this Michele notifications@github.com napsal Út, pro 23, 2014 v 8∶38 :
|
And there is one more thing that might be related to this: Jiří Husák plopp37@gmail.com napsal Út, pro 23, 2014 v 10∶19 :
|
A similar problem was reported by Corey in Debian 8
|
I can confirm the bug. Touching AppOverview seem to trigger it twice. Once when the finger touches the glass and once when it leaves again (overview can also be opened by holding down the finger). Also scrolling doesn't work (both workspace scrolling and app list scrolling when fixed icon size is activated) |
Thanks for the additional information. However I'm really unable to test any touch related feature. |
I think this issue has nothing to do with dash-to-dock per se. It seems to happen only when an app is launched by touching a touchscreen. Occasionally, a touch event is recognized as two consecutive clicked-events. And it happens also with panel actors. I reproduced the issue by just adding a simple button to the panel and logged all clicked-events. Sometimes, a single touch produced two clicked-events, sometimes just one. If I connected button-press-event, I got only one per touch. But I'm not sure at which level the event mismatch happens. I checked the input stream from the corresponding event device ( Anyone has any ideas? |
I can confirm this issue as well. I have made these tests:
First I thought it might be Arch issue, but #196 says bug is also present on Ubuntu. Then I thought it might be kernel 4.4 issue, but after upgrading Manjaro kernel to 4.8, issue is still present. What is doing Fedora/Korora differently? |
@elman22, @tuomasjjrasanen Can you confirm if the issue occurs also with the default dash or in the appgrid overview? I have no easy way to debug touch events. I've always assumed that I was missing something in my code to avoid the duplicate event, but from you comments it seems the problem is at an higher level |
Just checked Manjaro and this issue does not occur with default dash in app grid overview. Apps show up as expected. Also I just realized that Manjaro and Apricity run X11 sessions and Korora runs Wayland session. So maybe that is reason why Korora works fine. |
Hello, I'm using arch linux. The bug it's only present when using X11. Wayland it's unaffected |
Thanks for the additional information. |
You say that there's no problem without the extension. Could you please check if the problem occurs with the extension enabled when you choose the "rise window option" in the click action settings? |
Hmm, It keeps happening :( |
This make sense. Touch events on X11 are just an emulation to a pointer event. On Wayland the touch is part of the core input protocol and does not emulate pointer events. |
For me, too, choosing "Raise window" doesn't solve the problem. |
I switched to Wayland (on Manjaro GNOME) and this bug disappeared (or at least it's much better). But I cannot touch to minimize (touch to restore works though). Click to minimize works fine with the mouse and touchpad. |
Still an issue when using X11. $ lsb_release --all $ uname -r $ gnome-shell --version |
Question: Also, I only experience this "double" event situation in the Dash. I can interact with windows on the desktop (maximize, minimize, close, etc.) without issue. I can even interact with the topbar without issue. However, only the Dash-to-Dock exhibits this issue. (If I disable Dash-to-Dock) I can interact wit the gnome (pop-out) Dash just fine. Thought: |
Another Question... When an item is selected from the Gnome Dash, how does Gnome Shell know to close the Activities Overview? Is it because an application has just opened? Or does Gnome Shell handle the touch event twice in some funny way? I tried a couple of experiments... Experiment # 1
Obviously, Gnome shell doesn't use the opening of an application as a trigger to close the Activities-Overview. Experiment # 2
Conclusion This leads me to believe that Gnome Shell must be handling the touch even in the Dash twice. Once to launch the application, and a second time to close the Activities Overview. When the Dash is always visible with the Dash-to-Dock extension, perhaps Gnome-Shell calls the Dash's icon-clicked event handler (or whatever it is named) twice? |
This is fixed with this: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/272 In the mean time, it can also be workarounded at extension level by doing something like: diff --git a/appIcons.js b/appIcons.js
@@ -357,6 +367,9 @@ var MyAppIcon = new Lang.Class({
let modifiers = event ? event.get_state() : 0;
let focusedApp = tracker.focus_app;
+ if (event.type() == Clutter.EventType.TOUCH_END && event.is_pointer_emulated())
+ return;
+
// Only consider SHIFT and CONTROL as modifiers (exclude SUPER, CAPS-LOCK, etc.)
modifiers = modifiers & (Clutter.ModifierType.SHIFT_MASK | Clutter.ModifierType.CONTROL_MASK); |
This is now fixed for latest gnome-shell and cherry-picked to 3.28 and 3.30. If there's interest we could fix this at extension level either for older shell versions, it can be done as explained in #196 (comment) I think we can close the bug here, unless there's interest in workaround the issue at this level. |
There is still a "double launch" of a touched application in gnome-shell 3.30.1 |
'Double launch' also happens on Ubuntu 22.04, but I don't think it is related to this extenstion. It might be related to this issue and this gnome-shell fix , but |
I am running 22.10, and I do not experience this issue. I do not recall this being an issue in 22.04, either. |
@PJ-Singh-001, for me it happened before installing dash-to-dock (I was hoping the extension would fix it), and this happens only on the left side, for the dock. For example, touching the top-right zone (power settings, wifi, sound), it works normally (just opens the pannel). |
@domolys if you know if this patch it's also work for preventing potential erroneous double click on current Gnome dock in Ubuntu 22.04.4 ? |
Yes, I patched it on Ubuntu 22.04.4 |
@domolys Sorry for asking but is the default bar on the left of Ubuntu something similar? |
This patch only fix issues with touchscreen, it has nothing to do with anythings else... |
@domolys and couldn't a double tap be similar to a double click? |
When opening pinned any Chrome app, it creates two windows instead of just one. Experiencing on gnome-shell 3.14.1 in Ubuntu Gnome 14.10
The text was updated successfully, but these errors were encountered: