[x11] Send app_window event when window moves

This is needed for getting window position info into in_x11 without
exposing more globals, and is likely to be useful for other things,
especially as it doubles as a resize event when that's eventually
supported.
This commit is contained in:
Bill Currie 2021-11-22 13:11:37 +09:00
parent 52c5f0545b
commit 3af078b77a

View file

@ -66,6 +66,8 @@
#include "QF/va.h"
#include "QF/vid.h"
#include "QF/input/event.h"
#include "context_x11.h"
#include "dga_check.h"
#include "in_x11.h"
@ -164,6 +166,17 @@ configure_notify (XEvent *event)
c->serial, c->send_event, c->event, c->window, c->x, c->y,
c->width, c->height, c->border_width, c->above,
c->override_redirect);
IE_event_t ie_event = {
.type = ie_app_window,
.when = Sys_LongTime (),
.app_window = {
.xpos = c->x,
.ypos = c->y,
.xlen = c->width,
.ylen = c->height,
},
};
IE_Send_Event (&ie_event);
}
qboolean