From 282346572d940e4d12528ef254c780f2b88e2b36 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 16 Sep 2012 00:57:39 +0200 Subject: [PATCH] Fix font rendering in GLES. --- gfx/context/xegl_ctx.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gfx/context/xegl_ctx.c b/gfx/context/xegl_ctx.c index 6ba6cbf7b4..7823fc4dda 100644 --- a/gfx/context/xegl_ctx.c +++ b/gfx/context/xegl_ctx.c @@ -182,8 +182,19 @@ void gfx_ctx_get_video_size(unsigned *width, unsigned *height) { if (!g_dpy || g_win == None) { - *width = 0; - *height = 0; + Display *dpy = XOpenDisplay(NULL); + if (dpy) + { + int screen = DefaultScreen(dpy); + *width = DisplayWidth(dpy, screen); + *height = DisplayHeight(dpy, screen); + XCloseDisplay(dpy); + } + else + { + *width = 0; + *height = 0; + } } else {