From 3db87856199943b40dd756b381d56b35bd506686 Mon Sep 17 00:00:00 2001 From: Gustavo Noronha Silva Date: Sun, 11 Aug 2013 22:55:26 -0300 Subject: Force an update on WNCK's knowledge of windows and workspaces We need to poke WNCK, otherwise our first call to ephy_window_is_on_current_workspace will be a false-positive. https://bugzilla.gnome.org/show_bug.cgi?id=705811 --- src/ephy-shell.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ephy-shell.c b/src/ephy-shell.c index d82479229..f514c6398 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -47,6 +47,9 @@ #include #include +#define WNCK_I_KNOW_THIS_IS_UNSTABLE +#include + #define EPHY_SHELL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_SHELL, EphyShellPrivate)) struct _EphyShellPrivate { @@ -129,6 +132,12 @@ ephy_shell_startup_continue (EphyShell *shell) ephy_shell_open_uris (shell, (const char **)ctx->arguments, ctx->startup_flags, ctx->user_time); } + + /* Get an initial update on our windows and their workspaces, + * otherwise our first call to ephy_window_is_on_current_workspace + * will be unreliable. + */ + wnck_screen_force_update (wnck_screen_get_default ()); } static void -- cgit v1.2.3