summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2020-10-02 11:13:29 +0000
committerWill Thompson <will@willthompson.co.uk>2020-10-02 11:13:29 +0000
commit303384eea4f0a195f4f83682e342a1437489a414 (patch)
tree9a2b36b3eae344af19e94663095826766460d418
parent0a26dd4ef1c3fb77d52cacfb2bdf54671283d2c9 (diff)
parent72a4b47b078b9faa9bf5bc4c80de6d15f02891f4 (diff)
downloadgnome-initial-setup-303384eea4f0a195f4f83682e342a1437489a414.tar.gz
Merge branch 'wip/idle-handlers-are-the-devils-workshop' into 'master'
gis-driver: Don't defer window state changes to idle handlers See merge request GNOME/gnome-initial-setup!104
-rw-r--r--gnome-initial-setup/gis-driver.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c
index 2332aee..4ecf313 100644
--- a/gnome-initial-setup/gis-driver.c
+++ b/gnome-initial-setup/gis-driver.c
@@ -723,28 +723,6 @@ gis_driver_activate (GApplication *app)
gtk_window_present (GTK_WINDOW (priv->main_window));
}
-static gboolean
-maximize (gpointer data)
-{
- GtkWindow *window = data;
-
- gtk_window_maximize (window);
- gtk_window_present (window);
-
- return G_SOURCE_REMOVE;
-}
-
-static gboolean
-unmaximize (gpointer data)
-{
- GtkWindow *window = data;
-
- gtk_window_unmaximize (window);
- gtk_window_present (window);
-
- return G_SOURCE_REMOVE;
-}
-
static void
set_small_screen_based_on_primary_monitor (GisDriver *driver)
{
@@ -819,7 +797,8 @@ update_screen_size (GisDriver *driver)
gtk_window_set_resizable (priv->main_window, TRUE);
gtk_window_set_position (priv->main_window, GTK_WIN_POS_NONE);
- g_idle_add (maximize, priv->main_window);
+ gtk_window_maximize (priv->main_window);
+ gtk_window_present (priv->main_window);
}
else
{
@@ -843,7 +822,8 @@ update_screen_size (GisDriver *driver)
gtk_window_set_resizable (priv->main_window, FALSE);
gtk_window_set_position (priv->main_window, GTK_WIN_POS_CENTER_ALWAYS);
- g_idle_add (unmaximize, priv->main_window);
+ gtk_window_unmaximize (priv->main_window);
+ gtk_window_present (priv->main_window);
}
}