Bug 683884 - Using ALT-F2 to exec a program makes it open twice
Summary: Using ALT-F2 to exec a program makes it open twice
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-shell
Version: 15
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Owen Taylor
QA Contact: Fedora Extras Quality Assurance
: 683630 690422 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2011-03-10 15:02 UTC by Pablo Iranzo Gómez
Modified: 2011-04-21 14:40 UTC (History)
16 users (show)

Fixed In Version: 2.91.92
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-04-21 14:40:28 UTC

Attachments (Terms of Use)
patch for gnome-shell/js/ui/runDialog.js (500 bytes, patch)
2011-03-11 06:37 UTC, Vadim Girlin
no flags Details | Diff
backtraces (9.99 KB, text/plain)
2011-03-12 17:24 UTC, Vadim Girlin
no flags Details

System ID Priority Status Summary Last Updated
GNOME Bugzilla 644509 None None None Never

Description Pablo Iranzo Gómez 2011-03-10 15:02:39 UTC
Description of problem:
When pressing ALT-F2 to exec a new program like gnome-terminal, two windows keep opening instead of just one

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. ALT-F2
2. type gnome-terminal
3. press ENTER
4. TWO gnome-terminal windows will open
Actual results:

Two windows are open of each program (nautilus, gnome-terminal, etc)

Expected results:
Just one :)

Comment 1 Vadim Girlin 2011-03-11 06:37:40 UTC
Created attachment 483648 [details]
patch for gnome-shell/js/ui/runDialog.js

AFAICS the problem is in the 'key-press-event' handler in runDialog.js which is called twice on 'enter' key. It seems that handler should return true when handled 'enter' instead of false. I tried to fix this in /usr/share/gnome-shell/js/ui/runDialog.js (see the patch), then restarted gnome-shell and now it works as expected.

Comment 2 Colin Walters 2011-03-11 15:40:16 UTC
*** Bug 683630 has been marked as a duplicate of this bug. ***

Comment 3 Colin Walters 2011-03-11 15:47:42 UTC
Thanks for the patch!  I've changed it to a git commit and moved it upstream.  We think it's correct, but we want to figure out though why it's happening before we commit it.

Comment 4 Owen Taylor 2011-03-11 15:48:21 UTC
The patch looks correct to me in that any event handler that handles the event should return true, but I'm really confused that it makes any difference.

 - I can't reproduce the bug
 - Colin can't reproduce the bug
 - I can't see *why* the key press handler would be hit again

There's almost certainly some bug going on somewhere else in the code, that under certain circumstances causes this bug, but under _what_ circumstances? Without knowing how to reproduce it's really hard to debug that other bug.

Does this happen for you 100% of the time, or only sometimes?

Comment 5 Pablo Iranzo Gómez 2011-03-11 17:02:49 UTC
On my X200 (64 bit) it happens 100% when opening gnome-terminal, other commands as gedit doesn't open twice (maybe the way the program it starts when invoked twice)

On my X60 doesn't happen (32 bits)

Same upgraded version of gnome-shell

Comment 6 Pablo Iranzo Gómez 2011-03-11 17:51:11 UTC
On my desktop (64 bits) happens too with gnome-terminal

Comment 7 Michael Schwendt 2011-03-12 12:28:39 UTC
Can reproduce (not limited to entering "emacs", "nautilus" or "gnome-terminal"). F15 Alpha installed today, updated right afterwards.

Comment 8 Vadim Girlin 2011-03-12 17:24:12 UTC
Created attachment 483918 [details]

It happens always on my 64 bit system. Any command is executed twice. Its not obvious with some apps - for example gedit doesn't create second window so it looks correct. I've tried to track this down and found that there are two keypress events queued in clutter through _clutter_stage_queue_event for each key press. I've put a trap in that function for 'enter' key press events and saved backtrace for each (see attached file). I don't know much about clutter and other libs used there so its hard for me to understand quickly whether it is wrong or not. It seems strange that there are two same events for every pressed key coming different ways, but typed chars aren't doubled in edit field so may be it is expected behavior. Also in attached file are backtraces trapped for same two events inside runDialog.js key press handler.

Comment 9 Panu Matilainen 2011-03-17 13:15:01 UTC
Fully reproducable here too, tried with firefox (complains about firefox already running), xchat, gnome-terminal, nautilus, gnome-calculator etc.

Comment 10 Pratyush Sahay 2011-03-17 13:34:10 UTC
Fully reproducible here too..Tried on the Nightly compose,i686 Live media.. nautilus, firefox, nautilus, empathy, etc...

Comment 11 Panu Matilainen 2011-03-18 04:50:11 UTC
I can confirm the patch from comment #1 fixes this for me (fully updated f15-alpha-x86_64 FWIW).

Comment 12 Pratyush Sahay 2011-03-20 08:34:21 UTC
Still occurring in the Nightly Compose of 18-3-2011 (i686 Live media)

Comment 13 Owen Taylor 2011-03-20 14:33:15 UTC
Question - do people that have this happening have ibus running (a keyboard or other ibus icon appearing in the message tray)?

Comment 14 Michael Schwendt 2011-03-20 16:53:14 UTC
> a keyboard or other ibus icon appearing in the message tray

The only icons here display at the top right are Network Manager, Universal Access Settings, Pulse Audio Volume Control, and User [Name] Settings. At the bottom border of the screen, no icon is displayed anymore. If I move the mouse to the bottom-right corner, an empty black shadow moves up into the screen .

ibus related is running only what seems to be the default:

$ ps axuw|grep ibus|grep -v grep
misc15    1869  0.2  0.0 361772  3808 ?        Sl   17:46   0:00 /usr/bin/ibus-daemon -r --xim
misc15    1872  0.0  0.0 225080  3416 ?        Sl   17:46   0:00 /usr/libexec/ibus-gconf
misc15    1876  0.0  0.1 310456  6144 ?        Sl   17:46   0:00 /usr/libexec/ibus-x11 --kill-daemon

Comment 15 James Livingston 2011-03-20 22:06:51 UTC
It occurred for me with an out-of-the-box F15 alpha install, and still occurs after updates and using it for a few days.

Comment 16 Panu Matilainen 2011-03-23 16:03:02 UTC
(In reply to comment #13)
> Question - do people that have this happening have ibus running (a keyboard or
> other ibus icon appearing in the message tray)?

Like Michael, no related icons visible but bunch of ibus-processes were running. And indeed after 'yum remove ibus*' the issue is gone, only one instance of the application is launched.

Comment 17 Pratyush Sahay 2011-03-26 06:40:49 UTC
Issue persisting in Nightly Compose of 25-03-2011..only main.py icon is there in the tray, but ibus processes running.

Comment 18 Owen Taylor 2011-03-26 15:08:40 UTC
*** Bug 690422 has been marked as a duplicate of this bug. ***

Comment 19 Dan Winship 2011-04-21 14:40:28 UTC
fixed since 2.91.92

Note You need to log in before you can comment on or make changes to this bug.