screenshot-window-sizer: Use built-in support for reversed bindings
Mutter has had explicit support for reversed bindings for a while now. Use that, as it's more reliably than examining the modifiers manually. Close https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/467 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/284>
This commit is contained in:
@@ -65,10 +65,7 @@ export default class ScreenshotWindowSizerExtension extends Extension {
|
||||
* @param {Meta.KeyBinding} binding - the key binding
|
||||
*/
|
||||
_cycleScreenshotSizes(display, window, binding) {
|
||||
// Probably this isn't useful with 5 sizes, but you can decrease instead
|
||||
// of increase by holding down shift.
|
||||
let modifiers = binding.get_modifiers();
|
||||
let backwards = (modifiers & Meta.VirtualModifier.SHIFT_MASK) !== 0;
|
||||
const backwards = binding.is_reversed();
|
||||
|
||||
// Unmaximize first
|
||||
if (window.get_maximized() !== 0)
|
||||
|
||||
Reference in New Issue
Block a user