diff --git a/uirdesktop/dfb.c b/uirdesktop/dfb.c index 8447f25f..b49da378 100644 --- a/uirdesktop/dfb.c +++ b/uirdesktop/dfb.c @@ -32,6 +32,7 @@ #include #include #include "uimain.h" +#include "bsops.h" extern char g_username[]; extern char g_hostname[]; @@ -89,6 +90,8 @@ static int g_trans_colour = 0; //static IDirectFBDataBuffer * g_buffer = 0; //static IDirectFBImageProvider * g_provider = 0; +void (* master_callback)(int msg, int param1, int param2) = 0; + /*****************************************************************************/ void mi_error(char * msg) @@ -115,8 +118,11 @@ mi_read_keyboard_state(void) int mi_create_window(void) { - g_primary->SetColor(g_primary, 0, 0, 0, 0xff); - g_primary->FillRectangle(g_primary, 0, 0, g_width, g_height); + if (!g_no_draw) + { + g_primary->SetColor(g_primary, 0, 0, 0, 0xff); + g_primary->FillRectangle(g_primary, 0, 0, g_width, g_height); + } return 1; } @@ -627,6 +633,16 @@ mi_set_null_cursor(void) { } +/*****************************************************************************/ +void +mi_logon(void) +{ + if (master_callback != 0) + { + master_callback(1, 0, 0); + } +} + /*****************************************************************************/ static void out_params(void) @@ -868,3 +884,11 @@ librdesktop_quit(void) { return 1; } + +/*****************************************************************************/ +int +librdesktop_set_callback(void (* callback)(int, int, int)) +{ + master_callback = callback; + return 0; +} diff --git a/uirdesktop/makefile_dfb b/uirdesktop/makefile_dfb index 864f9607..153f325c 100644 --- a/uirdesktop/makefile_dfb +++ b/uirdesktop/makefile_dfb @@ -4,8 +4,8 @@ # these are for phillips stb compiling #-mips3 -INCDIR=/home/j/stb/stb810-SP2/build/staging/usr/local/include/directfb -ROOTFS=/home/j/stb/stb810-SP2/build/rootfs +INCDIR=/home/jay/mediamall/SP5/stb810-SP5/build/staging/usr/local/include/directfb +ROOTFS=/home/jay/mediamall/SP5/stb810-SP5/build/rootfs CC = mipsel-linux-gnu-gcc OBJS = tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o \ diff --git a/uirdesktop/proto.h b/uirdesktop/proto.h index 0e16f897..16852311 100755 --- a/uirdesktop/proto.h +++ b/uirdesktop/proto.h @@ -294,6 +294,7 @@ void ui_seamless_settitle(unsigned long id, const char *title, unsigned long fla void ui_seamless_setstate(unsigned long id, unsigned int state, unsigned long flags); void ui_seamless_syncbegin(unsigned long flags); void ui_seamless_ack(unsigned int serial); +void ui_logon(void); /* lspci.c */ BOOL lspci_init(void); /* seamless.c */ diff --git a/uirdesktop/rdp.c b/uirdesktop/rdp.c index 018a3326..ed2452d4 100644 --- a/uirdesktop/rdp.c +++ b/uirdesktop/rdp.c @@ -1312,11 +1312,11 @@ process_data_pdu(STREAM s, uint32 * ext_disc_reason) case RDP_DATA_PDU_LOGON: DEBUG(("Received Logon PDU\n")); /* User logged on */ + ui_logon(); break; case RDP_DATA_PDU_DISCONNECT: process_disconnect_pdu(s, ext_disc_reason); - /* We used to return true and disconnect immediately here, but * Windows Vista sends a disconnect PDU with reason 0 when * reconnecting to a disconnected session, and MSTSC doesn't diff --git a/uirdesktop/uimain.c b/uirdesktop/uimain.c index 033bb31e..ff68f3b3 100755 --- a/uirdesktop/uimain.c +++ b/uirdesktop/uimain.c @@ -120,6 +120,8 @@ void mi_set_null_cursor(void); int mi_read_keyboard_state(void); +void +mi_logon(void); /*****************************************************************************/ /* put part of the screen from the backing store to the display */ @@ -829,6 +831,13 @@ ui_ellipse(uint8 opcode, uint8 fillmode, /* not used */ } +/*****************************************************************************/ +void +ui_logon(void) +{ + mi_logon(); +} + /*****************************************************************************/ /* get a 32 byte random */ void