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 646506 - give visual feedback of while holding ctrl (to launch new instance)
give visual feedback of while holding ctrl (to launch new instance)
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
3.22.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-02 03:21 UTC by Gabriel Burt
Modified: 2021-07-05 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gabriel Burt 2011-04-02 03:21:53 UTC
You can ctrl-click to launch a new instance of a running app (and hopefully you'll be able to ctrl-enter soon; bug 635501) but you don't get any visual feedback.

It would be nice if the there's-an-instance-already drawing would change for the hovered-over item (or the best-match/default item if none hovered) while ctrl is held.
Comment 1 Gabriel Burt 2011-04-02 03:22:36 UTC
Whoops, that bug/link was supposed to be bug 613082.
Comment 2 Allan Day 2011-11-18 17:50:34 UTC
We should at least change the pointer icon to have a plus mark when it is hovered over an running app and ctrl is held down.
Comment 3 Zan Dobersek 2011-12-06 15:38:34 UTC
I'm looking into this and should come up with a patch relatively soon.
Comment 4 Zan Dobersek 2011-12-07 18:56:11 UTC
I've looked into several approaches towards implementing this behavior but am now somehow stuck between them.

The affected class is AppDisplay.AppWellIcon. It is used in Dash as well as in SearchResults which originate from AppSearchProvider.

First way, initially implemented for AppWellIcons in Dash, is to catch enter and leave events on the AppWellIcon, set key focus on them when this occurs, and then wait for the Control button to be pressed. This works for icons in Dash, but the problem is taking the key focus. This ruins current design and is also a bit desperate IMO. This approach also fails when AppWellIcon is placed in SearchResults. Search entry should keep the key focus so the search could be updated/restarted or just to move around search results. The AppWellIcon taking the focus is really messing this up.

The second and in my mind a more elegant way is to put a key press handler in Overview, looking for Control key presses. If they occur, we check if the actor's delegate is an instance of AppWellIcon and then indicate through that actor that on activation, a new window would be created.

The problem is that currently there aren't any cases in the GNOME Shell's JavaScript code of acquiring the actor currently under pointer. The Clutter-equivalent function would be clutter_input_device_get_pointer_actor. Is this method even acceptable?

So, to sum things up:
- I don't want to set key focus on the AppWellIcon, it can backfire
- The best place to catch for Control key press seems to be Overview, the event would then indirectly affect the actor under pointer (if actor's an instance of AppWellIcon)

What I'd like to hear are some comments, suggestions and thoughts about the problem, especially doing the whole actor-under-pointer shenanigans.
Comment 5 Matthias Clasen 2011-12-14 14:08:39 UTC
Noticing that ctrl is pressed does not require grabbing keyboard focus.

All mouse events carry a state field that contains the current modifier state.
Comment 6 Zan Dobersek 2011-12-14 14:55:42 UTC
(In reply to comment #5)
> Noticing that ctrl is pressed does not require grabbing keyboard focus.
> 
> All mouse events carry a state field that contains the current modifier state.

I understand this, but as said, all the mouse events ... this requires further mouse movement after Ctrl key has been pressed. I don't think only checking for the modifier state would present a complete solution.
Comment 7 Allan Day 2012-01-19 09:22:27 UTC
The other tricky thing about this bug is knowing when it is possible for the app to open a new window - it isn't universal.
Comment 8 GNOME Infrastructure Team 2021-07-05 14:16:42 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.