summaryrefslogtreecommitdiff
path: root/endless/eoswindow.c
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-08-28 15:44:27 -0700
committerPhilip Chimento <philip@endlessm.com>2013-08-28 15:44:27 -0700
commit85a29272d2cba4a6d7d5e5021f0631b289900deb (patch)
tree116c409bd6de6ee67bf42d90ee3fa1bea3659f8a /endless/eoswindow.c
parent6937613bf3839f701878b5468b1f349a0b24b7b1 (diff)
WM_CLASS is application's unique ID
We set the window manager's WM_CLASS hint to the application's unique ID, e.g. com.endlessm.typing, in order to prevent the WM_CLASS from being set to "Gjs". [endlessm/eos-shell#853]
Diffstat (limited to 'endless/eoswindow.c')
-rw-r--r--endless/eoswindow.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index 0f507e0..37216f3 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -376,8 +376,16 @@ set_application (EosWindow *self,
gtk_window_set_application (GTK_WINDOW (self),
GTK_APPLICATION (self->priv->application));
if (self->priv->application == NULL)
- g_error ("In order to create a window, you must have an application "
- "for it to connect to.");
+ {
+ g_error ("In order to create a window, you must have an application "
+ "for it to connect to.");
+ return;
+ }
+
+ /* Application's WM_CLASS hint should be the application ID */
+ const gchar *id;
+ id = g_application_get_application_id (G_APPLICATION (application));
+ gtk_window_set_wmclass (GTK_WINDOW (self), id, id);
}
static void