mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-26 17:54:14 +00:00
Compare commits
1 Commits
61e198d7a1
...
157aecf12a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
157aecf12a |
@ -8,8 +8,8 @@ PREFIX = /usr/local
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
DATADIR = $(PREFIX)/share
|
||||
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20`
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.19`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.19`
|
||||
|
||||
# Allow using an alternative wlroots installation
|
||||
# This has to have all the includes required by wlroots, e.g:
|
||||
|
||||
32
dwl.c
32
dwl.c
@ -126,11 +126,7 @@ typedef struct {
|
||||
struct wl_listener commit;
|
||||
struct wlr_scene *image_capture_scene;
|
||||
struct wlr_ext_image_capture_source_v1 *image_capture_source;
|
||||
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 wlr_scene_tree *image_capture_tree;
|
||||
struct wl_listener map;
|
||||
struct wl_listener maximize;
|
||||
struct wl_listener unmap;
|
||||
@ -140,6 +136,7 @@ typedef struct {
|
||||
struct wl_listener set_decoration_mode;
|
||||
struct wl_listener destroy_decoration;
|
||||
#ifdef XWAYLAND
|
||||
struct wlr_scene_surface *image_capture_scene_surface;
|
||||
struct wl_listener activate;
|
||||
struct wl_listener associate;
|
||||
struct wl_listener dissociate;
|
||||
@ -150,6 +147,7 @@ typedef struct {
|
||||
uint32_t tags;
|
||||
int isfloating, isurgent, isfullscreen;
|
||||
uint32_t resize; /* configure serial of a pending resize */
|
||||
struct wlr_ext_foreign_toplevel_handle_v1 *ext_foreign_toplevel;
|
||||
} Client;
|
||||
|
||||
typedef struct {
|
||||
@ -1777,11 +1775,9 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||
c->ext_foreign_toplevel = wlr_ext_foreign_toplevel_handle_v1_create(foreign_toplevel_list,&foreign_toplevel_state);
|
||||
c->ext_foreign_toplevel->data = c;
|
||||
if (c->type == XDGShell) {
|
||||
c->capture.image_capture_tree = wlr_scene_xdg_surface_create(&c->image_capture_scene->tree, c->surface.xdg);
|
||||
#ifdef XWAYLAND
|
||||
c->image_capture_tree = wlr_scene_xdg_surface_create(&c->image_capture_scene->tree, c->surface.xdg);
|
||||
} else { /* xwayland */
|
||||
c->capture.image_capture_scene_surface = wlr_scene_surface_create(&c->image_capture_scene->tree, c->surface.xwayland->surface);
|
||||
#endif
|
||||
c->image_capture_scene_surface = wlr_scene_surface_create(&c->image_capture_scene->tree, c->surface.xwayland->surface);
|
||||
}
|
||||
|
||||
|
||||
@ -2884,16 +2880,13 @@ unmapnotify(struct wl_listener *listener, void *data)
|
||||
setmon(c, NULL, 0);
|
||||
wl_list_remove(&c->flink);
|
||||
}
|
||||
if (c->ext_foreign_toplevel != NULL) {
|
||||
if (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;
|
||||
if (c->image_capture_scene_surface) {
|
||||
wlr_scene_node_destroy(&c->image_capture_scene_surface->buffer->node);
|
||||
c->image_capture_scene_surface = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
wlr_scene_node_destroy(&c->image_capture_scene->tree.node);
|
||||
wlr_scene_node_destroy(&c->scene->node);
|
||||
@ -3013,13 +3006,6 @@ updatetitle(struct wl_listener *listener, void *data)
|
||||
Client *c = wl_container_of(listener, c, set_title);
|
||||
if (c == focustop(c->mon))
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user