mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-06 07:15:53 -04:00
完善排除一些可能使用正在退出窗口的事件处理
This commit is contained in:
parent
1ba716e29f
commit
a9f8f0c091
1 changed files with 27 additions and 2 deletions
29
main.c
29
main.c
|
|
@ -1763,8 +1763,10 @@ void client_commit(Client *c) {
|
||||||
void // 0.5
|
void // 0.5
|
||||||
commitnotify(struct wl_listener *listener, void *data) {
|
commitnotify(struct wl_listener *listener, void *data) {
|
||||||
Client *c = wl_container_of(listener, c, commit);
|
Client *c = wl_container_of(listener, c, commit);
|
||||||
// don't know need to do what...
|
|
||||||
return;
|
if(!c || !c->mon || c->iskilling)
|
||||||
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void // 0.5
|
void // 0.5
|
||||||
|
|
@ -2674,6 +2676,10 @@ focustop(Monitor *m) {
|
||||||
void // 0.6
|
void // 0.6
|
||||||
fullscreennotify(struct wl_listener *listener, void *data) {
|
fullscreennotify(struct wl_listener *listener, void *data) {
|
||||||
Client *c = wl_container_of(listener, c, fullscreen);
|
Client *c = wl_container_of(listener, c, fullscreen);
|
||||||
|
|
||||||
|
if(!c || !c->mon || c->iskilling)
|
||||||
|
return;
|
||||||
|
|
||||||
setfullscreen(c, client_wants_fullscreen(c));
|
setfullscreen(c, client_wants_fullscreen(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3078,6 +3084,10 @@ maximizenotify(struct wl_listener *listener, void *data) {
|
||||||
// wlr_xdg_surface_schedule_configure(c->surface.xdg);
|
// wlr_xdg_surface_schedule_configure(c->surface.xdg);
|
||||||
// togglefakefullscreen(&(Arg){0});
|
// togglefakefullscreen(&(Arg){0});
|
||||||
Client *c = wl_container_of(listener, c, maximize);
|
Client *c = wl_container_of(listener, c, maximize);
|
||||||
|
|
||||||
|
if(!c || !c->mon || c->iskilling)
|
||||||
|
return;
|
||||||
|
|
||||||
if (c->isfakefullscreen || c->isfullscreen)
|
if (c->isfakefullscreen || c->isfullscreen)
|
||||||
setfakefullscreen(c, 0);
|
setfakefullscreen(c, 0);
|
||||||
else
|
else
|
||||||
|
|
@ -3119,6 +3129,10 @@ minimizenotify(struct wl_listener *listener, void *data) {
|
||||||
// wlr_xdg_surface_schedule_configure(c->surface.xdg);
|
// wlr_xdg_surface_schedule_configure(c->surface.xdg);
|
||||||
// togglefakefullscreen(&(Arg){0});
|
// togglefakefullscreen(&(Arg){0});
|
||||||
Client *c = wl_container_of(listener, c, minimize);
|
Client *c = wl_container_of(listener, c, minimize);
|
||||||
|
|
||||||
|
if(!c || !c->mon || c->iskilling)
|
||||||
|
return;
|
||||||
|
|
||||||
set_minized(c);
|
set_minized(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5001,6 +5015,10 @@ updatemons(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
void updatetitle(struct wl_listener *listener, void *data) {
|
void updatetitle(struct wl_listener *listener, void *data) {
|
||||||
Client *c = wl_container_of(listener, c, set_title);
|
Client *c = wl_container_of(listener, c, set_title);
|
||||||
|
|
||||||
|
if(!c || !c->mon || c->iskilling)
|
||||||
|
return;
|
||||||
|
|
||||||
const char *title;
|
const char *title;
|
||||||
title = client_get_title(c);
|
title = client_get_title(c);
|
||||||
if (title && c->foreign_toplevel)
|
if (title && c->foreign_toplevel)
|
||||||
|
|
@ -5379,6 +5397,9 @@ void zoom(const Arg *arg) {
|
||||||
void activatex11(struct wl_listener *listener, void *data) {
|
void activatex11(struct wl_listener *listener, void *data) {
|
||||||
Client *c = wl_container_of(listener, c, activate);
|
Client *c = wl_container_of(listener, c, activate);
|
||||||
|
|
||||||
|
if(!c || !c->mon || c->iskilling)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Only "managed" windows can be activated */
|
/* Only "managed" windows can be activated */
|
||||||
if (!client_is_unmanaged(c))
|
if (!client_is_unmanaged(c))
|
||||||
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
||||||
|
|
@ -5402,6 +5423,10 @@ void activatex11(struct wl_listener *listener, void *data) {
|
||||||
void // 0.7
|
void // 0.7
|
||||||
configurex11(struct wl_listener *listener, void *data) {
|
configurex11(struct wl_listener *listener, void *data) {
|
||||||
Client *c = wl_container_of(listener, c, configure);
|
Client *c = wl_container_of(listener, c, configure);
|
||||||
|
|
||||||
|
if(!c || !c->mon || c->iskilling)
|
||||||
|
return;
|
||||||
|
|
||||||
struct wlr_xwayland_surface_configure_event *event = data;
|
struct wlr_xwayland_surface_configure_event *event = data;
|
||||||
if (!client_surface(c) || !client_surface(c)->mapped) {
|
if (!client_surface(c) || !client_surface(c)->mapped) {
|
||||||
wlr_xwayland_surface_configure(c->surface.xwayland, event->x, event->y,
|
wlr_xwayland_surface_configure(c->surface.xwayland, event->x, event->y,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue