detect screen resolution as in x11_common.c
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 13 Jun 2004 10:53:06 +0000 (10:53 +0000)
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 13 Jun 2004 10:53:06 +0000 (10:53 +0000)
Patch by Philippe Dumont (dumont (at) lifl (dot) fr)

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@12575 b3059339-0415-0410-9bf9-f77b7e298cf2

Gui/wm/ws.c

index 6f0016d..4a58060 100644 (file)
 #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 @@ wsXDNDInitialize();
   }
   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 );
  }