Skip to content

Commit 0799551

Browse files
committed
Complete the port to Gtk+ 3
1 parent cd105ef commit 0799551

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/locker.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2412,9 +2412,14 @@ static void _locker_on_realize(GtkWidget * widget, gpointer data)
24122412
if(widget == locker->windows[primary])
24132413
{
24142414
window = gtk_widget_get_window(widget);
2415+
visual = gdk_window_get_visual(window);
2416+
#if GTK_CHECK_VERSION(3, 0, 0)
2417+
gdk_window_get_geometry(window, &x, &y, &width, &height);
2418+
depth = gdk_visual_get_depth(visual);
2419+
#else
24152420
gdk_window_get_geometry(window, &x, &y, &width, &height,
24162421
&depth);
2417-
visual = gdk_window_get_visual(window);
2422+
#endif
24182423
XScreenSaverSetAttributes(GDK_DISPLAY_XDISPLAY(locker->display),
24192424
GDK_WINDOW_XID(window), x, y, width, height, 0,
24202425
depth, 0, GDK_VISUAL_XVISUAL(visual), 0, NULL);

0 commit comments

Comments
 (0)