Skip to content

Commit

Permalink
Fix window overview (#2181)
Browse files Browse the repository at this point in the history
Co-authored-by: Leo <[email protected]>
  • Loading branch information
leolost2605 and lenemter authored Dec 19, 2024
1 parent d6a0103 commit 5bb3e80
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Widgets/WindowClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class Gala.WindowClone : Clutter.Actor {
}

public bool overview_mode { get; construct; }
public GestureTracker? gesture_tracker { get; construct; }
public GestureTracker gesture_tracker { get; construct; }
private float _monitor_scale_factor = 1.0f;
public float monitor_scale_factor {
get {
Expand Down Expand Up @@ -94,7 +94,7 @@ public class Gala.WindowClone : Clutter.Actor {
private Clutter.Actor window_icon;
private Tooltip window_title;

public WindowClone (Meta.Display display, Meta.Window window, GestureTracker? gesture_tracker, float scale, bool overview_mode = false) {
public WindowClone (Meta.Display display, Meta.Window window, GestureTracker gesture_tracker, float scale, bool overview_mode = false) {
Object (
display: display,
window: window,
Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/WindowCloneContainer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Gala {
public int padding_bottom { get; set; default = 12; }

public Meta.Display display { get; construct; }
public GestureTracker? gesture_tracker { get; construct; }
public GestureTracker gesture_tracker { get; construct; }
public bool overview_mode { get; construct; }

private float _monitor_scale = 1.0f;
Expand All @@ -53,7 +53,7 @@ namespace Gala {
*/
private unowned WindowClone? current_window = null;

public WindowCloneContainer (Meta.Display display, GestureTracker? gesture_tracker, float scale, bool overview_mode = false) {
public WindowCloneContainer (Meta.Display display, GestureTracker gesture_tracker, float scale, bool overview_mode = false) {
Object (display: display, gesture_tracker: gesture_tracker, monitor_scale: scale, overview_mode: overview_mode);
}

Expand Down
7 changes: 4 additions & 3 deletions src/Widgets/WindowOverview.vala
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ public class Gala.WindowOverview : Clutter.Actor, ActivatableComponent {
private const int BOTTOM_GAP = 100;

public WindowManager wm { get; construct; }
public GestureTracker gesture_tracker { get; construct; } // Currently only used to allow us to use GesturePropertyTransitions

private ModalProxy modal_proxy;
// the workspaces which we expose right now
private List<Meta.Workspace> workspaces;
private WindowCloneContainer window_clone_container;

public WindowOverview (WindowManager wm) {
Object (wm : wm);
public WindowOverview (WindowManager wm, GestureTracker gesture_tracker) {
Object (wm : wm, gesture_tracker: gesture_tracker);
}

construct {
Expand Down Expand Up @@ -123,7 +124,7 @@ public class Gala.WindowOverview : Clutter.Actor, ActivatableComponent {
var geometry = display.get_monitor_geometry (i);
var scale = display.get_monitor_scale (i);

window_clone_container = new WindowCloneContainer (display, null, scale, true) {
window_clone_container = new WindowCloneContainer (display, gesture_tracker, scale, true) {
padding_top = TOP_GAP,
padding_left = BORDER,
padding_right = BORDER,
Expand Down
2 changes: 1 addition & 1 deletion src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ namespace Gala {
if (plugin_manager.window_overview_provider == null
|| (window_overview = (plugin_manager.get_plugin (plugin_manager.window_overview_provider) as ActivatableComponent)) == null
) {
window_overview = new WindowOverview (this);
window_overview = new WindowOverview (this, gesture_tracker);
ui_group.add_child ((Clutter.Actor) window_overview);
}

Expand Down

0 comments on commit 5bb3e80

Please sign in to comment.