Skip to content

Commit 78a33ef

Browse files
committed
Correctly unset x11 pass through
1 parent 52f7a16 commit 78a33ef

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

lib/Utils.vala

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,6 @@ namespace Gala {
404404
return texture;
405405
}
406406

407-
private static HashTable<Meta.Window, X.XserverRegion?> regions = new HashTable<Meta.Window, X.XserverRegion?> (null, null);
408-
409407
public static void x11_set_window_pass_through (Meta.Window window) {
410408
unowned var x11_display = window.display.get_x11_display ();
411409

@@ -416,10 +414,7 @@ namespace Gala {
416414
#endif
417415
unowned var xdisplay = x11_display.get_xdisplay ();
418416

419-
regions[window] = X.Fixes.create_region_from_window (xdisplay, x_window, 0);
420-
421417
X.Xrectangle rect = {};
422-
423418
var region = X.Fixes.create_region (xdisplay, {rect});
424419

425420
X.Fixes.set_window_shape_region (xdisplay, x_window, 2, 0, 0, region);
@@ -437,16 +432,7 @@ namespace Gala {
437432
#endif
438433
unowned var xdisplay = x11_display.get_xdisplay ();
439434

440-
var region = regions[window];
441-
442-
if (region == null) {
443-
return;
444-
}
445-
446-
X.Fixes.set_window_shape_region (xdisplay, x_window, 2, 0, 0, region);
447-
448-
regions.remove (window);
449-
X.Fixes.destroy_region (xdisplay, region);
435+
X.Fixes.set_window_shape_region (xdisplay, x_window, 2, 0, 0, (X.XserverRegion) 0);
450436
}
451437

452438
/**

0 commit comments

Comments
 (0)