[gedit/zbrown/deteplification-src: 54/633] App: do not call gtk_window_set_role() (specific to X11)
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/zbrown/deteplification-src: 54/633] App: do not call gtk_window_set_role() (specific to X11)
- Date: Sat, 10 Apr 2021 12:47:53 +0000 (UTC)
commit 473c8432bbd60cce1f4c75c53344b5af7f3ba063
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Dec 2 08:15:15 2019 +0100
App: do not call gtk_window_set_role() (specific to X11)
To try to get rid of X11-specific things in gedit.
This also permits to get rid of one use of g_get_current_time() and
GTimeVal (deprecated, not 2038-year-safe).
gtk_window_get_role() is not called in gedit. And with the unique string
for the window role, the window manager was never able to re-use its
knowledge about gedit windows.
gedit/gedit-app.c | 21 ---------------------
1 file changed, 21 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index e63b09289..072fded47 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -1450,22 +1450,6 @@ gedit_app_init (GeditApp *app)
#endif
}
-/* Generates a unique string for a window role */
-static gchar *
-gen_role (void)
-{
- GTimeVal result;
- static gint serial;
-
- g_get_current_time (&result);
-
- return g_strdup_printf ("gedit-window-%ld-%ld-%d-%s",
- result.tv_sec,
- result.tv_usec,
- serial++,
- g_get_host_name ());
-}
-
/**
* gedit_app_create_window:
* @app: the #GeditApp
@@ -1481,7 +1465,6 @@ gedit_app_create_window (GeditApp *app,
{
GeditAppPrivate *priv;
GeditWindow *window;
- gchar *role;
GdkWindowState state;
gint w, h;
@@ -1496,10 +1479,6 @@ gedit_app_create_window (GeditApp *app,
gtk_window_set_screen (GTK_WINDOW (window), screen);
}
- role = gen_role ();
- gtk_window_set_role (GTK_WINDOW (window), role);
- g_free (role);
-
state = g_settings_get_int (priv->window_settings,
GEDIT_SETTINGS_WINDOW_STATE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]