Changeset View
Changeset View
Standalone View
Standalone View
src/PlatformBackends/X11ImageGrabber.cpp
Show First 20 Lines • Show All 745 Lines • ▼ Show 20 Line(s) | 743 | { | |||
---|---|---|---|---|---|
746 | // device-independent pixels while the origin itself uses native pixels. | 746 | // device-independent pixels while the origin itself uses native pixels. | ||
747 | 747 | | |||
748 | xcb_connection_t *xcbConn = QX11Info::connection(); | 748 | xcb_connection_t *xcbConn = QX11Info::connection(); | ||
749 | xcb_query_pointer_cookie_t pointerCookie = xcb_query_pointer_unchecked(xcbConn, QX11Info::appRootWindow()); | 749 | xcb_query_pointer_cookie_t pointerCookie = xcb_query_pointer_unchecked(xcbConn, QX11Info::appRootWindow()); | ||
750 | CScopedPointer<xcb_query_pointer_reply_t> pointerReply(xcb_query_pointer_reply(xcbConn, pointerCookie, nullptr)); | 750 | CScopedPointer<xcb_query_pointer_reply_t> pointerReply(xcb_query_pointer_reply(xcbConn, pointerCookie, nullptr)); | ||
751 | 751 | | |||
752 | return QPoint(pointerReply->root_x, pointerReply->root_y); | 752 | return QPoint(pointerReply->root_x, pointerReply->root_y); | ||
753 | } | 753 | } | ||
754 | | ||||
755 | QVector<ImageGrabber::GrabMode> X11ImageGrabber::supportedModes() const | ||||
756 | { | ||||
757 | if (QApplication::screens().count() == 1) { | ||||
758 | return {FullScreen, ActiveWindow, WindowUnderCursor, TransientWithParent, RectangularRegion}; | ||||
759 | } | ||||
760 | | ||||
761 | return {FullScreen, CurrentScreen, ActiveWindow, WindowUnderCursor, TransientWithParent, RectangularRegion}; | ||||
762 | } |