Add a destroy group command to SeamlessRDP for when entire groups of windows
get killed off in one go. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1231 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
7656da0f6b
commit
f8b9095263
@ -55,13 +55,20 @@ CREATE
|
|||||||
Allocate structures for a new window.
|
Allocate structures for a new window.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
CREATE,<SERIAL>,<ID>,<PARENT>,<FLAGS>
|
CREATE,<SERIAL>,<ID>,<GRPID>,<PARENT>,<FLAGS>
|
||||||
|
|
||||||
Indicates that a window has appeared on the server. If PARENT is non-zero then
|
Indicates that a window has appeared on the server. If PARENT is non-zero then
|
||||||
the new window is a child of that window (it's transient for it). The special
|
the new window is a child of that window (it's transient for it). The special
|
||||||
value 0xFFFFFFFF for PARENT means that the window is a popup window without a
|
value 0xFFFFFFFF for PARENT means that the window is a popup window without a
|
||||||
parent. It's commonly used for splash screens, tool tips and context menus.
|
parent. It's commonly used for splash screens, tool tips and context menus.
|
||||||
|
|
||||||
|
The group id identifies a set of windows that belong together. It is currently
|
||||||
|
only used for modal windows and DESTROYGRP.
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
0x0001 : Create a window that's modal with regard to the other windows
|
||||||
|
in the same group.
|
||||||
|
|
||||||
Note that very little information is included in this message. Things like
|
Note that very little information is included in this message. Things like
|
||||||
title and state will come in subsequent messages. This message should only
|
title and state will come in subsequent messages. This message should only
|
||||||
be used to allocate data structures for the new window.
|
be used to allocate data structures for the new window.
|
||||||
@ -76,6 +83,17 @@ Syntax:
|
|||||||
|
|
||||||
Remove the window and deallocate all associated structures.
|
Remove the window and deallocate all associated structures.
|
||||||
|
|
||||||
|
DESTROYGRP
|
||||||
|
----------
|
||||||
|
|
||||||
|
Destroy an entire group of windows.
|
||||||
|
|
||||||
|
Syntax:
|
||||||
|
DESTROYGRP,<SERIAL>,<GRPID>,<FLAGS>
|
||||||
|
|
||||||
|
Every window that belongs to the group GRPID should be destroyed as if they
|
||||||
|
each got a DESTROY message.
|
||||||
|
|
||||||
POSITION
|
POSITION
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
5
proto.h
5
proto.h
@ -101,8 +101,8 @@ void printercache_process(STREAM s);
|
|||||||
/* pstcache.c */
|
/* pstcache.c */
|
||||||
void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp);
|
void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp);
|
||||||
BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx);
|
BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx);
|
||||||
BOOL pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * key, uint8 width,
|
BOOL pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * key, uint8 width, uint8 height,
|
||||||
uint8 height, uint16 length, uint8 * data);
|
uint16 length, uint8 * data);
|
||||||
int pstcache_enumerate(uint8 id, HASH_KEY * keylist);
|
int pstcache_enumerate(uint8 id, HASH_KEY * keylist);
|
||||||
BOOL pstcache_init(uint8 cache_id);
|
BOOL pstcache_init(uint8 cache_id);
|
||||||
/* rdesktop.c */
|
/* rdesktop.c */
|
||||||
@ -283,6 +283,7 @@ void ui_seamless_toggle(void);
|
|||||||
void ui_seamless_create_window(unsigned long id, unsigned long group, unsigned long parent,
|
void ui_seamless_create_window(unsigned long id, unsigned long group, unsigned long parent,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
void ui_seamless_destroy_window(unsigned long id, unsigned long flags);
|
void ui_seamless_destroy_window(unsigned long id, unsigned long flags);
|
||||||
|
void ui_seamless_destroy_group(unsigned long id, unsigned long flags);
|
||||||
void ui_seamless_move_window(unsigned long id, int x, int y, int width, int height,
|
void ui_seamless_move_window(unsigned long id, int x, int y, int width, int height,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
void ui_seamless_restack_window(unsigned long id, unsigned long behind, unsigned long flags);
|
void ui_seamless_restack_window(unsigned long id, unsigned long behind, unsigned long flags);
|
||||||
|
15
seamless.c
15
seamless.c
@ -120,6 +120,21 @@ seamless_process_line(const char *line, void *data)
|
|||||||
ui_seamless_destroy_window(id, flags);
|
ui_seamless_destroy_window(id, flags);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (!strcmp("DESTROYGRP", tok1))
|
||||||
|
{
|
||||||
|
if (!tok4)
|
||||||
|
return False;
|
||||||
|
|
||||||
|
id = strtoul(tok3, &endptr, 0);
|
||||||
|
if (*endptr)
|
||||||
|
return False;
|
||||||
|
|
||||||
|
flags = strtoul(tok4, &endptr, 0);
|
||||||
|
if (*endptr)
|
||||||
|
return False;
|
||||||
|
|
||||||
|
ui_seamless_destroy_group(id, flags);
|
||||||
|
}
|
||||||
else if (!strcmp("SETICON", tok1))
|
else if (!strcmp("SETICON", tok1))
|
||||||
{
|
{
|
||||||
unimpl("SeamlessRDP SETICON1\n");
|
unimpl("SeamlessRDP SETICON1\n");
|
||||||
|
21
xwin.c
21
xwin.c
@ -3473,6 +3473,27 @@ ui_seamless_destroy_window(unsigned long id, unsigned long flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ui_seamless_destroy_group(unsigned long id, unsigned long flags)
|
||||||
|
{
|
||||||
|
seamless_window *sw, *sw_next;
|
||||||
|
|
||||||
|
if (!g_seamless_active)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (sw = g_seamless_windows; sw; sw = sw_next)
|
||||||
|
{
|
||||||
|
sw_next = sw->next;
|
||||||
|
|
||||||
|
if (sw->group->id == id)
|
||||||
|
{
|
||||||
|
XDestroyWindow(g_display, sw->wnd);
|
||||||
|
sw_remove_window(sw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ui_seamless_move_window(unsigned long id, int x, int y, int width, int height, unsigned long flags)
|
ui_seamless_move_window(unsigned long id, int x, int y, int width, int height, unsigned long flags)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user