Skip to content

Commit 7b7cd3f

Browse files
sc0wlukefromdc
authored andcommitted
pluma-notebook.c: avoid deprecated 'gdk_window_at_pointer'
1 parent 0bc141e commit 7b7cd3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎pluma/pluma-notebook.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,15 @@ find_notebook_at_pointer (gint abs_x, gint abs_y)
191191
GdkWindow *win_at_pointer;
192192
GdkWindow *toplevel_win;
193193
gpointer toplevel = NULL;
194+
GdkSeat *seat;
195+
GdkDevice *device;
194196
gint x, y;
195197

196198
/* FIXME multi-head */
197-
win_at_pointer = gdk_window_at_pointer (&x, &y);
199+
seat = gdk_display_get_default_seat (gdk_display_get_default ());
200+
device = gdk_seat_get_pointer (seat);
201+
win_at_pointer = gdk_device_get_window_at_position (device, &x, &y);
202+
198203
if (win_at_pointer == NULL)
199204
{
200205
/* We are outside all windows of the same application */

0 commit comments

Comments
 (0)