Skip to content

Commit 7132bfd

Browse files
authored
Merge branch 'main' into lenemter/filter-wm-perform-action
2 parents b7b2236 + ba69d2f commit 7132bfd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

data/gala.metainfo.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
</ul>
3737
</description>
3838
<issues>
39+
<issue url="https://github.com/elementary/gala/issues/2746">6th and 13th key press of Alt+Tab have a bug</issue>
3940
<issue url="https://github.com/elementary/gala/issues/2657">Window icons missing in the Show All Windows overview</issue>
4041
<issue url="https://github.com/elementary/gala/issues/2675">Blur behind modal shell protocol</issue>
4142
<issue url="https://github.com/elementary/gala/issues/2676">Window selection from dock overview doesn't focus the chosen window</issue>

src/Widgets/WindowSwitcher/WindowSwitcher.vala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class Gala.WindowSwitcher : CanvasActor, GestureTarget, RootTarget {
2626
private Gala.Text caption;
2727
private ShadowEffect shadow_effect;
2828
private BackgroundBlurEffect blur_effect;
29+
private int previous_icon_index = 0;
2930

3031
private WindowSwitcherIcon? _current_icon = null;
3132
private WindowSwitcherIcon? current_icon {
@@ -48,8 +49,6 @@ public class Gala.WindowSwitcher : CanvasActor, GestureTarget, RootTarget {
4849
}
4950
}
5051

51-
private double previous_progress = 0d;
52-
5352
public WindowSwitcher (WindowManager wm) {
5453
Object (wm: wm);
5554
}
@@ -225,16 +224,17 @@ public class Gala.WindowSwitcher : CanvasActor, GestureTarget, RootTarget {
225224
return;
226225
}
227226

228-
var is_step = ((int) (previous_progress / GESTURE_STEP) - (int) (progress / GESTURE_STEP)).abs () >= 1;
227+
var new_index = (int) Math.round (progress / GESTURE_STEP);
228+
var is_step = new_index != previous_icon_index;
229229

230-
previous_progress = progress;
230+
previous_icon_index = new_index;
231231

232232
if (container.get_n_children () == 1 && current_icon != null && is_step) {
233233
InternalUtils.bell_notify (wm.get_display ());
234234
return;
235235
}
236236

237-
var current_index = (int) (progress / GESTURE_STEP) % container.get_n_children ();
237+
var current_index = new_index % container.get_n_children ();
238238

239239
if (current_index < 0) {
240240
current_index = container.get_n_children () + current_index;

0 commit comments

Comments
 (0)