Enable map notify event handling
As part of it Unmanaged::windowEvent() takes an xcb_generic_event_t* instead of XEvent* as argument. Method of course still needs porting.
This commit is contained in:
parent
c863029b8d
commit
939c2d14c1
2 changed files with 11 additions and 8 deletions
17
events.cpp
17
events.cpp
|
@ -260,18 +260,19 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
#if KWIN_QT5_PORTING
|
||||
case MapNotify: {
|
||||
if (e->xmap.override_redirect) {
|
||||
Unmanaged* c = findUnmanaged(WindowMatchPredicate(e->xmap.window));
|
||||
case XCB_MAP_NOTIFY: {
|
||||
const auto *event = reinterpret_cast<xcb_map_notify_event_t*>(e);
|
||||
if (event->override_redirect) {
|
||||
Unmanaged* c = findUnmanaged(WindowMatchPredicate(event->window));
|
||||
if (c == NULL)
|
||||
c = createUnmanaged(e->xmap.window);
|
||||
c = createUnmanaged(event->window);
|
||||
if (c)
|
||||
return c->windowEvent(e);
|
||||
}
|
||||
return (e->xmap.event != e->xmap.window); // hide wm typical event from Qt
|
||||
return (event->event != event->window); // hide wm typical event from Qt
|
||||
}
|
||||
|
||||
#if KWIN_QT5_PORTING
|
||||
case EnterNotify: {
|
||||
if (QWhatsThis::inWhatsThisMode()) {
|
||||
QWidget* w = QWidget::find(e->xcrossing.window);
|
||||
|
@ -1496,8 +1497,9 @@ void Client::syncEvent(XSyncAlarmNotifyEvent* e)
|
|||
// Unmanaged
|
||||
// ****************************************
|
||||
|
||||
bool Unmanaged::windowEvent(XEvent* e)
|
||||
bool Unmanaged::windowEvent(xcb_generic_event_t *e)
|
||||
{
|
||||
#if KWIN_QT5_PORTING
|
||||
double old_opacity = opacity();
|
||||
unsigned long dirty[ 2 ];
|
||||
info->event(e, dirty, 2); // pass through the NET stuff
|
||||
|
@ -1533,6 +1535,7 @@ bool Unmanaged::windowEvent(XEvent* e)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return false; // don't eat events, even our own unmanaged widgets are tracked
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class Unmanaged
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit Unmanaged();
|
||||
bool windowEvent(XEvent* e);
|
||||
bool windowEvent(xcb_generic_event_t *e);
|
||||
void release(bool on_shutdown = false);
|
||||
bool track(Window w);
|
||||
static void deleteUnmanaged(Unmanaged* c);
|
||||
|
|
Loading…
Reference in a new issue