]> git.sesse.net Git - vlc/commitdiff
XCB screen: fix default height/width when x/y specified
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 8 Jun 2009 17:32:00 +0000 (20:32 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 8 Jun 2009 17:32:00 +0000 (20:32 +0300)
modules/access/screen/xcb.c

index ed70c39c0c767cd55961109e8c331610b6a28761..e66f6a3ab9187d94360c652046b96a8e82301221 100644 (file)
@@ -180,10 +180,10 @@ static int Open (vlc_object_t *obj)
     p_sys->y = var_CreateGetInteger (obj, "screen-top");
     p_sys->w = var_CreateGetInteger (obj, "screen-width");
     if (p_sys->w == 0)
-        p_sys->w = geo->width;
+        p_sys->w = geo->width - p_sys->x;
     p_sys->h = var_CreateGetInteger (obj, "screen-height");
     if (p_sys->h == 0)
-        p_sys->h = geo->height;
+        p_sys->h = geo->height - p_sys->y;
 
     uint32_t chroma = 0;
     uint8_t bpp = geo->depth;