mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -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
|
||||
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});
|
||||
|
||||
Client *c = wl_container_of(listener, c, minimize);
|
||||
struct wlr_xwayland_minimize_event *event = data;
|
||||
|
||||
if (!c || !c->mon || c->iskilling || c->isminied)
|
||||
return;
|
||||
|
||||
if (!client_is_x11(c)) {
|
||||
if (!c->surface.xdg->toplevel->requested.minimized)
|
||||
return;
|
||||
} else {
|
||||
if (!event->minimize)
|
||||
return;
|
||||
if (client_request_minimize(c, data)) {
|
||||
set_minized(c);
|
||||
}
|
||||
|
||||
set_minized(c);
|
||||
}
|
||||
|
||||
void motionabsolute(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue