diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-08-01 18:05:13 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-08-01 18:05:13 -0700 |
commit | a8c3a05e509dd4ee5bfb9eac20194f4c70319aac (patch) | |
tree | 7e5714476c74ab2ad3c32f24701648da57367434 /xorg/server/module | |
parent | f0a91c444d87bd09961185d888f87799ab817790 (diff) | |
download | xrdp-proprietary-a8c3a05e509dd4ee5bfb9eac20194f4c70319aac.tar.gz xrdp-proprietary-a8c3a05e509dd4ee5bfb9eac20194f4c70319aac.zip |
xorg driver, keyboard / mouse cleanup
Diffstat (limited to 'xorg/server/module')
-rw-r--r-- | xorg/server/module/rdp.h | 31 | ||||
-rw-r--r-- | xorg/server/module/rdpDraw.c | 9 |
2 files changed, 39 insertions, 1 deletions
diff --git a/xorg/server/module/rdp.h b/xorg/server/module/rdp.h index 0cc5d6ee..ab9f2a8c 100644 --- a/xorg/server/module/rdp.h +++ b/xorg/server/module/rdp.h @@ -35,10 +35,36 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define RDPMIN(_val1, _val2) ((_val1) < (_val2) ? (_val1) : (_val2)) #define RDPMAX(_val1, _val2) ((_val1) < (_val2) ? (_val2) : (_val1)) +#define RDPCLAMP(_val, _lo, _hi) \ + (_val) < (_lo) ? (_lo) : (_val) > (_hi) ? (_hi) : (_val) /* defined in rdpClientCon.h */ typedef struct _rdpClientCon rdpClientCon; +struct _rdpPointer +{ + int cursor_x; + int cursor_y; + int old_button_mask; + int button_mask; + DeviceIntPtr device; +}; +typedef struct _rdpPointer rdpPointer; + +struct _rdpKeyboard +{ + int pause_spe; + int ctrl_down; + int alt_down; + int shift_down; + int tab_down; + /* this is toggled every time num lock key is released, not like the + above *_down vars */ + int scroll_lock_down; + DeviceIntPtr device; +}; +typedef struct _rdpKeyboard rdpKeyboard; + /* move this to common header */ struct _rdpRec { @@ -63,7 +89,12 @@ struct _rdpRec CompositeProcPtr Composite; GlyphsProcPtr Glyphs; + /* keyboard and mouse */ miPointerScreenFuncPtr pCursorFuncs; + /* mouse */ + rdpPointer pointer; + /* keyboard */ + rdpKeyboard keyboard; /* RandR */ RRSetConfigProcPtr rrSetConfig; diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c index 2a87d267..08fe4b85 100644 --- a/xorg/server/module/rdpDraw.c +++ b/xorg/server/module/rdpDraw.c @@ -91,7 +91,14 @@ rdpGetDevFromScreen(ScreenPtr pScreen) ScrnInfoPtr pScrn; rdpPtr dev; - pScrn = xf86Screens[pScreen->myNum]; + if (pScreen == NULL) + { + pScrn = xf86Screens[0]; + } + else + { + pScrn = xf86Screens[pScreen->myNum]; + } dev = XRDPPTR(pScrn); return dev; } |