Applied rdesktop part of patch:

[ 1715359 ] seamlessrdp topmost windows


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1442 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Åstrand 2008-03-06 15:39:21 +00:00
parent 09e3df9353
commit 6718610779
4 changed files with 24 additions and 1 deletions

View File

@ -425,6 +425,7 @@ enum RDP_INPUT_DEVICE
#define SEAMLESSRDP_POSITION_TIMER 200000
#define SEAMLESSRDP_CREATE_MODAL 0x0001
#define SEAMLESSRDP_CREATE_TOPMOST 0x0002
#define SEAMLESSRDP_HELLO_RECONNECT 0x0001
#define SEAMLESSRDP_HELLO_HIDDEN 0x0002

View File

@ -36,7 +36,7 @@ extern Display *g_display;
static Atom g_net_wm_state_maximized_vert_atom, g_net_wm_state_maximized_horz_atom,
g_net_wm_state_hidden_atom, g_net_wm_name_atom, g_utf8_string_atom,
g_net_wm_state_skip_taskbar_atom, g_net_wm_state_skip_pager_atom,
g_net_wm_state_modal_atom, g_net_wm_icon_atom;
g_net_wm_state_modal_atom, g_net_wm_icon_atom, g_net_wm_state_above_atom;
Atom g_net_wm_state_atom, g_net_wm_desktop_atom;
@ -186,6 +186,7 @@ ewmh_init()
XInternAtom(g_display, "_NET_WM_STATE_SKIP_TASKBAR", False);
g_net_wm_state_skip_pager_atom = XInternAtom(g_display, "_NET_WM_STATE_SKIP_PAGER", False);
g_net_wm_state_modal_atom = XInternAtom(g_display, "_NET_WM_STATE_MODAL", False);
g_net_wm_state_above_atom = XInternAtom(g_display, "_NET_WM_STATE_ABOVE", False);
g_net_wm_state_atom = XInternAtom(g_display, "_NET_WM_STATE", False);
g_net_wm_desktop_atom = XInternAtom(g_display, "_NET_WM_DESKTOP", False);
g_net_wm_name_atom = XInternAtom(g_display, "_NET_WM_NAME", False);
@ -533,6 +534,14 @@ ewmh_del_icon(Window wnd, int width, int height)
XFree(cur_set);
}
int
ewmh_set_window_above(Window wnd)
{
if (ewmh_modify_state(wnd, 1, g_net_wm_state_above_atom, 0) < 0)
return -1;
return 0;
}
#endif /* MAKE_PROTO */

View File

@ -11,3 +11,4 @@ int ewmh_set_window_popup(Window wnd);
int ewmh_set_window_modal(Window wnd);
void ewmh_set_icon(Window wnd, int width, int height, const char *rgba_data);
void ewmh_del_icon(Window wnd, int width, int height);
int ewmh_set_window_above(Window wnd);

12
xwin.c
View File

@ -3452,6 +3452,12 @@ ui_seamless_create_window(unsigned long id, unsigned long group, unsigned long p
ewmh_set_window_modal(wnd);
}
if (flags & SEAMLESSRDP_CREATE_TOPMOST)
{
/* Make window always-on-top */
ewmh_set_window_above(wnd);
}
/* FIXME: Support for Input Context:s */
get_input_mask(&input_mask);
@ -3706,6 +3712,12 @@ ui_seamless_restack_window(unsigned long id, unsigned long behind, unsigned long
}
sw_restack_window(sw, behind);
if (flags & SEAMLESSRDP_CREATE_TOPMOST)
{
/* Make window always-on-top */
ewmh_set_window_above(sw->wnd);
}
}