warnings when screen size of depth change and backstore resizeing when screen size changes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@707 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
115960e2cb
commit
312035fd20
10
rdp.c
10
rdp.c
@ -651,12 +651,20 @@ rdp_process_bitmap_caps(STREAM s)
|
|||||||
* The server may limit bpp and change the size of the desktop (for
|
* The server may limit bpp and change the size of the desktop (for
|
||||||
* example when shadowing another session).
|
* example when shadowing another session).
|
||||||
*/
|
*/
|
||||||
|
if (g_server_bpp != bpp)
|
||||||
|
{
|
||||||
|
warning("colour depth changed from %d to %d\n", g_server_bpp, bpp);
|
||||||
g_server_bpp = bpp;
|
g_server_bpp = bpp;
|
||||||
|
}
|
||||||
|
if (g_width != width || g_height != height)
|
||||||
|
{
|
||||||
|
warning("screen size changed from %dx%d to %dx%d\n", g_width, g_height,
|
||||||
|
width, height);
|
||||||
g_width = width;
|
g_width = width;
|
||||||
g_height = height;
|
g_height = height;
|
||||||
|
|
||||||
ui_resize_window();
|
ui_resize_window();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Respond to a demand active PDU */
|
/* Respond to a demand active PDU */
|
||||||
static void
|
static void
|
||||||
|
12
xwin.c
12
xwin.c
@ -1031,6 +1031,7 @@ void
|
|||||||
ui_resize_window()
|
ui_resize_window()
|
||||||
{
|
{
|
||||||
XSizeHints *sizehints;
|
XSizeHints *sizehints;
|
||||||
|
Pixmap bs;
|
||||||
|
|
||||||
sizehints = XAllocSizeHints();
|
sizehints = XAllocSizeHints();
|
||||||
if (sizehints)
|
if (sizehints)
|
||||||
@ -1046,6 +1047,17 @@ ui_resize_window()
|
|||||||
{
|
{
|
||||||
XResizeWindow(g_display, g_wnd, g_width, g_height);
|
XResizeWindow(g_display, g_wnd, g_width, g_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* create new backstore pixmap */
|
||||||
|
if (g_backstore != 0)
|
||||||
|
{
|
||||||
|
bs = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth);
|
||||||
|
XSetForeground(g_display, g_gc, BlackPixelOfScreen(g_screen));
|
||||||
|
XFillRectangle(g_display, bs, g_gc, 0, 0, g_width, g_height);
|
||||||
|
XCopyArea(g_display, g_backstore, bs, g_gc, 0, 0, g_width, g_height, 0, 0);
|
||||||
|
XFreePixmap(g_display, g_backstore);
|
||||||
|
g_backstore = bs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user