Fix ShellAppSystem's use of no_focus_window, clean up state handling
First, we were passing an incorrect timestamp to meta_display_focus_the_no_focus_window - fix that. The invocation of set_focus_app to the started app there couldn't really work, because (if the above call had worked) we'd get the X reply *after* the started app. What we need to untangle here is the distinction that's now made in ShellApp between _STATE_STARTING and _STATE_RUNNING. A nice way to start doing this is to rebase ShellWindowTracker to only be concerned with app states. Concretely, the current "has windows implies running" logic now lives just inside shell-app.c. Rename the app-running-changed signal to be app-state-changed. This will ultimately be useful so that inside the panel, we can track the last started app. https://bugzilla.gnome.org/show_bug.cgi?id=620899
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "shell-enum-types.h"
|
||||
#include "display.h"
|
||||
#include "st.h"
|
||||
#include "shell-window-tracker.h"
|
||||
#include "shell-window-tracker-private.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -632,6 +632,8 @@ shell_app_state_transition (ShellApp *app,
|
||||
state == SHELL_APP_STATE_STARTING));
|
||||
app->state = state;
|
||||
g_object_notify (G_OBJECT (app), "state");
|
||||
|
||||
_shell_window_tracker_notify_app_state_changed (shell_window_tracker_get_default (), app);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user