Skip to content

Commit

Permalink
Complete the port to Gtk+ 3
Browse files Browse the repository at this point in the history
  • Loading branch information
khorben committed Dec 2, 2015
1 parent cd105ef commit 0799551
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/locker.c
Original file line number Diff line number Diff line change
Expand Up @@ -2412,9 +2412,14 @@ static void _locker_on_realize(GtkWidget * widget, gpointer data)
if(widget == locker->windows[primary])
{
window = gtk_widget_get_window(widget);
visual = gdk_window_get_visual(window);
#if GTK_CHECK_VERSION(3, 0, 0)
gdk_window_get_geometry(window, &x, &y, &width, &height);
depth = gdk_visual_get_depth(visual);
#else
gdk_window_get_geometry(window, &x, &y, &width, &height,
&depth);
visual = gdk_window_get_visual(window);
#endif
XScreenSaverSetAttributes(GDK_DISPLAY_XDISPLAY(locker->display),
GDK_WINDOW_XID(window), x, y, width, height, 0,
depth, 0, GDK_VISUAL_XVISUAL(visual), 0, NULL);
Expand Down

0 comments on commit 0799551

Please sign in to comment.