From def2b08c1a4df98984ae2be9c59678b6d5a1e620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C3=85strand?= Date: Fri, 26 Aug 2005 07:01:02 +0000 Subject: [PATCH] Disable moving in single-app mode when window is occupying entire workarea. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@990 423420c4-83ab-492f-b58f-81f9feb106b5 --- xwin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xwin.c b/xwin.c index abfd6f0..74c43d6 100644 --- a/xwin.c +++ b/xwin.c @@ -79,6 +79,7 @@ static Pixmap g_backstore = 0; static BOOL g_moving_wnd; static int g_move_x_offset = 0; static int g_move_y_offset = 0; +static BOOL g_using_full_workarea = False; #ifdef WITH_RDPSND extern int g_dsp_fd; @@ -1091,6 +1092,8 @@ ui_init(void) else if (g_width < 0) { /* Percent of screen */ + if (-g_width >= 100) + g_using_full_workarea = True; g_height = HeightOfScreen(g_screen) * (-g_width) / 100; g_width = WidthOfScreen(g_screen) * (-g_width) / 100; } @@ -1098,6 +1101,7 @@ ui_init(void) { /* Fetch geometry from _NET_WORKAREA */ uint32 x, y, cx, cy; + g_using_full_workarea = True; if (get_current_workarea(&x, &y, &cx, &cy) == 0) { @@ -1398,7 +1402,7 @@ handle_button_event(XEvent xevent, BOOL down) /* The title bar. */ if (xevent.type == ButtonPress) { - if (!g_fullscreen && g_hide_decorations) + if (!g_fullscreen && g_hide_decorations && !g_using_full_workarea) { g_moving_wnd = True; g_move_x_offset = xevent.xbutton.x;