mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-26 17:54:14 +00:00
Compare commits
5 Commits
157aecf12a
...
61e198d7a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61e198d7a1 | ||
|
|
9859268ca3 | ||
|
|
f43772a20d | ||
|
|
8b27e5c859 | ||
|
|
32126eb87b |
@ -8,8 +8,8 @@ PREFIX = /usr/local
|
|||||||
MANDIR = $(PREFIX)/share/man
|
MANDIR = $(PREFIX)/share/man
|
||||||
DATADIR = $(PREFIX)/share
|
DATADIR = $(PREFIX)/share
|
||||||
|
|
||||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.19`
|
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20`
|
||||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.19`
|
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20`
|
||||||
|
|
||||||
# Allow using an alternative wlroots installation
|
# Allow using an alternative wlroots installation
|
||||||
# This has to have all the includes required by wlroots, e.g:
|
# This has to have all the includes required by wlroots, e.g:
|
||||||
|
|||||||
31
dwl.c
31
dwl.c
@ -126,7 +126,11 @@ typedef struct {
|
|||||||
struct wl_listener commit;
|
struct wl_listener commit;
|
||||||
struct wlr_scene *image_capture_scene;
|
struct wlr_scene *image_capture_scene;
|
||||||
struct wlr_ext_image_capture_source_v1 *image_capture_source;
|
struct wlr_ext_image_capture_source_v1 *image_capture_source;
|
||||||
struct wlr_scene_tree *image_capture_tree;
|
struct wlr_ext_foreign_toplevel_handle_v1 *ext_foreign_toplevel;
|
||||||
|
union {
|
||||||
|
struct wlr_scene_tree *image_capture_tree;
|
||||||
|
struct wlr_scene_surface *image_capture_scene_surface;
|
||||||
|
} capture;
|
||||||
struct wl_listener map;
|
struct wl_listener map;
|
||||||
struct wl_listener maximize;
|
struct wl_listener maximize;
|
||||||
struct wl_listener unmap;
|
struct wl_listener unmap;
|
||||||
@ -146,7 +150,6 @@ typedef struct {
|
|||||||
uint32_t tags;
|
uint32_t tags;
|
||||||
int isfloating, isurgent, isfullscreen;
|
int isfloating, isurgent, isfullscreen;
|
||||||
uint32_t resize; /* configure serial of a pending resize */
|
uint32_t resize; /* configure serial of a pending resize */
|
||||||
struct wlr_ext_foreign_toplevel_handle_v1 *ext_foreign_toplevel;
|
|
||||||
} Client;
|
} Client;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -1773,7 +1776,13 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||||||
c->image_capture_scene = wlr_scene_create();
|
c->image_capture_scene = wlr_scene_create();
|
||||||
c->ext_foreign_toplevel = wlr_ext_foreign_toplevel_handle_v1_create(foreign_toplevel_list,&foreign_toplevel_state);
|
c->ext_foreign_toplevel = wlr_ext_foreign_toplevel_handle_v1_create(foreign_toplevel_list,&foreign_toplevel_state);
|
||||||
c->ext_foreign_toplevel->data = c;
|
c->ext_foreign_toplevel->data = c;
|
||||||
c->image_capture_tree = wlr_scene_xdg_surface_create(&c->image_capture_scene->tree, c->surface.xdg);
|
if (c->type == XDGShell) {
|
||||||
|
c->capture.image_capture_tree = wlr_scene_xdg_surface_create(&c->image_capture_scene->tree, c->surface.xdg);
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
} else { /* xwayland */
|
||||||
|
c->capture.image_capture_scene_surface = wlr_scene_surface_create(&c->image_capture_scene->tree, c->surface.xwayland->surface);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
client_get_geometry(c, &c->geom);
|
client_get_geometry(c, &c->geom);
|
||||||
@ -2875,9 +2884,16 @@ unmapnotify(struct wl_listener *listener, void *data)
|
|||||||
setmon(c, NULL, 0);
|
setmon(c, NULL, 0);
|
||||||
wl_list_remove(&c->flink);
|
wl_list_remove(&c->flink);
|
||||||
}
|
}
|
||||||
if (c->ext_foreign_toplevel) {
|
if (c->ext_foreign_toplevel != NULL) {
|
||||||
wlr_ext_foreign_toplevel_handle_v1_destroy(c->ext_foreign_toplevel);
|
wlr_ext_foreign_toplevel_handle_v1_destroy(c->ext_foreign_toplevel);
|
||||||
|
c->ext_foreign_toplevel = NULL;
|
||||||
}
|
}
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
if (c->type != XDGShell && c->capture.image_capture_scene_surface) {
|
||||||
|
wlr_scene_node_destroy(&c->capture.image_capture_scene_surface->buffer->node);
|
||||||
|
c->capture.image_capture_scene_surface = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
wlr_scene_node_destroy(&c->image_capture_scene->tree.node);
|
wlr_scene_node_destroy(&c->image_capture_scene->tree.node);
|
||||||
wlr_scene_node_destroy(&c->scene->node);
|
wlr_scene_node_destroy(&c->scene->node);
|
||||||
@ -2997,6 +3013,13 @@ 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 == focustop(c->mon))
|
if (c == focustop(c->mon))
|
||||||
printstatus();
|
printstatus();
|
||||||
|
if (c->ext_foreign_toplevel != NULL) {
|
||||||
|
struct wlr_ext_foreign_toplevel_handle_v1_state foreign_toplevel_state = {
|
||||||
|
.app_id = client_get_appid(c),
|
||||||
|
.title = client_get_title(c),
|
||||||
|
};
|
||||||
|
wlr_ext_foreign_toplevel_handle_v1_update_state(c->ext_foreign_toplevel,&foreign_toplevel_state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user