Commit 7e1617c2 authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez Committed by Vlad Zahorodnii
Browse files

[x11] Implement _GTK_SHOW_WINDOW_MENU.

BUG: 454756
parent fefd7302
Pipeline #190809 passed with stage
in 14 minutes and 9 seconds
......@@ -100,7 +100,8 @@ RootInfo *RootInfo::create()
| NET::WM2FullscreenMonitors
| NET::WM2KDEShadow
| NET::WM2OpaqueRegion
| NET::WM2GTKFrameExtents;
| NET::WM2GTKFrameExtents
| NET::WM2GTKShowWindowMenu;
properties2 |= NET::WM2Activities;
......@@ -216,6 +217,14 @@ void RootInfo::moveResizeWindow(xcb_window_t w, int flags, int x, int y, int wid
void RootInfo::showWindowMenu(xcb_window_t w, int device_id, int x_root, int y_root)
if (X11Window *c = Workspace::self()->findClient(Predicate::WindowMatch, w)) {
c->GTKShowWindowMenu(x_root, y_root);
void RootInfo::gotPing(xcb_window_t w, xcb_timestamp_t timestamp)
if (X11Window *c = Workspace::self()->findClient(Predicate::WindowMatch, w)) {
......@@ -42,6 +42,7 @@ protected:
void closeWindow(xcb_window_t w) override;
void moveResize(xcb_window_t w, int x_root, int y_root, unsigned long direction) override;
void moveResizeWindow(xcb_window_t w, int flags, int x, int y, int width, int height) override;
void showWindowMenu(xcb_window_t w, int device_id, int x_root, int y_root) override;
void gotPing(xcb_window_t w, xcb_timestamp_t timestamp) override;
void restackWindow(xcb_window_t w, RequestSource source, xcb_window_t above, int detail, xcb_timestamp_t timestamp) override;
void changeShowingDesktop(bool showing) override;
......@@ -4077,6 +4077,13 @@ void X11Window::NETMoveResizeWindow(int flags, int x, int y, int width, int heig
configureRequest(value_mask, x, y, width, height, gravity, true);
void X11Window::GTKShowWindowMenu(int x_root, int y_root)
QPoint globalPos(x_root, y_root);
workspace()->showWindowMenu(QRect(globalPos, globalPos), this);
bool X11Window::isMovable() const
if (!hasNETSupport() && !m_motif.move()) {
......@@ -236,6 +236,7 @@ public:
void NETMoveResize(int x_root, int y_root, NET::Direction direction);
void NETMoveResizeWindow(int flags, int x, int y, int width, int height);
void GTKShowWindowMenu(int x_root, int y_root);
void restackWindow(xcb_window_t above, int detail, NET::RequestSource source, xcb_timestamp_t timestamp,
bool send_event = false);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment