[Development] Print Screen does not work with Qt context menus

Thiago Macieira thiago.macieira at intel.com
Wed Oct 19 17:50:24 CEST 2022


On Wednesday, 19 October 2022 00:30:30 PDT Laszlo Papp wrote:
> Hi,
> 
> I have just written a simple test case that demonstrates the issue:
> 
> https://github.com/lpapp/examples/tree/main/qt-context-menu
> 
> If you bring up the context menu by pressing the right mouse button, and
> then you try to press the Print Screen button on your keyboard on Linux, it
> gets ignored. But I can take a screenshot fine using the Print Screen
> button of the keyboard when launching the application and it is without
> context menu.

Welcome to X11.

Menus work by grabbing the keyboard and mouse exclusively so they can be 
dismissed if you click outside of it or press any key. That means the menu is 
eating the Print Screen button.

To screenshot a menu, configure your screenshot application to trigger on a 
time delay and then open the menu.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering





More information about the Development mailing list