summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2024-04-05 14:04:58 -0400
committerVictor Kareh <[email protected]>2025-04-02 20:37:16 +0000
commit94ff81575062ecdd57a28eb8a3c7bfaaa6b77b03 (patch)
tree3f13be543378e64e3a43c2d83a9c4acb37619037 /src/core/window.c
parent79c00a9a63a3d3ebc325b1ec68e07be27156598a (diff)
downloadmarco-94ff81575062ecdd57a28eb8a3c7bfaaa6b77b03.tar.bz2
marco-94ff81575062ecdd57a28eb8a3c7bfaaa6b77b03.tar.xz
window: Parse _GTK_APPLICATION_ID property
GTK+ has support for the application ID property. This will allow Marco to reconstruct the path to the desktop spec file and so have access to all internal attributes (e.g. name, icon, etc.)
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/window.c b/src/core/window.c
index c1702dd8..658ca957 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -263,7 +263,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
gulong existing_wm_state;
gulong event_mask;
MetaMoveResizeFlags flags;
-#define N_INITIAL_PROPS 20
+#define N_INITIAL_PROPS 21
Atom initial_props[N_INITIAL_PROPS];
int i;
gboolean has_shape;
@@ -563,6 +563,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->wm_client_machine = NULL;
window->startup_id = NULL;
window->gtk_theme_variant = NULL;
+ window->gtk_application_id = NULL;
window->net_wm_pid = -1;
@@ -621,6 +622,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
initial_props[i++] = display->atom__NET_WM_USER_TIME_WINDOW;
initial_props[i++] = display->atom__NET_WM_FULLSCREEN_MONITORS;
initial_props[i++] = display->atom__GTK_THEME_VARIANT;
+ initial_props[i++] = display->atom__GTK_APPLICATION_ID;
g_assert (N_INITIAL_PROPS == i);
meta_window_reload_properties (window, initial_props, N_INITIAL_PROPS, TRUE);
@@ -9015,6 +9017,7 @@ meta_window_finalize (GObject *object)
g_clear_pointer (&window->icon_name, g_free);
g_clear_pointer (&window->desc, g_free);
g_clear_pointer (&window->gtk_theme_variant, g_free);
+ g_clear_pointer (&window->gtk_application_id, g_free);
G_OBJECT_CLASS (meta_window_parent_class)->finalize (object);
}