Changeset View
Changeset View
Standalone View
Standalone View
events.cpp
Show First 20 Lines • Show All 320 Lines • ▼ Show 20 Line(s) | 309 | } else if ( true /*|| e->xmaprequest.parent != root */ ) { | |||
---|---|---|---|---|---|
321 | } | 321 | } | ||
322 | } | 322 | } | ||
323 | return true; | 323 | return true; | ||
324 | } | 324 | } | ||
325 | case XCB_MAP_NOTIFY: { | 325 | case XCB_MAP_NOTIFY: { | ||
326 | const auto *event = reinterpret_cast<xcb_map_notify_event_t*>(e); | 326 | const auto *event = reinterpret_cast<xcb_map_notify_event_t*>(e); | ||
327 | if (event->override_redirect) { | 327 | if (event->override_redirect) { | ||
328 | Unmanaged* c = findUnmanaged(event->window); | 328 | Unmanaged* c = findUnmanaged(event->window); | ||
329 | if (c == NULL) | 329 | if (c == nullptr) | ||
330 | c = createUnmanaged(event->window); | 330 | c = createUnmanaged(event->window); | ||
331 | if (c) | 331 | if (c) | ||
332 | return c->windowEvent(e); | 332 | return c->windowEvent(e); | ||
333 | } | 333 | } | ||
334 | return (event->event != event->window); // hide wm typical event from Qt | 334 | return (event->event != event->window); // hide wm typical event from Qt | ||
335 | } | 335 | } | ||
336 | 336 | | |||
337 | case XCB_CONFIGURE_REQUEST: { | 337 | case XCB_CONFIGURE_REQUEST: { | ||
Show All 30 Lines | 366 | if (event->event == rootWindow() | |||
368 | Xcb::CurrentInput currentInput; | 368 | Xcb::CurrentInput currentInput; | ||
369 | updateXTime(); // focusToNull() uses xTime(), which is old now (FocusIn has no timestamp) | 369 | updateXTime(); // focusToNull() uses xTime(), which is old now (FocusIn has no timestamp) | ||
370 | // it seems we can "loose" focus reversions when the closing client hold a grab | 370 | // it seems we can "loose" focus reversions when the closing client hold a grab | ||
371 | // => catch the typical pattern (though we don't want the focus on the root anyway) #348935 | 371 | // => catch the typical pattern (though we don't want the focus on the root anyway) #348935 | ||
372 | const bool lostFocusPointerToRoot = currentInput->focus == rootWindow() && event->detail == XCB_NOTIFY_DETAIL_INFERIOR; | 372 | const bool lostFocusPointerToRoot = currentInput->focus == rootWindow() && event->detail == XCB_NOTIFY_DETAIL_INFERIOR; | ||
373 | if (!currentInput.isNull() && (currentInput->focus == XCB_WINDOW_NONE || currentInput->focus == XCB_INPUT_FOCUS_POINTER_ROOT || lostFocusPointerToRoot)) { | 373 | if (!currentInput.isNull() && (currentInput->focus == XCB_WINDOW_NONE || currentInput->focus == XCB_INPUT_FOCUS_POINTER_ROOT || lostFocusPointerToRoot)) { | ||
374 | //kWarning( 1212 ) << "X focus set to None/PointerRoot, reseting focus" ; | 374 | //kWarning( 1212 ) << "X focus set to None/PointerRoot, reseting focus" ; | ||
375 | AbstractClient *c = mostRecentlyActivatedClient(); | 375 | AbstractClient *c = mostRecentlyActivatedClient(); | ||
376 | if (c != NULL) | 376 | if (c != nullptr) | ||
377 | requestFocus(c, true); | 377 | requestFocus(c, true); | ||
378 | else if (activateNextClient(NULL)) | 378 | else if (activateNextClient(nullptr)) | ||
379 | ; // ok, activated | 379 | ; // ok, activated | ||
380 | else | 380 | else | ||
381 | focusToNull(); | 381 | focusToNull(); | ||
382 | } | 382 | } | ||
383 | } | 383 | } | ||
384 | } | 384 | } | ||
385 | // fall through | 385 | // fall through | ||
386 | case XCB_FOCUS_OUT: | 386 | case XCB_FOCUS_OUT: | ||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 416 | if (findEventWindow(e) == window()) { // avoid doing stuff on frame or wrapper | |||
439 | if ((dirtyProperties2 & NET::WM2StartupId) != 0) | 439 | if ((dirtyProperties2 & NET::WM2StartupId) != 0) | ||
440 | startupIdChanged(); | 440 | startupIdChanged(); | ||
441 | if (dirtyProperties2 & NET::WM2Opacity) { | 441 | if (dirtyProperties2 & NET::WM2Opacity) { | ||
442 | if (compositing()) { | 442 | if (compositing()) { | ||
443 | addRepaintFull(); | 443 | addRepaintFull(); | ||
444 | emit opacityChanged(this, old_opacity); | 444 | emit opacityChanged(this, old_opacity); | ||
445 | } else { | 445 | } else { | ||
446 | // forward to the frame if there's possibly another compositing manager running | 446 | // forward to the frame if there's possibly another compositing manager running | ||
447 | NETWinInfo i(connection(), frameId(), rootWindow(), 0, 0); | 447 | NETWinInfo i(connection(), frameId(), rootWindow(), nullptr, nullptr); | ||
448 | i.setOpacity(info->opacity()); | 448 | i.setOpacity(info->opacity()); | ||
449 | } | 449 | } | ||
450 | } | 450 | } | ||
451 | if (dirtyProperties2 & NET::WM2FrameOverlap) { | 451 | if (dirtyProperties2 & NET::WM2FrameOverlap) { | ||
452 | // ### Inform the decoration | 452 | // ### Inform the decoration | ||
453 | } | 453 | } | ||
454 | if (dirtyProperties2.testFlag(NET::WM2WindowRole)) { | 454 | if (dirtyProperties2.testFlag(NET::WM2WindowRole)) { | ||
455 | emit windowRoleChanged(); | 455 | emit windowRoleChanged(); | ||
▲ Show 20 Lines • Show All 360 Lines • ▼ Show 20 Line(s) | 808 | if (lostMouse) { | |||
816 | } | 816 | } | ||
817 | if (isDecorated()) { | 817 | if (isDecorated()) { | ||
818 | // sending a move instead of a leave. With leave we need to send proper coords, with move it's handled internally | 818 | // sending a move instead of a leave. With leave we need to send proper coords, with move it's handled internally | ||
819 | QHoverEvent leaveEvent(QEvent::HoverMove, QPointF(-1, -1), QPointF(-1, -1), Qt::NoModifier); | 819 | QHoverEvent leaveEvent(QEvent::HoverMove, QPointF(-1, -1), QPointF(-1, -1), Qt::NoModifier); | ||
820 | QCoreApplication::sendEvent(decoration(), &leaveEvent); | 820 | QCoreApplication::sendEvent(decoration(), &leaveEvent); | ||
821 | } | 821 | } | ||
822 | } | 822 | } | ||
823 | if (options->focusPolicy() == Options::FocusStrictlyUnderMouse && isActive() && lostMouse) { | 823 | if (options->focusPolicy() == Options::FocusStrictlyUnderMouse && isActive() && lostMouse) { | ||
824 | workspace()->requestDelayFocus(0); | 824 | workspace()->requestDelayFocus(nullptr); | ||
825 | } | 825 | } | ||
826 | return; | 826 | return; | ||
827 | } | 827 | } | ||
828 | } | 828 | } | ||
829 | 829 | | |||
830 | #define XCapL KKeyServer::modXLock() | 830 | #define XCapL KKeyServer::modXLock() | ||
831 | #define XNumL KKeyServer::modXNumLock() | 831 | #define XNumL KKeyServer::modXNumLock() | ||
832 | #define XScrL KKeyServer::modXScrollLock() | 832 | #define XScrL KKeyServer::modXScrollLock() | ||
▲ Show 20 Lines • Show All 513 Lines • Show Last 20 Lines |