diff options
author | Simon Ser <contact@emersion.fr> | 2021-03-29 12:11:53 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-03-29 12:24:26 +0200 |
commit | a2535b80ce139c4f1ce1df0cc36bb3d048c0e328 (patch) | |
tree | 59299ff99c94ac9926c2712df30a8493e096f76e /xwayland/xwm.c | |
parent | de5347d0f2a82150a4788b63d06b5e91d5ebc27a (diff) |
xwayland: use ICCCM state defines from xcb-icccm
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r-- | xwayland/xwm.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index b8e686d7..25359834 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -924,10 +924,6 @@ static void xwm_handle_configure_notify(struct wlr_xwm *xwm, } } -#define ICCCM_WITHDRAWN_STATE 0 -#define ICCCM_NORMAL_STATE 1 -#define ICCCM_ICONIC_STATE 3 - static void xsurface_set_wm_state(struct wlr_xwayland_surface *xsurface, int32_t state) { struct wlr_xwm *xwm = xsurface->xwm; @@ -949,7 +945,7 @@ static void xwm_handle_map_request(struct wlr_xwm *xwm, return; } - xsurface_set_wm_state(xsurface, ICCCM_NORMAL_STATE); + xsurface_set_wm_state(xsurface, XCB_ICCCM_WM_STATE_NORMAL); xsurface_set_net_wm_state(xsurface); uint32_t values[1]; @@ -981,7 +977,7 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm, } xsurface_unmap(xsurface); - xsurface_set_wm_state(xsurface, ICCCM_WITHDRAWN_STATE); + xsurface_set_wm_state(xsurface, XCB_ICCCM_WM_STATE_WITHDRAWN); } static void xwm_handle_property_notify(struct wlr_xwm *xwm, @@ -1254,9 +1250,9 @@ static void xwm_handle_wm_change_state_message(struct wlr_xwm *xwm, } bool minimize; - if (detail == ICCCM_ICONIC_STATE) { + if (detail == XCB_ICCCM_WM_STATE_ICONIC) { minimize = true; - } else if (detail == ICCCM_NORMAL_STATE) { + } else if (detail == XCB_ICCCM_WM_STATE_NORMAL) { minimize = false; } else { wlr_log(WLR_DEBUG, "unhandled wm_change_state event %u", detail); @@ -1928,9 +1924,9 @@ void wlr_xwayland_surface_set_minimized(struct wlr_xwayland_surface *surface, surface->minimized = minimized; if (minimized) { - xsurface_set_wm_state(surface, ICCCM_ICONIC_STATE); + xsurface_set_wm_state(surface, XCB_ICCCM_WM_STATE_ICONIC); } else { - xsurface_set_wm_state(surface, ICCCM_NORMAL_STATE); + xsurface_set_wm_state(surface, XCB_ICCCM_WM_STATE_NORMAL); } xsurface_set_net_wm_state(surface); |