Recognize drag and drop window type

Fixes #166
This commit is contained in:
skyrelia 2025-06-10 00:24:54 -04:00 committed by Shawn Wallace
parent 0b2a139f98
commit ef24bce5d9
2 changed files with 18 additions and 1 deletions

View file

@ -639,7 +639,13 @@ impl XState {
x if x == self.window_atoms.normal || x == self.window_atoms.dialog => {
is_popup = override_redirect;
}
x if x == self.window_atoms.menu || x == self.window_atoms.tooltip => {
x if [
self.window_atoms.menu,
self.window_atoms.tooltip,
self.window_atoms.drag_n_drop,
]
.contains(&x) =>
{
is_popup = true;
}
_ => {
@ -923,6 +929,7 @@ xcb::atoms_struct! {
ty => b"_NET_WM_WINDOW_TYPE" only_if_exists = false,
normal => b"_NET_WM_WINDOW_TYPE_NORMAL" only_if_exists = false,
dialog => b"_NET_WM_WINDOW_TYPE_DIALOG" only_if_exists = false,
drag_n_drop => b"_NET_WM_WINDOW_TYPE_DND" only_if_exists = false,
splash => b"_NET_WM_WINDOW_TYPE_SPLASH" only_if_exists = false,
menu => b"_NET_WM_WINDOW_TYPE_MENU" only_if_exists = false,
utility => b"_NET_WM_WINDOW_TYPE_UTILITY" only_if_exists = false,