[RFC/PATCH] Report relative screen positions as the root window origins

Aaron Plattner aplattner at nvidia.com
Wed Jun 10 13:18:41 PDT 2009


This allows X configurator programs to determine where the screens are so that
they can create a reasonably similar layout.

I'm a little concerned that this might break some app, but so far I haven't
found any.

$ xwininfo -root

xwininfo: Window id: 0x257 (the root window) (has no name)

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  2560   <----
  Relative upper-left Y:  0
  Width: 1024
  Height: 1280
  Depth: 24
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x138 (installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+0  -0+0  -0-0  +0-0
  -geometry 1024x1280+0+0
---
 dix/window.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/window.c b/dix/window.c
index 99b594b..dab57df 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -409,7 +409,7 @@ CreateRootWindow(ScreenPtr pScreen)
 
     pWin->drawable.id = FakeClientID(0);
 
-    pWin->origin.x = pWin->origin.y = 0;
+    pWin->origin = dixScreenOrigins[pScreen->myNum];
     pWin->drawable.height = pScreen->height;
     pWin->drawable.width = pScreen->width;
     pWin->drawable.x = pWin->drawable.y = 0;
-- 
1.6.0.4



More information about the xorg-devel mailing list