diff --git a/src/gtk/display.cpp b/src/gtk/display.cpp index 2ee5d3b95c..2a4112c840 100644 --- a/src/gtk/display.cpp +++ b/src/gtk/display.cpp @@ -327,8 +327,7 @@ wxRect wxDisplayImplGTK::GetClientArea() const int wxDisplayImplGTK::GetDepth() const { - // TODO: How to get the depth of the specific display? - return gdk_visual_get_depth(gdk_window_get_visual(wxGetTopLevelGDK())); + return gdk_visual_get_depth(gdk_screen_get_system_visual(m_screen)); } #if GTK_CHECK_VERSION(3,10,0)