mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-04 15:23:32 +08:00
xfreerdp: handling local window restore events
This commit is contained in:
parent
aaa2f22b10
commit
b8291b2e3d
@ -20,6 +20,8 @@
|
||||
#include <freerdp/kbd/kbd.h>
|
||||
#include <freerdp/kbd/vkcodes.h>
|
||||
|
||||
#include "xf_rail.h"
|
||||
|
||||
#include "xf_event.h"
|
||||
|
||||
uint8 X11_EVENT_STRINGS[][20] =
|
||||
@ -420,7 +422,6 @@ boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app)
|
||||
|
||||
boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app)
|
||||
{
|
||||
xfWindow* xfw;
|
||||
rdpWindow* window;
|
||||
|
||||
if (app != True)
|
||||
@ -430,11 +431,8 @@ boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app)
|
||||
|
||||
if (window != NULL)
|
||||
{
|
||||
xfw = (xfWindow*) window->extra;
|
||||
|
||||
/* local maximize event */
|
||||
|
||||
XFlush(xfi->display);
|
||||
/* local restore event */
|
||||
xf_rail_send_client_system_command(xfi, window->windowId, SC_RESTORE);
|
||||
}
|
||||
|
||||
return True;
|
||||
|
@ -154,6 +154,24 @@ void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail)
|
||||
rail->DestroyWindow = xf_rail_DestroyWindow;
|
||||
}
|
||||
|
||||
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command)
|
||||
{
|
||||
RDP_EVENT* event;
|
||||
rdpChanMan* chanman;
|
||||
RAIL_SYSCOMMAND_ORDER* syscommand;
|
||||
|
||||
chanman = GET_CHANMAN(xfi->instance);
|
||||
syscommand = (RAIL_SYSCOMMAND_ORDER*) xmalloc(sizeof(RAIL_SYSCOMMAND_ORDER));
|
||||
|
||||
syscommand->windowId = windowId;
|
||||
syscommand->command = command;
|
||||
|
||||
event = freerdp_event_new(RDP_EVENT_CLASS_RAIL,
|
||||
RDP_EVENT_TYPE_RAIL_CLIENT_SYSCOMMAND, NULL, syscommand);
|
||||
|
||||
freerdp_chanman_send_event(chanman, event);
|
||||
}
|
||||
|
||||
void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
||||
{
|
||||
RDP_EVENT* new_event;
|
||||
|
@ -26,6 +26,8 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, uint32 ileft, uint32 itop, uint32
|
||||
|
||||
void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail);
|
||||
|
||||
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command);
|
||||
|
||||
void xf_process_rail_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event);
|
||||
|
||||
#endif /* __XF_RAIL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user