Prevent access to sys menu in single app mode
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@330 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
d384c1b539
commit
410c48cf5b
10
xkeymap.c
10
xkeymap.c
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#define XK_MISCELLANY
|
#define XK_MISCELLANY
|
||||||
#include <X11/keysymdef.h>
|
#include <X11/keysym.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -34,6 +34,7 @@
|
|||||||
extern Display *display;
|
extern Display *display;
|
||||||
extern char keymapname[16];
|
extern char keymapname[16];
|
||||||
extern int keylayout;
|
extern int keylayout;
|
||||||
|
extern int win_button_size;
|
||||||
extern BOOL enable_compose;
|
extern BOOL enable_compose;
|
||||||
|
|
||||||
static BOOL keymap_loaded;
|
static BOOL keymap_loaded;
|
||||||
@ -307,6 +308,13 @@ handle_special_keys(uint32 keysym, unsigned int state, uint32 ev_time, BOOL pres
|
|||||||
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LCTRL);
|
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LCTRL);
|
||||||
}
|
}
|
||||||
return True;
|
return True;
|
||||||
|
|
||||||
|
case XK_space:
|
||||||
|
/* Prevent access to the Windows system menu in single app mode */
|
||||||
|
if (win_button_size
|
||||||
|
&& (get_key_state(state, XK_Alt_L) || get_key_state(state, XK_Alt_R)))
|
||||||
|
return True;
|
||||||
|
|
||||||
}
|
}
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
9
xwin.c
9
xwin.c
@ -858,9 +858,14 @@ xwin_process_events(void)
|
|||||||
/* If win_button_size is nonzero, enable single app mode */
|
/* If win_button_size is nonzero, enable single app mode */
|
||||||
if (xevent.xbutton.y < win_button_size)
|
if (xevent.xbutton.y < win_button_size)
|
||||||
{
|
{
|
||||||
if (xevent.xbutton.x >= width - win_button_size)
|
if (xevent.xbutton.x < win_button_size)
|
||||||
{
|
{
|
||||||
/* The close button, do nothing */
|
/* The system menu, do not send to server */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (xevent.xbutton.x >= width - win_button_size)
|
||||||
|
{
|
||||||
|
/* The close button, continue */
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
else if (xevent.xbutton.x >= width - win_button_size * 2)
|
else if (xevent.xbutton.x >= width - win_button_size * 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user