mirror of
https://github.com/elementary/gala.git
synced 2024-08-16 18:40:27 +03:00
Daemon: Workaround broken window menu for some apps (#1574)
Co-authored-by: Ryan Kornheisl <ryan@skarva.tech>
This commit is contained in:
parent
ac73dfe017
commit
4c78a15883
@ -276,14 +276,21 @@ namespace Gala {
|
|||||||
close_accellabel.accel_string = keybind_settings.get_strv ("close")[0];
|
close_accellabel.accel_string = keybind_settings.get_strv ("close")[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
window_menu.popup (null, null, (m, ref px, ref py, out push_in) => {
|
// `opened` is used as workaround for https://github.com/elementary/gala/issues/1387
|
||||||
var scale = m.scale_factor;
|
var opened = false;
|
||||||
px = x / scale;
|
Idle.add (() => {
|
||||||
// Move the menu 1 pixel outside of the pointer or else it closes instantly
|
window_menu.popup (null, null, (m, ref px, ref py, out push_in) => {
|
||||||
// on the mouse up event
|
var scale = m.scale_factor;
|
||||||
py = (y / scale) + 1;
|
px = x / scale;
|
||||||
push_in = true;
|
// Move the menu 1 pixel outside of the pointer or else it closes instantly
|
||||||
}, 3, Gdk.CURRENT_TIME);
|
// on the mouse up event
|
||||||
|
py = (y / scale) + 1;
|
||||||
|
push_in = true;
|
||||||
|
opened = true;
|
||||||
|
}, Gdk.BUTTON_SECONDARY, Gdk.CURRENT_TIME);
|
||||||
|
|
||||||
|
return opened ? Source.REMOVE : Source.CONTINUE;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show_desktop_menu (int x, int y) throws DBusError, IOError {
|
public void show_desktop_menu (int x, int y) throws DBusError, IOError {
|
||||||
@ -354,7 +361,7 @@ namespace Gala {
|
|||||||
// on the mouse up event
|
// on the mouse up event
|
||||||
py = (y / scale) + 1;
|
py = (y / scale) + 1;
|
||||||
push_in = false;
|
push_in = false;
|
||||||
}, 3, Gdk.CURRENT_TIME);
|
}, Gdk.BUTTON_SECONDARY, Gdk.CURRENT_TIME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
<issues>
|
<issues>
|
||||||
<issue url="https://github.com/elementary/gala/issues/913">Holding on keyboard shortcut to activate the action only once</issue>
|
<issue url="https://github.com/elementary/gala/issues/913">Holding on keyboard shortcut to activate the action only once</issue>
|
||||||
<issue url="https://github.com/elementary/gala/issues/1229">Notification bubble appears in wrong corner on one workspace</issue>
|
<issue url="https://github.com/elementary/gala/issues/1229">Notification bubble appears in wrong corner on one workspace</issue>
|
||||||
|
<issue url="https://github.com/elementary/gala/issues/1347">Parity between right-clicking titlebars/headerbars on mouse and touchpad</issue>
|
||||||
|
<issue url="https://github.com/elementary/gala/issues/1387">Window menu sluggish/inoperative for apps with flathub origin</issue>
|
||||||
<issue url="https://github.com/elementary/gala/issues/1578">Closing a window in multitasking view closes multitasking view</issue>
|
<issue url="https://github.com/elementary/gala/issues/1578">Closing a window in multitasking view closes multitasking view</issue>
|
||||||
<issue url="https://github.com/elementary/gala/issues/1584">When 2 windows are tiled and then resized, the inactive one gets glitched, leaving its full-sized picture as an artifact when minimized</issue>
|
<issue url="https://github.com/elementary/gala/issues/1584">When 2 windows are tiled and then resized, the inactive one gets glitched, leaving its full-sized picture as an artifact when minimized</issue>
|
||||||
</issues>
|
</issues>
|
||||||
|
Loading…
Reference in New Issue
Block a user