32 |
extern BOOL hide_decorations; |
extern BOOL hide_decorations; |
33 |
extern char title[]; |
extern char title[]; |
34 |
extern int server_bpp; |
extern int server_bpp; |
35 |
|
extern int win_button_size; |
36 |
BOOL enable_compose = False; |
BOOL enable_compose = False; |
37 |
BOOL focused; |
BOOL focused; |
38 |
BOOL mouse_in_wnd; |
BOOL mouse_in_wnd; |
855 |
if (button == 0) |
if (button == 0) |
856 |
break; |
break; |
857 |
|
|
858 |
|
/* If win_button_size is nonzero, enable single app mode */ |
859 |
|
if (xevent.xbutton.y < win_button_size) |
860 |
|
{ |
861 |
|
if (xevent.xbutton.x < win_button_size) |
862 |
|
{ |
863 |
|
/* The system menu, do not send to server */ |
864 |
|
break; |
865 |
|
} |
866 |
|
else if (xevent.xbutton.x >= width - win_button_size) |
867 |
|
{ |
868 |
|
/* The close button, continue */ |
869 |
|
; |
870 |
|
} |
871 |
|
else if (xevent.xbutton.x >= width - win_button_size * 2) |
872 |
|
{ |
873 |
|
/* The maximize/restore button. Do not send to |
874 |
|
server. It might be a good idea to change the |
875 |
|
cursor or give some other visible indication |
876 |
|
that rdesktop inhibited this click */ |
877 |
|
break; |
878 |
|
} |
879 |
|
else if (xevent.xbutton.x >= width - win_button_size * 3) |
880 |
|
{ |
881 |
|
/* The minimize button. Iconify window. */ |
882 |
|
XIconifyWindow(display, wnd, |
883 |
|
DefaultScreen(display)); |
884 |
|
break; |
885 |
|
} |
886 |
|
} |
887 |
|
|
888 |
rdp_send_input(time(NULL), RDP_INPUT_MOUSE, |
rdp_send_input(time(NULL), RDP_INPUT_MOUSE, |
889 |
flags | button, xevent.xbutton.x, xevent.xbutton.y); |
flags | button, xevent.xbutton.x, xevent.xbutton.y); |
890 |
break; |
break; |