Enable configure request event handling
Still uses XLib configure window, this should be ported but not at the same time as the event handling.
This commit is contained in:
parent
70f93c12a8
commit
8a93690216
1 changed files with 15 additions and 13 deletions
28
events.cpp
28
events.cpp
|
@ -294,24 +294,26 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
||||||
QWhatsThis::leaveWhatsThisMode();
|
QWhatsThis::leaveWhatsThisMode();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if KWIN_QT5_PORTING
|
case XCB_CONFIGURE_REQUEST: {
|
||||||
case ConfigureRequest: {
|
const auto *event = reinterpret_cast<xcb_configure_request_event_t*>(e);
|
||||||
if (e->xconfigurerequest.parent == rootWindow()) {
|
if (event->parent == rootWindow()) {
|
||||||
|
// TODO: this should be ported to xcb
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
wc.border_width = e->xconfigurerequest.border_width;
|
wc.border_width = event->border_width;
|
||||||
wc.x = e->xconfigurerequest.x;
|
wc.x = event->x;
|
||||||
wc.y = e->xconfigurerequest.y;
|
wc.y = event->y;
|
||||||
wc.width = e->xconfigurerequest.width;
|
wc.width = event->width;
|
||||||
wc.height = e->xconfigurerequest.height;
|
wc.height = event->height;
|
||||||
wc.sibling = None;
|
wc.sibling = XCB_WINDOW_NONE;
|
||||||
wc.stack_mode = Above;
|
wc.stack_mode = XCB_STACK_MODE_ABOVE;
|
||||||
unsigned int value_mask = e->xconfigurerequest.value_mask
|
unsigned int value_mask = event->value_mask
|
||||||
& (CWX | CWY | CWWidth | CWHeight | CWBorderWidth);
|
& (XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | XCB_CONFIG_WINDOW_BORDER_WIDTH);
|
||||||
XConfigureWindow(display(), e->xconfigurerequest.window, value_mask, &wc);
|
XConfigureWindow(display(), event->window, value_mask, &wc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if KWIN_QT5_PORTING
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
if (e->xfocus.window == rootWindow()
|
if (e->xfocus.window == rootWindow()
|
||||||
&& (e->xfocus.detail == NotifyDetailNone || e->xfocus.detail == NotifyPointerRoot)) {
|
&& (e->xfocus.detail == NotifyDetailNone || e->xfocus.detail == NotifyPointerRoot)) {
|
||||||
|
|
Loading…
Reference in a new issue