From de51683b8545c98569c179ba99c64274033d1189 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 21 Aug 2015 16:07:33 +0200 Subject: Fixing hmm and similar functions --- Linux_C_12/cpicture_121.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'Linux_C_12/cpicture_121.c') diff --git a/Linux_C_12/cpicture_121.c b/Linux_C_12/cpicture_121.c index bc95fbf..68f19e5 100644 --- a/Linux_C_12/cpicture_121.c +++ b/Linux_C_12/cpicture_121.c @@ -1823,27 +1823,7 @@ void WinSetFontStyle (gint style, GdkDrawable *inDraw, OS ios, gint WinGetVertResolution (void) { - static gint res = 0; - printf("WinGetVertResolution\n"); - - InitGTK(); - - if (res == 0) - { - GdkScreen* screen; - GdkWindow* window; - GdkRectangle rect; - - InitGTK(); - screen = gdk_screen_get_default(); - window = gdk_screen_get_root_window(screen); - gdk_window_get_frame_extents(window, &rect); - - res = rect.height; - g_object_unref(window); - } - - return res; + return WinGetHorzResolution(); } gint WinGetHorzResolution (void) @@ -1856,15 +1836,9 @@ gint WinGetHorzResolution (void) if (res == 0) { GdkScreen* screen; - GdkWindow* window; - GdkRectangle rect; screen = gdk_screen_get_default(); - window = gdk_screen_get_root_window(screen); - gdk_window_get_frame_extents(window, &rect); - - res = rect.width; - g_object_unref(window); + res = (gint) gdk_screen_get_resolution(screen); } return res; -- cgit v1.2.3