mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-01 22:58:44 -04:00
fix: build fail for non xwayland
This commit is contained in:
parent
692b7f867c
commit
47809c5783
2 changed files with 14 additions and 9 deletions
|
|
@ -456,3 +456,15 @@ static inline int client_wants_fullscreen(Client *c) {
|
||||||
#endif
|
#endif
|
||||||
return c->surface.xdg->toplevel->requested.fullscreen;
|
return c->surface.xdg->toplevel->requested.fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool client_request_minimize(Client *c, void *data) {
|
||||||
|
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
if (client_is_x11(c)) {
|
||||||
|
struct wlr_xwayland_minimize_event *event = data;
|
||||||
|
return event->minimize;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return c->surface.xdg->toplevel->requested.minimized;
|
||||||
|
}
|
||||||
11
src/mango.c
11
src/mango.c
|
|
@ -3419,20 +3419,13 @@ minimizenotify(struct wl_listener *listener, void *data) {
|
||||||
// togglemaxmizescreen(&(Arg){0});
|
// togglemaxmizescreen(&(Arg){0});
|
||||||
|
|
||||||
Client *c = wl_container_of(listener, c, minimize);
|
Client *c = wl_container_of(listener, c, minimize);
|
||||||
struct wlr_xwayland_minimize_event *event = data;
|
|
||||||
|
|
||||||
if (!c || !c->mon || c->iskilling || c->isminied)
|
if (!c || !c->mon || c->iskilling || c->isminied)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!client_is_x11(c)) {
|
if (client_request_minimize(c, data)) {
|
||||||
if (!c->surface.xdg->toplevel->requested.minimized)
|
set_minized(c);
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
if (!event->minimize)
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_minized(c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void motionabsolute(struct wl_listener *listener, void *data) {
|
void motionabsolute(struct wl_listener *listener, void *data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue