Detecting if UTILITY is popup (#323)
Ardour uses UTILITY atom all over the place for toplevel windows: Plugins, Dialogs etc However it does not provide any MOTIF_HINTS at all. WeChat however uses them for popups and also provides MOTIF_HINTS with flags 0x2 indicating that only decorations are active. MaterialMaker also follows what WeChat is doing for right click menus. This fix assigns UTILITY as popup ONLY if MOTIF_HINTS are provided and functions are not active. Couple of apps like Godot mark their windows (_NET_WM_WINDOW_TYPE_UTILITY) with override_redirect which makes them popup by default. Potentionally is_popup can be overriden in case MOTIF functions exists with so no_function_motif would be false. This fix prefers override_redirect in case that scenario comes up. Closes #294
This commit is contained in:
parent
979eab242e
commit
bf738fffbb
4 changed files with 66 additions and 18 deletions
|
|
@ -140,7 +140,7 @@ impl Event for SurfaceEvents {
|
|||
let needs_server_side_decorations = window_data
|
||||
.attrs
|
||||
.decorations
|
||||
.is_none_or(|d| d == Decorations::Server);
|
||||
.is_none_or(|d| d.is_serverside());
|
||||
|
||||
if mode == Mode::ServerSide || !needs_server_side_decorations {
|
||||
let mut role = entity.get::<&mut SurfaceRole>().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue