diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2021-02-24 11:34:39 -0600 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2021-04-04 20:56:47 +0000 |
commit | 840e782bd2cbad85ef481839beb24d4d0da5249a (patch) | |
tree | 6a6c01a3d5cac40d992fb8b20a6195b4efab2943 | |
parent | ea47b53b8453f8b5e0ab87d5f6f11fc314bba49d (diff) | |
download | epiphany-mcatanzaro/ephy-session.tar.gz |
session: stop saving window role in the session statemcatanzaro/ephy-session
Apparently, when running under X11 it is possible to tell GTK to restore
particular windows on particular workspaces. That's cute, but I don't
like X11-specific code, and it's gone in GTK 4. We'll have to remove
this in the future no matter what, so might as well get rid of it now.
-rw-r--r-- | src/ephy-session.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c index 5dda793ba..a8767a759 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -409,21 +409,6 @@ window_added_cb (GtkApplication *application, g_signal_connect_object (tab_view, "notify::selected-page", G_CALLBACK (tab_view_notify_selected_page_cb), session, G_CONNECT_AFTER); - - /* Set unique identifier as role, so that on restore, the WM can - * place the window on the right workspace - */ - - if (gtk_window_get_role (window) == NULL) { - /* I guess rand() is unique enough, otherwise we could use - * time + pid or something - */ - char *role; - - role = g_strdup_printf ("epiphany-window-%x", rand ()); - gtk_window_set_role (window, role); - g_free (role); - } } static void @@ -539,7 +524,6 @@ typedef struct { GdkRectangle geometry; gboolean is_maximized; gboolean is_fullscreen; - char *role; GList *tabs; gint active_tab; @@ -629,7 +613,6 @@ session_window_new (EphyWindow *window, session_window = g_new0 (SessionWindow, 1); get_window_geometry (window, session_window); - session_window->role = g_strdup (gtk_window_get_role (GTK_WINDOW (window))); tab_view = ephy_window_get_tab_view (window); for (l = tabs; l != NULL; l = l->next) { @@ -649,7 +632,6 @@ session_window_new (EphyWindow *window, static void session_window_free (SessionWindow *session_window) { - g_free (session_window->role); g_list_free_full (session_window->tabs, (GDestroyNotify)session_tab_free); g_free (session_window); @@ -821,14 +803,6 @@ write_ephy_window (xmlTextWriterPtr writer, if (ret < 0) return ret; - if (window->role != NULL) { - ret = xmlTextWriterWriteAttribute (writer, - (const xmlChar *)"role", - (const xmlChar *)window->role); - if (ret < 0) - return ret; - } - for (l = window->tabs; l != NULL; l = l->next) { SessionTab *tab = (SessionTab *)l->data; ret = write_tab (writer, tab); @@ -1170,8 +1144,6 @@ session_parse_window (SessionParserContext *context, } else if (strcmp (names[i], "is-fullscreen") == 0) { ephy_string_to_int (values[i], &int_value); is_fullscreen = int_value != 0; - } else if (strcmp (names[i], "role") == 0) { - gtk_window_set_role (GTK_WINDOW (context->window), values[i]); } else if (strcmp (names[i], "active-tab") == 0) { ephy_string_to_int (values[i], &int_value); context->active_tab = int_value; |