Skip to content

Commit 40e5681

Browse files
committed
PointerLocator: pass display instead of wm
1 parent 468779f commit 40e5681

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Widgets/PointerLocator.vala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Gala {
2525

2626
private const double BACKGROUND_OPACITY = 0.7;
2727

28-
public weak WindowManager wm { get; construct; }
28+
public Meta.Display display { get; construct; }
2929

3030
private float scaling_factor = 1.0f;
3131
private int surface_width = WIDTH_PX;
@@ -37,8 +37,8 @@ namespace Gala {
3737
private Cairo.Pattern stroke_color;
3838
private Cairo.Pattern fill_color;
3939

40-
public PointerLocator (WindowManager wm) {
41-
Object (wm: wm);
40+
public PointerLocator (Meta.Display display) {
41+
Object (display: display);
4242
}
4343

4444
construct {
@@ -144,7 +144,6 @@ namespace Gala {
144144
stroke_color = new Cairo.Pattern.rgb (rgba.red, rgba.green, rgba.blue);
145145
fill_color = new Cairo.Pattern.rgba (rgba.red, rgba.green, rgba.blue, BACKGROUND_OPACITY);
146146

147-
unowned var display = wm.get_display ();
148147
unowned var tracker = display.get_cursor_tracker ();
149148
Graphene.Point coords = {};
150149
tracker.get_pointer (out coords, null);

src/WindowManager.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ namespace Gala {
337337
notification_group = new Clutter.Actor ();
338338
ui_group.add_child (notification_group);
339339

340-
pointer_locator = new PointerLocator (this);
340+
pointer_locator = new PointerLocator (display);
341341
ui_group.add_child (pointer_locator);
342342
ui_group.add_child (new DwellClickTimer (this));
343343

0 commit comments

Comments
 (0)