Comment on global shortcuts security

Bill Spitzak spitzak at
Mon Oct 1 18:24:55 PDT 2012

Rick Stockton wrote:

> IIRC, The Qt/KDE design is the opposite: If they "USED" the key within 
> some level of code (class or interface), then they suck it in and 
> nothing comes back to Weston.

Not quite. There is an "accepted()" field in events, which are passed by 
reference to event handlers. The event handler can set the true or false 
to indicate if they "used" the event.

The top level of Qt, which would be wayland-aware, could then use 
whatever Wayland api there is to report back the accepted field to Wayland.

For historical reasons Qt turns this field on before calling the event 
handler (due to old code that does not turn it on). So if you want to 
say the event is not used, the event handler has to turn it off. This is 
a pain, to be sure.

I'm pretty certain that if Qt was unconcerned with back-compatibility 
they would just make the event handlers return a boolean to indicate if 
the event was used.

More information about the wayland-devel mailing list