aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-08-24 11:22:46 +0100
committerHarry Jeffery <harry@exec64.co.uk>2019-08-24 11:22:46 +0100
commit9d2684a260ffd1a0b2a084ffdd7adbfcc4ceaafa (patch)
tree2e38d2784ff8517eb253d9e32038bc5c1b95cd8d
parent74189114065c79d85ad0b8f75e34490a802cc2f4 (diff)
downloadimv-9d2684a260ffd1a0b2a084ffdd7adbfcc4ceaafa.tar.gz
window: Set Wayland/X11 class/app_id hints
-rw-r--r--src/wl_window.c3
-rw-r--r--src/x11_window.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/wl_window.c b/src/wl_window.c
index e9a8a0f..c50fa81 100644
--- a/src/wl_window.c
+++ b/src/wl_window.c
@@ -641,6 +641,8 @@ static void create_window(struct imv_window *window, int width, int height,
assert(window->wl_xdg_toplevel);
xdg_toplevel_add_listener(window->wl_xdg_toplevel, &toplevel_listener, window);
+ xdg_toplevel_set_title(window->wl_xdg_toplevel, title);
+ xdg_toplevel_set_app_id(window->wl_xdg_toplevel, "imv");
wl_surface_commit(window->wl_surface);
wl_display_roundtrip(window->wl_display);
@@ -650,7 +652,6 @@ static void create_window(struct imv_window *window, int width, int height,
eglMakeCurrent(window->egl_display, window->egl_surface, window->egl_surface, window->egl_context);
wl_surface_commit(window->wl_surface);
- xdg_toplevel_set_title(window->wl_xdg_toplevel, title);
wl_display_roundtrip(window->wl_display);
}
diff --git a/src/x11_window.c b/src/x11_window.c
index 69fb244..c7d752f 100644
--- a/src/x11_window.c
+++ b/src/x11_window.c
@@ -131,6 +131,11 @@ struct imv_window *imv_window_create(int w, int h, const char *title)
window->x_state = XInternAtom(window->x_display, "_NET_WM_STATE", true);
window->x_fullscreen = XInternAtom(window->x_display, "_NET_WM_STATE_FULLSCREEN", true);
+ XClassHint hint = {
+ .res_name = "imv",
+ .res_class= "imv",
+ };
+ XSetClassHint(window->x_display, window->x_window, &hint);
XMapWindow(window->x_display, window->x_window);
XStoreName(window->x_display, window->x_window, title);