Change shell_global_get_modifier_keys to shell_global_get_pointer.
We can't use gdk_display_get_pointer/gdk_window_get_pointer from gjs when XKB is active. We already had a wrapper that did the get-modifier-state part of that, but some places also need the get-pointer-location part of it. So update our wrapper to return both, and update js code to use it. https://bugzilla.gnome.org/show_bug.cgi?id=613428
This commit is contained in:
@ -173,7 +173,7 @@ AltTabPopup.prototype = {
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=596695 for
|
||||
// details.) So we check now. (Have to do this after updating
|
||||
// selection.)
|
||||
let mods = global.get_modifier_keys();
|
||||
let [x, y, mods] = global.get_pointer();
|
||||
if (!(mods & Gdk.ModifierType.MOD1_MASK)) {
|
||||
this._finish();
|
||||
return false;
|
||||
|
@ -423,7 +423,7 @@ WindowOverlay.prototype = {
|
||||
},
|
||||
|
||||
show: function() {
|
||||
let [child, x, y, mask] = Gdk.Screen.get_default().get_root_window().get_pointer();
|
||||
let [x, y, mask] = global.get_pointer();
|
||||
let actor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE,
|
||||
x, y);
|
||||
if (actor == this._windowClone.actor) {
|
||||
@ -533,7 +533,7 @@ WindowOverlay.prototype = {
|
||||
|
||||
_idleToggleCloseButton: function() {
|
||||
this._idleToggleCloseId = 0;
|
||||
let [child, x, y, mask] = Gdk.Screen.get_default().get_root_window().get_pointer();
|
||||
let [x, y, mask] = global.get_pointer();
|
||||
let actor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE,
|
||||
x, y);
|
||||
if (actor != this._windowClone.actor && actor != this.closeButton) {
|
||||
@ -1185,8 +1185,7 @@ Workspace.prototype = {
|
||||
if (this._windowIsZooming)
|
||||
return true;
|
||||
|
||||
let [child, x, y, mask] =
|
||||
Gdk.Screen.get_default().get_root_window().get_pointer();
|
||||
let [x, y, mask] = global.get_pointer();
|
||||
let wsWidth = this.actor.width * this.scale;
|
||||
let wsHeight = this.actor.height * this.scale;
|
||||
|
||||
@ -1258,8 +1257,7 @@ Workspace.prototype = {
|
||||
}
|
||||
|
||||
// setup new handler
|
||||
let [child, x, y, mask] =
|
||||
Gdk.Screen.get_default().get_root_window().get_pointer();
|
||||
let [x, y, mask] = global.get_pointer();
|
||||
this._cursorX = x;
|
||||
this._cursorY = y;
|
||||
|
||||
|
Reference in New Issue
Block a user