changeset 12574:39de828ec1cb

detect screen resolution as in x11_common.c Patch by Philippe Dumont (dumont (at) lifl (dot) fr)
author reimar
date Sun, 13 Jun 2004 10:53:06 +0000
parents e14b7c6e9d54
children 7b0be3001d39
files Gui/wm/ws.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/wm/ws.c	Sat Jun 12 17:37:47 2004 +0000
+++ b/Gui/wm/ws.c	Sun Jun 13 10:53:06 2004 +0000
@@ -38,6 +38,10 @@
 #include <X11/extensions/Xinerama.h>
 #endif
 
+#ifdef HAVE_XF86VM
+#include <X11/extensions/xf86vmode.h>
+#endif
+
 #include <sys/ipc.h>
 #include <sys/shm.h>
 
@@ -249,9 +253,21 @@
   }
   else
 #endif
+#ifdef HAVE_XF86VM
+    {
+      int clock;
+      XF86VidModeModeLine modeline;
+
+      XF86VidModeGetModeLine( wsDisplay,wsScreen,&clock ,&modeline );
+      wsMaxX=modeline.hdisplay;
+      wsMaxY=modeline.vdisplay;
+    }
+#endif
  {
  wsOrgX = wsOrgY = 0;
+ if ( !wsMaxX )
  wsMaxX=DisplayWidth( wsDisplay,wsScreen );
+ if ( !wsMaxY )
  wsMaxY=DisplayHeight( wsDisplay,wsScreen );
  }