summaryrefslogtreecommitdiff
path: root/src/xwayland/XWM.cpp
diff options
context:
space:
mode:
authorMaximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com>2025-02-16 00:20:42 +0000
committerGitHub <noreply@github.com>2025-02-16 01:20:42 +0100
commit897ee276dc0a8a6b11a8102b225a9e969faac0bf (patch)
tree4285cd2e7c1840ae7b80d6730af6250246c5d878 /src/xwayland/XWM.cpp
parent94a30889a78fa7c7f87fe8134c18357855824c35 (diff)
xwayland: configure on a configure request and cleanup geometry conversion (#9375)
* xwayland: configure the window on a configure request * xwayland: move coordinate conversion handling to their own functions * xwayland: rename configure to configureRequest
Diffstat (limited to 'src/xwayland/XWM.cpp')
-rw-r--r--src/xwayland/XWM.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xwayland/XWM.cpp b/src/xwayland/XWM.cpp
index f2a9b794..a4e3289b 100644
--- a/src/xwayland/XWM.cpp
+++ b/src/xwayland/XWM.cpp
@@ -59,7 +59,7 @@ void CXWM::handleDestroy(xcb_destroy_notify_event_t* e) {
std::erase_if(surfaces, [XSURF](const auto& other) { return XSURF == other; });
}
-void CXWM::handleConfigure(xcb_configure_request_event_t* e) {
+void CXWM::handleConfigureRequest(xcb_configure_request_event_t* e) {
const auto XSURF = windowForXID(e->window);
if (!XSURF)
@@ -70,8 +70,9 @@ void CXWM::handleConfigure(xcb_configure_request_event_t* e) {
if (!(MASK & GEOMETRY))
return;
- XSURF->events.configure.emit(CBox{MASK & XCB_CONFIG_WINDOW_X ? e->x : XSURF->geometry.x, MASK & XCB_CONFIG_WINDOW_Y ? e->y : XSURF->geometry.y,
- MASK & XCB_CONFIG_WINDOW_WIDTH ? e->width : XSURF->geometry.width, MASK & XCB_CONFIG_WINDOW_HEIGHT ? e->height : XSURF->geometry.height});
+ XSURF->events.configureRequest.emit(CBox{MASK & XCB_CONFIG_WINDOW_X ? e->x : XSURF->geometry.x, MASK & XCB_CONFIG_WINDOW_Y ? e->y : XSURF->geometry.y,
+ MASK & XCB_CONFIG_WINDOW_WIDTH ? e->width : XSURF->geometry.width,
+ MASK & XCB_CONFIG_WINDOW_HEIGHT ? e->height : XSURF->geometry.height});
}
void CXWM::handleConfigureNotify(xcb_configure_notify_event_t* e) {
@@ -758,7 +759,7 @@ int CXWM::onEvent(int fd, uint32_t mask) {
switch (event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) {
case XCB_CREATE_NOTIFY: handleCreate((xcb_create_notify_event_t*)event); break;
case XCB_DESTROY_NOTIFY: handleDestroy((xcb_destroy_notify_event_t*)event); break;
- case XCB_CONFIGURE_REQUEST: handleConfigure((xcb_configure_request_event_t*)event); break;
+ case XCB_CONFIGURE_REQUEST: handleConfigureRequest((xcb_configure_request_event_t*)event); break;
case XCB_CONFIGURE_NOTIFY: handleConfigureNotify((xcb_configure_notify_event_t*)event); break;
case XCB_MAP_REQUEST: handleMapRequest((xcb_map_request_event_t*)event); break;
case XCB_MAP_NOTIFY: handleMapNotify((xcb_map_notify_event_t*)event); break;