summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grandy <jgrandy@authentic8.com>2013-07-03 10:27:07 -0700
committerJim Grandy <jgrandy@authentic8.com>2013-08-22 12:49:41 -0700
commita32669f3ef8752d952c9d31f55a667581ae93007 (patch)
tree4eaee7a4547ea80f5bb4bc4693d345b7d242c095
parent173ed7056f02e88ae287cd98aac96bab645f0db8 (diff)
downloadxrdp-proprietary-a32669f3ef8752d952c9d31f55a667581ae93007.tar.gz
xrdp-proprietary-a32669f3ef8752d952c9d31f55a667581ae93007.zip
Hand-apply patches (rail) from Authentic8 branch: e94d059 c36dc61
-rw-r--r--sesman/chansrv/rail.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c
index e58a7030..23399a18 100644
--- a/sesman/chansrv/rail.c
+++ b/sesman/chansrv/rail.c
@@ -145,7 +145,7 @@ struct rail_window_data
#define RAIL_EXT_STYLE_DIALOG (0x00040000)
static int APP_CC rail_win_get_state(Window win);
-static int APP_CC rail_create_window(Window window_id, Window parent_id);
+static int APP_CC rail_create_window(Window window_id, Window owner_id);
static int APP_CC rail_win_set_state(Window win, unsigned long state);
static int APP_CC rail_show_window(Window window_id, int show_state);
static int APP_CC rail_win_send_text(Window win);
@@ -538,6 +538,7 @@ rail_process_activate(struct stream *s, int size)
int window_id;
int enabled;
XWindowAttributes window_attributes;
+ Window transient_for = 0;
LOG(10, ("chansrv::rail_process_activate:"));
in_uint32_le(s, window_id);
@@ -553,6 +554,12 @@ rail_process_activate(struct stream *s, int size)
/* In case that window is unmapped upon minimization and not yet mapped*/
XMapWindow(g_display, window_id);
}
+ XGetTransientForHint(g_display, window_id, &transient_for);
+ if (transient_for > 0)
+ {
+ // Owner window should be raised up as well
+ XRaiseWindow(g_display, transient_for);
+ }
LOG(10, ("chansrv::rail_process_activate: calling XRaiseWindow 0x%8.8x", window_id));
XRaiseWindow(g_display, window_id);
LOG(10, ("chansrv::rail_process_activate: calling XSetInputFocus 0x%8.8x", window_id));
@@ -1165,7 +1172,7 @@ rail_show_window(Window window_id, int show_state)
/*****************************************************************************/
static int APP_CC
-rail_create_window(Window window_id, Window parent_id)
+rail_create_window(Window window_id, Window owner_id)
{
int x;
int y;
@@ -1230,7 +1237,7 @@ rail_create_window(Window window_id, Window parent_id)
{
style = RAIL_STYLE_DIALOG;
ext_style = RAIL_EXT_STYLE_DIALOG;
- parent_id = transient_for;
+ owner_id = transient_for;
}
else
{
@@ -1243,7 +1250,7 @@ rail_create_window(Window window_id, Window parent_id)
out_uint32_le(s, 2); /* create_window */
out_uint32_le(s, window_id); /* window_id */
- out_uint32_le(s, parent_id); /* owner_window_id */
+ out_uint32_le(s, owner_id); /* owner_window_id */
flags |= WINDOW_ORDER_FIELD_OWNER;
out_uint32_le(s, style); /* style */
out_uint32_le(s, ext_style); /* extended_style */
@@ -1703,6 +1710,7 @@ rail_xevent(void *xevent)
LOG(10, (" window 0x%8.8x is unmapped", lxevent->xunmap.window));
if (index >= 0)
{
+#if 0
XGetWindowAttributes(g_display, lxevent->xunmap.window, &wnd_attributes);
if (wnd_attributes.override_redirect)
{
@@ -1710,6 +1718,10 @@ rail_xevent(void *xevent)
rail_show_window(lxevent->xunmap.window, 0x0);
rv = 0;
}
+#else
+ rail_show_window(lxevent->xunmap.window, 0x0);
+ rv = 0;
+#endif
}
}
break;