🪲 Fix wayland-window picking

This commit is contained in:
Simon Schneegans
2023-05-04 16:33:24 +02:00
parent bffd784221
commit 4f91e0668a
2 changed files with 9 additions and 5 deletions
+1
View File
@@ -12,6 +12,7 @@ SPDX-License-Identifier: CC-BY-4.0
#### Bug Fixes
* Fixed an issue which made windows invisible which did not set the `WM_CLASS` X11 property correctly.
* Fixed an issue which made window-picking of Wayland windows impossible on GNOME 44.
## [Burn My Windows 30](https://github.com/schneegans/Burn-My-Windows/releases/tag/v30)
+8 -5
View File
@@ -57,15 +57,18 @@ var WindowPicker = class WindowPicker {
.filter(e => e.toString().includes('lookingGlass_RedBorderEffect'))
.forEach(e => target.remove_effect(e));
let actor = target;
if (target.toString().includes('MetaSurfaceActor')) {
actor = target.get_parent();
target = target.get_parent();
}
if (target.toString().includes('ContainerActor')) {
target = target.get_parent();
}
let wmClass = 'window-not-found';
if (actor.toString().includes('WindowActor') &&
actor.meta_window.get_wm_class() != '') {
wmClass = actor.meta_window.get_wm_class();
if (target.toString().includes('WindowActor') &&
target.meta_window.get_wm_class() != '') {
wmClass = target.meta_window.get_wm_class();
}
this._dbus.emit_signal('WindowPicked', new GLib.Variant('(s)', [wmClass]));