aboutsummaryrefslogtreecommitdiff
path: root/Linux_C_12/cpicture_121.c
diff options
context:
space:
mode:
authorCamil Staps2015-08-21 16:07:33 +0200
committerCamil Staps2015-08-21 16:07:33 +0200
commitde51683b8545c98569c179ba99c64274033d1189 (patch)
tree71b6798d1f055940248bf584803c31d90d187b0f /Linux_C_12/cpicture_121.c
parentCleaning up (diff)
Fixing hmm and similar functions
Diffstat (limited to 'Linux_C_12/cpicture_121.c')
-rw-r--r--Linux_C_12/cpicture_121.c30
1 files changed, 2 insertions, 28 deletions
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;