Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix window overview #2181

Merged
merged 3 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading