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;
|
return true;
|
||||||
}
|
}
|
||||||
#if KWIN_QT5_PORTING
|
case XCB_MAP_NOTIFY: {
|
||||||
case MapNotify: {
|
const auto *event = reinterpret_cast<xcb_map_notify_event_t*>(e);
|
||||||
if (e->xmap.override_redirect) {
|
if (event->override_redirect) {
|
||||||
Unmanaged* c = findUnmanaged(WindowMatchPredicate(e->xmap.window));
|
Unmanaged* c = findUnmanaged(WindowMatchPredicate(event->window));
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
c = createUnmanaged(e->xmap.window);
|
c = createUnmanaged(event->window);
|
||||||
if (c)
|
if (c)
|
||||||
return c->windowEvent(e);
|
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: {
|
case EnterNotify: {
|
||||||
if (QWhatsThis::inWhatsThisMode()) {
|
if (QWhatsThis::inWhatsThisMode()) {
|
||||||
QWidget* w = QWidget::find(e->xcrossing.window);
|
QWidget* w = QWidget::find(e->xcrossing.window);
|
||||||
|
@ -1496,8 +1497,9 @@ void Client::syncEvent(XSyncAlarmNotifyEvent* e)
|
||||||
// Unmanaged
|
// Unmanaged
|
||||||
// ****************************************
|
// ****************************************
|
||||||
|
|
||||||
bool Unmanaged::windowEvent(XEvent* e)
|
bool Unmanaged::windowEvent(xcb_generic_event_t *e)
|
||||||
{
|
{
|
||||||
|
#if KWIN_QT5_PORTING
|
||||||
double old_opacity = opacity();
|
double old_opacity = opacity();
|
||||||
unsigned long dirty[ 2 ];
|
unsigned long dirty[ 2 ];
|
||||||
info->event(e, dirty, 2); // pass through the NET stuff
|
info->event(e, dirty, 2); // pass through the NET stuff
|
||||||
|
@ -1533,6 +1535,7 @@ bool Unmanaged::windowEvent(XEvent* e)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return false; // don't eat events, even our own unmanaged widgets are tracked
|
return false; // don't eat events, even our own unmanaged widgets are tracked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Unmanaged
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit Unmanaged();
|
explicit Unmanaged();
|
||||||
bool windowEvent(XEvent* e);
|
bool windowEvent(xcb_generic_event_t *e);
|
||||||
void release(bool on_shutdown = false);
|
void release(bool on_shutdown = false);
|
||||||
bool track(Window w);
|
bool track(Window w);
|
||||||
static void deleteUnmanaged(Unmanaged* c);
|
static void deleteUnmanaged(Unmanaged* c);
|
||||||
|
|
Loading…
Reference in a new issue