Permalink
Browse files

Remove use of deprecated gtk_window_get_pointer

  • Loading branch information...
CristianHenzel committed Jun 30, 2018
1 parent 3d294b1 commit d6fab2be79b2fc8319b492a1a834300df64e4db8
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/daemon.c
View
@@ -53,7 +53,17 @@ static void daemon_check()
{
/* Get the button state to check if the mouse button is being held */
GdkModifierType button_state;
gdk_window_get_pointer(NULL, NULL, NULL, &button_state);
GdkScreen *screen = gdk_screen_get_default();
if (screen)
{
GdkDisplay *display = gdk_screen_get_display(screen);
GdkWindow *window = gdk_screen_get_root_window(screen);
GdkSeat *seat = gdk_display_get_default_seat(display);
gdk_window_get_device_position(window, gdk_seat_get_pointer(seat), NULL,
NULL, &button_state);
}
if ((primary_temp != NULL) && !(button_state & GDK_BUTTON1_MASK))
{
g_free(primary_text);

0 comments on commit d6fab2b

Please sign in to comment.