diff options
| author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-12-19 21:43:15 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-12-20 21:53:45 -0600 | 
| commit | afacc9b0b50fe9c63700e62f7d2083c6edb9d17b (patch) | |
| tree | 574a17552257ed426cf484e4156e140bb5c116c4 /dwl.c | |
| parent | dd9d8d543cc511df44035c0e3fe32a5f17a31c29 (diff) | |
force SSD when creating an xdg_toplevel_decoration object
Closes: https://github.com/djpohly/dwl/issues/366
Not sure why GLFW apps do not get mapped when we do not tell them the
decoration method
Diffstat (limited to 'dwl.c')
| -rw-r--r-- | dwl.c | 13 | 
1 files changed, 12 insertions, 1 deletions
| @@ -231,6 +231,7 @@ static void cleanupmon(struct wl_listener *listener, void *data);  static void closemon(Monitor *m);  static void commitlayersurfacenotify(struct wl_listener *listener, void *data);  static void commitnotify(struct wl_listener *listener, void *data); +static void createdecoration(struct wl_listener *listener, void *data);  static void createidleinhibitor(struct wl_listener *listener, void *data);  static void createkeyboard(struct wlr_keyboard *keyboard);  static void createlayersurface(struct wl_listener *listener, void *data); @@ -327,6 +328,7 @@ static struct wlr_compositor *compositor;  static struct wlr_xdg_shell *xdg_shell;  static struct wlr_xdg_activation_v1 *activation; +static struct wlr_xdg_decoration_manager_v1 *xdg_decoration_mgr;  static struct wl_list clients; /* tiling order */  static struct wl_list fstack;  /* focus order */  static struct wlr_idle *idle; @@ -369,6 +371,7 @@ static struct wl_listener new_input = {.notify = inputdevice};  static struct wl_listener new_virtual_keyboard = {.notify = virtualkeyboard};  static struct wl_listener new_output = {.notify = createmon};  static struct wl_listener new_xdg_surface = {.notify = createnotify}; +static struct wl_listener new_xdg_decoration = {.notify = createdecoration};  static struct wl_listener new_layer_shell_surface = {.notify = createlayersurface};  static struct wl_listener output_mgr_apply = {.notify = outputmgrapply};  static struct wl_listener output_mgr_test = {.notify = outputmgrtest}; @@ -771,6 +774,13 @@ commitnotify(struct wl_listener *listener, void *data)  }  void +createdecoration(struct wl_listener *listener, void *data) +{ +	struct wlr_xdg_toplevel_decoration_v1 *dec = data; +	wlr_xdg_toplevel_decoration_v1_set_mode(dec, WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); +} + +void  createidleinhibitor(struct wl_listener *listener, void *data)  {  	struct wlr_idle_inhibitor_v1 *idle_inhibitor = data; @@ -2181,7 +2191,8 @@ setup(void)  	wlr_server_decoration_manager_set_default_mode(  			wlr_server_decoration_manager_create(dpy),  			WLR_SERVER_DECORATION_MANAGER_MODE_SERVER); -	wlr_xdg_decoration_manager_v1_create(dpy); +	xdg_decoration_mgr = wlr_xdg_decoration_manager_v1_create(dpy); +	wl_signal_add(&xdg_decoration_mgr->events.new_toplevel_decoration, &new_xdg_decoration);  	/*  	 * Creates a cursor, which is a wlroots utility for tracking the cursor | 
