[shotwell] Remove deprecated gdk_display_get_device_manager
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Remove deprecated gdk_display_get_device_manager
- Date: Sat, 31 Mar 2018 20:03:42 +0000 (UTC)
commit eae3fa56c5e16447606e48dd587f55a976f2b922
Author: Jens Georg <mail jensge org>
Date: Fri Mar 30 17:01:50 2018 +0200
Remove deprecated gdk_display_get_device_manager
src/AppWindow.vala | 8 ++++----
src/Page.vala | 10 +++++-----
src/library/LibraryWindow.vala | 6 +++---
src/sidebar/Tree.vala | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/AppWindow.vala b/src/AppWindow.vala
index 88a7934..a2d8681 100644
--- a/src/AppWindow.vala
+++ b/src/AppWindow.vala
@@ -191,15 +191,15 @@ public class FullscreenWindow : PageWindow {
}
private bool is_pointer_in_toolbar() {
- Gdk.DeviceManager? devmgr = get_display().get_device_manager();
- if (devmgr == null) {
- debug("No device manager for display");
+ var seat = get_display().get_default_seat();
+ if (seat == null) {
+ debug("No seat for display");
return false;
}
int py;
- devmgr.get_client_pointer().get_position(null, null, out py);
+ seat.get_pointer().get_position(null, null, out py);
int wy;
toolbar.get_window().get_geometry(null, out wy, null, null);
diff --git a/src/Page.vala b/src/Page.vala
index 05ad483..14875f0 100644
--- a/src/Page.vala
+++ b/src/Page.vala
@@ -414,9 +414,9 @@ public abstract class Page : Gtk.ScrolledWindow {
int x, y;
Gdk.ModifierType mask;
- AppWindow.get_instance().get_window().get_device_position(Gdk.Display.get_default().
- get_device_manager().get_client_pointer(), out x, out y, out mask);
-
+ var seat = Gdk.Display.get_default().get_default_seat();
+ AppWindow.get_instance().get_window().get_device_position(seat.get_pointer(), out x, out y, out
mask);
+
ctrl = (mask & Gdk.ModifierType.CONTROL_MASK) != 0;
alt = (mask & Gdk.ModifierType.MOD1_MASK) != 0;
shift = (mask & Gdk.ModifierType.SHIFT_MASK) != 0;
@@ -675,8 +675,8 @@ public abstract class Page : Gtk.ScrolledWindow {
return false;
}
- event_source.get_window().get_device_position(Gdk.Display.get_default().get_device_manager()
- .get_client_pointer(), out x, out y, out mask);
+ var seat = Gdk.Display.get_default().get_default_seat();
+ event_source.get_window().get_device_position(seat.get_pointer(), out x, out y, out mask);
if (last_down.x < 0 || last_down.y < 0)
return true;
diff --git a/src/library/LibraryWindow.vala b/src/library/LibraryWindow.vala
index 47a0ad9..b83b7d8 100644
--- a/src/library/LibraryWindow.vala
+++ b/src/library/LibraryWindow.vala
@@ -809,9 +809,9 @@ public class LibraryWindow : AppWindow {
private Gdk.DragAction get_drag_action() {
Gdk.ModifierType mask;
-
- get_window().get_device_position(Gdk.Display.get_default().get_device_manager()
- .get_client_pointer(), null, null, out mask);
+
+ var seat = Gdk.Display.get_default().get_default_seat();
+ get_window().get_device_position(seat.get_pointer(), null, null, out mask);
bool ctrl = (mask & Gdk.ModifierType.CONTROL_MASK) != 0;
bool alt = (mask & Gdk.ModifierType.MOD1_MASK) != 0;
diff --git a/src/sidebar/Tree.vala b/src/sidebar/Tree.vala
index f63c916..1720cb4 100644
--- a/src/sidebar/Tree.vala
+++ b/src/sidebar/Tree.vala
@@ -811,8 +811,8 @@ public class Sidebar.Tree : Gtk.TreeView {
private Gtk.TreePath? get_path_from_event(Gdk.EventButton event) {
int x, y;
Gdk.ModifierType mask;
- event.window.get_device_position(Gdk.Display.get_default().get_device_manager().
- get_client_pointer(), out x, out y, out mask);
+ var seat = event.get_seat();
+ event.window.get_device_position(seat.get_pointer(), out x, out y, out mask);
int cell_x, cell_y;
Gtk.TreePath path;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]