mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-09-19 13:52:48 +00:00
Compare commits
2
Commits
1fe1b4e66e
...
e451862544
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e451862544 | ||
|
|
b3223b15e9 |
@@ -153,6 +153,7 @@ typedef struct {
|
||||
struct wl_listener associate;
|
||||
struct wl_listener dissociate;
|
||||
struct wl_listener configure;
|
||||
struct wl_listener set_geometry;
|
||||
struct wl_listener set_hints;
|
||||
#endif
|
||||
unsigned int bw;
|
||||
@@ -466,6 +467,7 @@ static void associatex11(struct wl_listener *listener, void *data);
|
||||
static void configurex11(struct wl_listener *listener, void *data);
|
||||
static void createnotifyx11(struct wl_listener *listener, void *data);
|
||||
static void dissociatex11(struct wl_listener *listener, void *data);
|
||||
static void setgeometryx11(struct wl_listener *listener, void *data);
|
||||
static void sethints(struct wl_listener *listener, void *data);
|
||||
static void xwaylandready(struct wl_listener *listener, void *data);
|
||||
static struct wl_listener new_xwayland_surface = {.notify = createnotifyx11};
|
||||
@@ -549,7 +551,9 @@ arrange(Monitor *m)
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->mon == m) {
|
||||
wlr_scene_node_set_enabled(&c->scene->node, VISIBLEON(c, m));
|
||||
client_set_suspended(c, !VISIBLEON(c, m));
|
||||
client_set_suspended(c, !VISIBLEON(c, m)
|
||||
&& (!c->image_capture_source
|
||||
|| wl_list_empty(&c->image_capture_source->resources)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,6 +753,8 @@ capturerequest(struct wl_listener *listener, void *data)
|
||||
|
||||
wlr_ext_foreign_toplevel_image_capture_source_manager_v1_request_accept(
|
||||
request, view->image_capture_source);
|
||||
|
||||
client_set_suspended(view, 0);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1426,6 +1432,7 @@ destroynotify(struct wl_listener *listener, void *data)
|
||||
wl_list_remove(&c->associate.link);
|
||||
wl_list_remove(&c->configure.link);
|
||||
wl_list_remove(&c->dissociate.link);
|
||||
wl_list_remove(&c->set_geometry.link);
|
||||
wl_list_remove(&c->set_hints.link);
|
||||
} else
|
||||
#endif
|
||||
@@ -1872,7 +1879,6 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||
/* Unmanaged clients always are floating */
|
||||
wlr_scene_node_reparent(&c->scene->node, layers[LyrUnmanaged]);
|
||||
wlr_scene_node_set_position(&c->scene->node, c->geom.x, c->geom.y);
|
||||
client_set_size(c, c->geom.width, c->geom.height);
|
||||
if (client_wants_focus(c)) {
|
||||
focusclient(c, 1);
|
||||
exclusive_focus = c;
|
||||
@@ -2998,6 +3004,8 @@ unmapnotify(struct wl_listener *listener, void *data)
|
||||
#endif
|
||||
|
||||
wlr_scene_node_destroy(&c->image_capture_scene->tree.node);
|
||||
c->image_capture_scene = NULL;
|
||||
c->image_capture_source = NULL;
|
||||
wlr_scene_node_destroy(&c->scene->node);
|
||||
client_surface(c)->data = NULL;
|
||||
printstatus();
|
||||
@@ -3274,13 +3282,8 @@ configurex11(struct wl_listener *listener, void *data)
|
||||
{
|
||||
Client *c = wl_container_of(listener, c, configure);
|
||||
struct wlr_xwayland_surface_configure_event *event = data;
|
||||
if (!client_surface(c) || !client_surface(c)->mapped) {
|
||||
wlr_xwayland_surface_configure(c->surface.xwayland,
|
||||
event->x, event->y, event->width, event->height);
|
||||
return;
|
||||
}
|
||||
if (client_is_unmanaged(c)) {
|
||||
wlr_scene_node_set_position(&c->scene->node, event->x, event->y);
|
||||
if (!client_surface(c) || !client_surface(c)->mapped
|
||||
|| client_is_unmanaged(c)) {
|
||||
wlr_xwayland_surface_configure(c->surface.xwayland,
|
||||
event->x, event->y, event->width, event->height);
|
||||
return;
|
||||
@@ -3313,6 +3316,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
||||
LISTEN(&xsurface->events.request_activate, &c->activate, activatex11);
|
||||
LISTEN(&xsurface->events.request_configure, &c->configure, configurex11);
|
||||
LISTEN(&xsurface->events.request_fullscreen, &c->fullscreen, fullscreennotify);
|
||||
LISTEN(&xsurface->events.set_geometry, &c->set_geometry, setgeometryx11);
|
||||
LISTEN(&xsurface->events.set_hints, &c->set_hints, sethints);
|
||||
LISTEN(&xsurface->events.set_title, &c->set_title, updatetitle);
|
||||
}
|
||||
@@ -3325,6 +3329,19 @@ dissociatex11(struct wl_listener *listener, void *data)
|
||||
wl_list_remove(&c->unmap.link);
|
||||
}
|
||||
|
||||
void
|
||||
setgeometryx11(struct wl_listener *listener, void *data)
|
||||
{
|
||||
Client *c = wl_container_of(listener, c, set_geometry);
|
||||
|
||||
if (!client_is_unmanaged(c) || !client_surface(c)
|
||||
|| !client_surface(c)->mapped)
|
||||
return;
|
||||
|
||||
client_get_geometry(c, &c->geom);
|
||||
wlr_scene_node_set_position(&c->scene->node, c->geom.x, c->geom.y);
|
||||
}
|
||||
|
||||
void
|
||||
sethints(struct wl_listener *listener, void *data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user