diff options
author | Camil Staps | 2015-08-21 16:07:33 +0200 |
---|---|---|
committer | Camil Staps | 2015-08-21 16:07:33 +0200 |
commit | de51683b8545c98569c179ba99c64274033d1189 (patch) | |
tree | 71b6798d1f055940248bf584803c31d90d187b0f /Linux_C_12/cpicture_121.c | |
parent | Cleaning up (diff) |
Fixing hmm and similar functions
Diffstat (limited to 'Linux_C_12/cpicture_121.c')
-rw-r--r-- | Linux_C_12/cpicture_121.c | 30 |
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;
|