--- sourceforge.net/trunk/rdesktop/xwin.c 2002/11/18 15:37:20 262 +++ sourceforge.net/trunk/rdesktop/xwin.c 2002/11/19 14:45:13 274 @@ -298,6 +298,21 @@ host_be = !(BOOL) (*(uint8 *) (&test)); xserver_be = (ImageByteOrder(display) == MSBFirst); + if ((width == 0) || (height == 0)) + { + /* Fetch geometry from _NET_WORKAREA */ + uint32 xpos, ypos; + + if (get_current_workarea(&xpos, &ypos, &width, &height) < 0) + { + error("Failed to get workarea.\n"); + error("Perhaps your window manager does not support EWMH?\n"); + error("Defaulting to geometry 800x600\n"); + width = 800; + height = 600; + } + } + if (fullscreen) { width = WidthOfScreen(screen); @@ -1175,7 +1190,7 @@ else { error("this shouldn't be happening\n"); - break; + exit(1); } /* this will move pointer from start to first character after FF command */ length -= i + 3;