Skip to content

Commit 736b2e1

Browse files
committed
layout.js: Fix picking in fullscreen.
1 parent c8ed2ed commit 736b2e1

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

js/ui/layout.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,23 @@ class UiActor extends St.Widget {
6060
}
6161

6262
set_skip_paint(child, skip) {
63+
var skipping = this.skip_paint_actors.has(child);
64+
65+
if (skipping === !!skip) {
66+
return;
67+
}
68+
6369
if (skip) {
6470
this.skip_paint_actors.add(child);
6571
} else {
6672
this.skip_paint_actors.delete(child);
6773
}
74+
75+
this.queue_redraw();
76+
}
77+
78+
get_skip_paint(child) {
79+
return this.skip_paint_actors.has(child);
6880
}
6981

7082
vfunc_get_preferred_width(_forHeight) {
@@ -84,6 +96,18 @@ class UiActor extends St.Widget {
8496
child.paint(context);
8597
}
8698
}
99+
100+
vfunc_pick(context) {
101+
super.vfunc_pick(context);
102+
103+
for (let child = this.get_first_child(); child != null; child = child.get_next_sibling()) {
104+
if (this.skip_paint_actors.has(child)) {
105+
continue;
106+
}
107+
108+
child.pick(context);
109+
}
110+
}
87111
});
88112

89113
/**
@@ -768,7 +792,8 @@ Chrome.prototype = {
768792

769793
if (wantsInputRegion
770794
&& actorData.affectsInputRegion
771-
&& actorData.actor.get_paint_visibility()) {
795+
&& actorData.actor.get_paint_visibility()
796+
&& !Main.uiGroup.get_skip_paint(actorData.actor)) {
772797

773798
let rect = new Meta.Rectangle({ x: x, y: y, width: w, height: h});
774799

0 commit comments

Comments
 (0)