xorg driver, include cleanup

ulab-next
Jay Sorg 11 years ago
parent af8ca90784
commit 17bf2abe30

@ -57,7 +57,7 @@ struct xrdp_api_data
int APP_CC send_channel_data(int chan_id, char *data, int size);
int APP_CC main_cleanup(void);
int APP_CC find_empty_slot_in_dvc_channels();
struct xrdp_api_data *APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id);
struct xrdp_api_data * APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id);
int remove_struct_with_chan_id(tui32 dvc_chan_id);
#define LOG_LEVEL 5

@ -1,8 +1,8 @@
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2009-2012
* Copyright (C) Laxmikant Rashinkar 2012
* Copyright (C) Jay Sorg 2009-2013
* Copyright (C) Laxmikant Rashinkar 2012-2013
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,14 +23,9 @@
#include "arch.h"
#include "parse.h"
int APP_CC
clipboard_init(void);
int APP_CC
clipboard_deinit(void);
int APP_CC
clipboard_data_in(struct stream* s, int chan_id, int chan_flags, int length,
int total_length);
int APP_CC
clipboard_xevent(void* xevent);
int APP_CC clipboard_init(void);
int APP_CC clipboard_deinit(void);
int APP_CC clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length);
int APP_CC clipboard_xevent(void *xevent);
#endif

@ -1,7 +1,7 @@
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2012
* Copyright (C) Jay Sorg 2012-2013
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -127,9 +127,7 @@ struct clip_file_desc /* CLIPRDR_FILEDESCRIPTOR */
char cFileName[256];
};
int APP_CC
clipboard_out_unicode(struct stream *s, char *text, int num_chars);
int APP_CC
clipboard_in_unicode(struct stream *s, char *text, int *num_chars);
int APP_CC clipboard_out_unicode(struct stream *s, char *text, int num_chars);
int APP_CC clipboard_in_unicode(struct stream *s, char *text, int *num_chars);
#endif

@ -515,7 +515,9 @@ void dev_redir_send_drive_dir_request(IRP *irp, tui32 device_id,
if (InitialQuery)
{
if (Path == NULL)
{
return;
}
/* Path in unicode needs this much space */
path_len = ((g_mbstowcs(NULL, Path, 0) * sizeof(twchar)) / 2) + 2;
@ -704,7 +706,8 @@ void devredir_proc_client_devlist_announce_req(struct stream *s)
}
}
void dev_redir_proc_device_iocompletion(struct stream *s)
void APP_CC
dev_redir_proc_device_iocompletion(struct stream *s)
{
FUSE_DATA *fuse_data = NULL;
IRP *irp = NULL;
@ -859,11 +862,12 @@ done:
log_debug("exiting");
}
void dev_redir_proc_query_dir_response(IRP *irp,
struct stream *s_in,
tui32 DeviceId,
tui32 CompletionId,
tui32 IoStatus)
void APP_CC
dev_redir_proc_query_dir_response(IRP *irp,
struct stream *s_in,
tui32 DeviceId,
tui32 CompletionId,
tui32 IoStatus)
{
FUSE_DATA *fuse_data = NULL;
XRDP_INODE *xinode = NULL;
@ -984,7 +988,8 @@ void dev_redir_proc_query_dir_response(IRP *irp,
* @return 0 on success, -1 on failure
*****************************************************************************/
int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path)
int APP_CC
dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path)
{
tui32 DesiredAccess;
tui32 CreateOptions;
@ -1028,8 +1033,9 @@ int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path)
return rval;
}
int dev_redir_file_open(void *fusep, tui32 device_id, char *path,
int mode, int type, char *gen_buf)
int APP_CC
dev_redir_file_open(void *fusep, tui32 device_id, char *path,
int mode, int type, char *gen_buf)
{
tui32 DesiredAccess;
tui32 CreateOptions;
@ -1140,7 +1146,8 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId)
* Remove (delete) a directory or file
*****************************************************************************/
int devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode)
int APP_CC
devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode)
{
tui32 DesiredAccess;
tui32 CreateOptions;
@ -1181,8 +1188,9 @@ int devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode)
* @return 0 on success, -1 on failure
*****************************************************************************/
int devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
tui32 Length, tui64 Offset)
int APP_CC
devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
tui32 Length, tui64 Offset)
{
struct stream *s;
IRP *irp;
@ -1229,8 +1237,9 @@ int devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
return 0;
}
int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
const char *buf, tui32 Length, tui64 Offset)
int APP_CC
dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
const char *buf, tui32 Length, tui64 Offset)
{
struct stream *s;
IRP *irp;
@ -1293,7 +1302,8 @@ int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
* @return FUSE_DATA on success, or NULL on failure
*****************************************************************************/
void *devredir_fuse_data_peek(IRP *irp)
void * APP_CC
devredir_fuse_data_peek(IRP *irp)
{
log_debug("returning %p", irp->fd_head);
return irp->fd_head;
@ -1305,7 +1315,8 @@ void *devredir_fuse_data_peek(IRP *irp)
* @return FUSE_DATA on success, NULL on failure
*****************************************************************************/
void *devredir_fuse_data_dequeue(IRP *irp)
void * APP_CC
devredir_fuse_data_dequeue(IRP *irp)
{
FUSE_DATA *head;
@ -1340,7 +1351,8 @@ void *devredir_fuse_data_dequeue(IRP *irp)
* @return 0 on success, -1 on failure
*****************************************************************************/
int devredir_fuse_data_enqueue(IRP *irp, void *vp)
int APP_CC
devredir_fuse_data_enqueue(IRP *irp, void *vp)
{
FUSE_DATA *fd;
FUSE_DATA *tail;
@ -1377,12 +1389,13 @@ int devredir_fuse_data_enqueue(IRP *irp, void *vp)
** miscellaneous stuff **
******************************************************************************/
void devredir_insert_DeviceIoRequest(struct stream *s,
tui32 DeviceId,
tui32 FileId,
tui32 CompletionId,
tui32 MajorFunction,
tui32 MinorFunction)
void APP_CC
devredir_insert_DeviceIoRequest(struct stream *s,
tui32 DeviceId,
tui32 FileId,
tui32 CompletionId,
tui32 MajorFunction,
tui32 MinorFunction)
{
/* setup DR_DEVICE_IOREQUEST header */
xstream_wr_u16_le(s, RDPDR_CTYP_CORE);
@ -1398,7 +1411,8 @@ void devredir_insert_DeviceIoRequest(struct stream *s,
* Convert / to windows compatible \
*****************************************************************************/
void devredir_cvt_slash(char *path)
void APP_CC
devredir_cvt_slash(char *path)
{
char *cptr = path;
@ -1410,7 +1424,8 @@ void devredir_cvt_slash(char *path)
}
}
void devredir_cvt_to_unicode(char *unicode, char *path)
void APP_CC
devredir_cvt_to_unicode(char *unicode, char *path)
{
char *dest;
char *src;
@ -1435,7 +1450,8 @@ void devredir_cvt_to_unicode(char *unicode, char *path)
*dest++ = 0;
}
void devredir_cvt_from_unicode_len(char *path, char *unicode, int len)
void APP_CC
devredir_cvt_from_unicode_len(char *path, char *unicode, int len)
{
char *dest;
char *dest_saved;
@ -1472,7 +1488,8 @@ void devredir_cvt_from_unicode_len(char *path, char *unicode, int len)
g_free(dest_saved);
}
int dev_redir_string_ends_with(char *string, char c)
int APP_CC
dev_redir_string_ends_with(char *string, char c)
{
int len;
@ -1480,14 +1497,16 @@ int dev_redir_string_ends_with(char *string, char c)
return (string[len - 1] == c) ? 1 : 0;
}
void devredir_insert_RDPDR_header(struct stream *s, tui16 Component,
tui16 PacketId)
void APP_CC
devredir_insert_RDPDR_header(struct stream *s, tui16 Component,
tui16 PacketId)
{
xstream_wr_u16_le(s, Component);
xstream_wr_u16_le(s, PacketId);
}
void devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus)
void APP_CC
devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus)
{
struct stream *s;
int bytes;
@ -1523,7 +1542,8 @@ void devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus)
return;
}
void devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus)
void APP_CC
devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus)
{
FUSE_DATA *fuse_data;
@ -1549,7 +1569,8 @@ void devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus)
IRP_MJ_CLOSE, 0, 32);
}
void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus)
void APP_CC
devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus)
{
struct stream *s;
int bytes;
@ -1601,7 +1622,8 @@ void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus)
return;
}
void devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus)
void APP_CC
devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus)
{
FUSE_DATA *fuse_data;

@ -22,12 +22,9 @@ int g_drdynvc_chan_id;
int g_drdynvc_inited = 0;
static int APP_CC drdynvc_send_capability_request(uint16_t version);
static int APP_CC drdynvc_process_capability_response(struct stream* s,
unsigned char cmd);
static int APP_CC drdynvc_process_open_channel_response(struct stream *s,
unsigned char cmd);
static int APP_CC drdynvc_process_close_channel_response(struct stream *s,
unsigned char cmd);
static int APP_CC drdynvc_process_capability_response(struct stream* s, unsigned char cmd);
static int APP_CC drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd);
static int APP_CC drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd);
static int APP_CC drdynvc_process_data_first(struct stream* s, unsigned char cmd);
static int APP_CC drdynvc_process_data(struct stream* s, unsigned char cmd);
static int APP_CC drdynvc_insert_uint_124(struct stream *s, uint32_t val);

@ -54,12 +54,12 @@ struct irp
tui32 CompletionId, tui32 IoStatus);
};
IRP * devredir_irp_new();
IRP * devredir_irp_clone(IRP *irp);
int devredir_irp_delete(IRP *irp);
IRP * devredir_irp_find(tui32 completion_id);
IRP * devredir_irp_find_by_fileid(tui32 FileId);
IRP * devredir_irp_get_last();
void devredir_irp_dump();
IRP * APP_CC devredir_irp_new(void);
IRP * APP_CC devredir_irp_clone(IRP *irp);
int APP_CC devredir_irp_delete(IRP *irp);
IRP * APP_CC devredir_irp_find(tui32 completion_id);
IRP * APP_CC devredir_irp_find_by_fileid(tui32 FileId);
IRP * APP_CC devredir_irp_get_last(void);
void APP_CC devredir_irp_dump(void);
#endif /* end ifndef __IRP_H */

@ -147,7 +147,8 @@ static void scard_release_resources(void);
** non static functions **
******************************************************************************/
void scard_device_announce(tui32 device_id)
void APP_CC
scard_device_announce(tui32 device_id)
{
IRP *irp;
@ -187,9 +188,10 @@ void scard_device_announce(tui32 device_id)
** callbacks into this module **
******************************************************************************/
void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
void APP_CC
scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
{
tui32 len;
int tmp;
@ -243,9 +245,10 @@ void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
log_debug("leaving");
}
void scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
void APP_CC
scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
{
tui32 len;
@ -283,7 +286,8 @@ void scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
*
*****************************************************************************/
static void scard_send_EstablishContext(IRP *irp)
static void APP_CC
scard_send_EstablishContext(IRP *irp)
{
struct stream *s;
int bytes;
@ -311,7 +315,8 @@ static void scard_send_EstablishContext(IRP *irp)
*
*****************************************************************************/
static void scard_send_ListReaders(IRP *irp, int wide)
static void APP_CC
scard_send_ListReaders(IRP *irp, int wide)
{
/* see [MS-RDPESC] 2.2.2.4 */
@ -405,7 +410,8 @@ static void scard_send_ListReaders(IRP *irp, int wide)
* @return stream with IOCTL inserted in it, NULL on error
*****************************************************************************/
static struct stream *scard_make_new_ioctl(IRP *irp, tui32 ioctl)
static struct stream * APP_CC
scard_make_new_ioctl(IRP *irp, tui32 ioctl)
{
/*
* format of device control request
@ -462,7 +468,8 @@ static struct stream *scard_make_new_ioctl(IRP *irp, tui32 ioctl)
* @return index into smartcards[] on success, -1 on failure
*****************************************************************************/
static int scard_add_new_device(tui32 device_id)
static int APP_CC
scard_add_new_device(tui32 device_id)
{
int index;
SMARTCARD *sc;
@ -485,10 +492,12 @@ static int scard_add_new_device(tui32 device_id)
/**
* Find first unused entry in smartcards
*
* @return index of first unused entry in smartcards or -1 if smartcards is full
* @return index of first unused entry in smartcards or -1 if smartcards
* is full
*****************************************************************************/
static int scard_get_free_slot(void)
static int APP_CC
scard_get_free_slot(void)
{
int i;
@ -509,7 +518,8 @@ static int scard_get_free_slot(void)
* Release resources prior to shutting down
*****************************************************************************/
static void scard_release_resources(void)
static void APP_CC
scard_release_resources(void)
{
int i;

@ -50,6 +50,8 @@ int g_do_dirty_ons = 0; /* delay remoting screen */
Bool g_wrapWindow = 1;
Bool g_wrapPixmap = 1;
int g_codec_mode = 0; /* 0 = standard rdp, 1 = rfx */
rdpPixmapRec g_screenPriv;
/* if true, running in RemoteApp / RAIL mode */
@ -237,7 +239,7 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
memset(&g_screenPriv, 0, sizeof(g_screenPriv));
/*dpix = 75;
dpiy = 75;*/
dpiy = 75; */
dpix = PixelDPI;
dpiy = PixelDPI;

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -37,5 +37,7 @@ rdpInputKeyboardEvent(int msg, long param1, long param2,
int
rdpInputMouseEvent(int msg, long param1, long param2,
long param3, long param4);
int
rdpInputInit(void);
#endif

@ -38,6 +38,7 @@ rdp module main
#include <mi.h>
#include "rdp.h"
#include "rdpInput.h"
/******************************************************************************/
#define LOG_LEVEL 1

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -69,29 +69,8 @@ Bool
rdpRRSetConfig(ScreenPtr pScreen, Rotation rotateKind, int rate,
RRScreenSizePtr pSize)
{
ScrnInfoPtr pScrn;
rdpPtr dev;
rrScrPrivPtr pRRScrPriv;
Bool rv;
LLOGLN(0, ("rdpRRSetConfig:"));
rv = TRUE;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
#if 0
pRRScrPriv = rrGetScrPriv(pScreen);
if (pRRScrPriv != 0)
{
if (dev->rrSetConfig != 0)
{
LLOGLN(0, ("rdpRRSetConfig: here"));
pRRScrPriv->rrSetConfig = dev->rrSetConfig;
rv = pRRScrPriv->rrSetConfig(pScreen, rotateKind, rate, pSize);
pRRScrPriv->rrSetConfig = rdpRRSetConfig;
}
}
#endif
return rv;
return TRUE;
}
/******************************************************************************/
@ -102,32 +81,15 @@ rdpRRGetInfo(ScreenPtr pScreen, Rotation *pRotations)
int height;
ScrnInfoPtr pScrn;
rdpPtr dev;
rrScrPrivPtr pRRScrPriv;
Bool rv;
LLOGLN(0, ("rdpRRGetInfo:"));
rv = TRUE;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
#if 0
pRRScrPriv = rrGetScrPriv(pScreen);
if (pRRScrPriv != 0)
{
if (dev->rrGetInfo != 0)
{
LLOGLN(0, ("rdpRRGetInfo: here"));
pRRScrPriv->rrGetInfo = dev->rrGetInfo;
rv = pRRScrPriv->rrGetInfo(pScreen, pRotations);
pRRScrPriv->rrGetInfo = rdpRRGetInfo;
}
}
#else
*pRotations = RR_Rotate_0;
width = dev->width;
height = dev->height;
rdpRRRegisterSize(pScreen, width, height);
#endif
return rv;
return TRUE;
}
/******************************************************************************/

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"

@ -55,13 +55,6 @@ static int g_tab_down = 0;
above *_down vars */
static int g_scroll_lock_down = 0;
/* if 1, a keystroke is done every minute, down, then up */
#define XRDPKB_TEST 0
#if XRDPKB_TEST
static OsTimerPtr g_timer = 0;
#endif
/******************************************************************************/
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
@ -517,21 +510,6 @@ rdpInputKeyboard(int msg, long param1, long param2, long param3, long param4)
return 0;
}
#if XRDPKB_TEST
/******************************************************************************/
static CARD32
rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
{
LLOGLN(0, ("rdpDeferredUpdateCallback:"));
rdpEnqueueKey(KeyPress, 115);
rdpEnqueueKey(KeyRelease, 115);
g_timer = TimerSet(g_timer, 0, 1000, rdpDeferredUpdateCallback, 0);
return 0;
}
#endif
/******************************************************************************/
void
rdpkeybDeviceInit(DeviceIntPtr pDevice, KeySymsPtr pKeySyms, CARD8 *pModMap)
@ -637,9 +615,6 @@ rdpkeybControl(DeviceIntPtr device, int what)
rdpkeybChangeKeyboardControl);
g_keyboard = device;
rdpRegisterInputCallback(0, rdpInputKeyboard);
#if XRDPKB_TEST
g_timer = TimerSet(g_timer, 0, 1000, rdpDeferredUpdateCallback, 0);
#endif
break;
case DEVICE_ON:
pDev->on = 1;

Loading…
Cancel
Save