Fullscreen XWayland window can open shell context menu if below native resolution
- Start a Wayland session
- Start a fullscreen X application that uses a resolution lower than the shell
- Try right clicking in the top left corner. There should be no context menu
- Move the cursor to the bottom right, right click again. There now is a gnome-shell context menu.
The context menu starts appearing when right clicking outside of the area corresponding to the resolution of the fullscreen X window.
Here is an example SDL2 application to test this with. Save it as sdl-test.c
and compile with gcc -I/usr/include/SDL2 -D_REENTRANT sdl-test.c -o sdl-test -lSDL2
. Run with env SDL_VIDEODRIVER=x11 ./sdl-test
to ensure the X11 backend is being used.
#include "SDL.h"
int main(int argc, char* argv[]) {
SDL_Window *window;
SDL_Init(SDL_INIT_VIDEO);
window = SDL_CreateWindow("Example", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_FULLSCREEN);
SDL_Delay(3000);
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}