mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-26 11:16:30 +00:00
handle the x11 configure event
This fixes the window size of old games in Wine.
This commit is contained in:
parent
0016a209e4
commit
0f48c9552e
1 changed files with 13 additions and 0 deletions
13
dwl.c
13
dwl.c
|
@ -96,6 +96,7 @@ typedef struct {
|
||||||
} surface;
|
} surface;
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
struct wl_listener activate;
|
struct wl_listener activate;
|
||||||
|
struct wl_listener configure;
|
||||||
#endif
|
#endif
|
||||||
struct wl_listener commit;
|
struct wl_listener commit;
|
||||||
struct wl_listener map;
|
struct wl_listener map;
|
||||||
|
@ -335,6 +336,7 @@ static struct wl_listener request_set_sel = {.notify = setsel};
|
||||||
|
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
static void activatex11(struct wl_listener *listener, void *data);
|
static void activatex11(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 createnotifyx11(struct wl_listener *listener, void *data);
|
||||||
static Atom getatom(xcb_connection_t *xc, const char *name);
|
static Atom getatom(xcb_connection_t *xc, const char *name);
|
||||||
static void renderindependents(struct wlr_output *output, struct timespec *now);
|
static void renderindependents(struct wlr_output *output, struct timespec *now);
|
||||||
|
@ -2388,6 +2390,15 @@ activatex11(struct wl_listener *listener, void *data)
|
||||||
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
configurex11(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
|
Client *c = wl_container_of(listener, c, configure);
|
||||||
|
struct wlr_xwayland_surface_configure_event *event = data;
|
||||||
|
wlr_xwayland_surface_configure(c->surface.xwayland,
|
||||||
|
event->x, event->y, event->width, event->height);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
createnotifyx11(struct wl_listener *listener, void *data)
|
createnotifyx11(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
|
@ -2407,6 +2418,8 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
||||||
wl_signal_add(&xwayland_surface->events.unmap, &c->unmap);
|
wl_signal_add(&xwayland_surface->events.unmap, &c->unmap);
|
||||||
c->activate.notify = activatex11;
|
c->activate.notify = activatex11;
|
||||||
wl_signal_add(&xwayland_surface->events.request_activate, &c->activate);
|
wl_signal_add(&xwayland_surface->events.request_activate, &c->activate);
|
||||||
|
c->configure.notify = configurex11;
|
||||||
|
wl_signal_add(&xwayland_surface->events.request_configure, &c->configure);
|
||||||
c->destroy.notify = destroynotify;
|
c->destroy.notify = destroynotify;
|
||||||
wl_signal_add(&xwayland_surface->events.destroy, &c->destroy);
|
wl_signal_add(&xwayland_surface->events.destroy, &c->destroy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue