diff options
author | marha <marha@users.sourceforge.net> | 2014-10-01 20:12:35 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-01 20:12:35 +0200 |
commit | 19b4b68b35a047a83bd291ee8debac1adb0e946c (patch) | |
tree | d4d4520622ecf73fa0d076dc0bf517a1189b7d9f /xorg-server/hw/kdrive/ephyr/hostx.c | |
parent | 4e080e0165d18887e2a0fccd7f30cf20fd04b178 (diff) | |
parent | 438af0c7d4bf60b408b259c88205ff2193195466 (diff) | |
download | vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.tar.gz vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.tar.bz2 vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/main/macros.h
xorg-server/dix/registry.c
xorg-server/hw/kdrive/ephyr/ephyrinit.c
xorg-server/hw/xwin/Makefile.am
xorg-server/hw/xwin/glx/.gitignore
xorg-server/hw/xwin/glx/gen_gl_wrappers.py
xorg-server/hw/xwin/glx/indirect.c
xorg-server/hw/xwin/glx/winpriv.c
xorg-server/hw/xwin/winclipboardthread.c
xorg-server/hw/xwin/windisplay.c
xorg-server/hw/xwin/winmultiwindowwm.c
xorg-server/hw/xwin/winprefs.c
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/hostx.c')
-rwxr-xr-x | xorg-server/hw/kdrive/ephyr/hostx.c | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c index 4b69171a0..ae92545fc 100755 --- a/xorg-server/hw/kdrive/ephyr/hostx.c +++ b/xorg-server/hw/kdrive/ephyr/hostx.c @@ -73,6 +73,8 @@ struct EphyrHostXVars { xcb_visualtype_t *visual; Window winroot; xcb_gcontext_t gc; + xcb_render_pictformat_t argb_format; + xcb_cursor_t empty_cursor; int depth; Bool use_sw_cursor; Bool use_fullscreen; @@ -208,6 +210,12 @@ hostx_use_sw_cursor(void) HostX.use_sw_cursor = TRUE; } +xcb_cursor_t +hostx_get_empty_cursor(void) +{ + return HostX.empty_cursor; +} + int hostx_want_preexisting_window(KdScreenInfo *screen) { @@ -414,8 +422,8 @@ hostx_init(void) { uint32_t attrs[2]; uint32_t attr_mask = 0; - xcb_cursor_t empty_cursor; xcb_pixmap_t cursor_pxm; + xcb_gcontext_t cursor_gc; uint16_t red, green, blue; uint32_t pixel; int index; @@ -424,6 +432,7 @@ hostx_init(void) size_t class_len; const xcb_query_extension_reply_t *shm_rep; xcb_screen_t *xscreen; + xcb_rectangle_t rect = { 0, 0, 1, 1 }; attrs[0] = XCB_EVENT_MASK_BUTTON_PRESS @@ -600,18 +609,25 @@ hostx_init(void) xcb_change_gc(HostX.conn, HostX.gc, XCB_GC_FOREGROUND, &pixel); + cursor_pxm = xcb_generate_id(HostX.conn); + xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1); + cursor_gc = xcb_generate_id(HostX.conn); + pixel = 0; + xcb_create_gc(HostX.conn, cursor_gc, cursor_pxm, + XCB_GC_FOREGROUND, &pixel); + xcb_poly_fill_rectangle(HostX.conn, cursor_pxm, cursor_gc, 1, &rect); + xcb_free_gc(HostX.conn, cursor_gc); + HostX.empty_cursor = xcb_generate_id(HostX.conn); + xcb_create_cursor(HostX.conn, + HostX.empty_cursor, + cursor_pxm, cursor_pxm, + 0,0,0, + 0,0,0, + 1,1); + xcb_free_pixmap(HostX.conn, cursor_pxm); if (!hostx_want_host_cursor ()) { CursorVisible = TRUE; /* Ditch the cursor, we provide our 'own' */ - cursor_pxm = xcb_generate_id(HostX.conn); - xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1); - empty_cursor = xcb_generate_id(HostX.conn); - xcb_create_cursor(HostX.conn, - empty_cursor, - cursor_pxm, cursor_pxm, - 0,0,0, - 0,0,0, - 1,1); for (index = 0; index < HostX.n_screens; index++) { KdScreenInfo *screen = HostX.screens[index]; EphyrScrPriv *scrpriv = screen->driver; @@ -619,9 +635,8 @@ hostx_init(void) xcb_change_window_attributes(HostX.conn, scrpriv->win, XCB_CW_CURSOR, - &empty_cursor); + &HostX.empty_cursor); } - xcb_free_pixmap(HostX.conn, cursor_pxm); } #ifdef _MSC_VER |