Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9485f0b7
Commit
9485f0b7
authored
Apr 20, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Implement the entry points for creating and destroying cursors.
parent
d676bf24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
0 deletions
+53
-0
mouse.c
dlls/winex11.drv/mouse.c
+51
-0
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+2
-0
No files found.
dlls/winex11.drv/mouse.c
View file @
9485f0b7
...
...
@@ -88,6 +88,7 @@ static const UINT button_up_flags[NB_BUTTONS] =
POINT
cursor_pos
;
static
DWORD
last_time_modified
;
static
RECT
cursor_clip
;
/* Cursor clipping rect */
static
XContext
cursor_context
;
BOOL
CDECL
X11DRV_SetCursorPos
(
INT
x
,
INT
y
);
...
...
@@ -166,6 +167,17 @@ static inline void update_button_state( unsigned int state )
/* X-buttons are not reported from XQueryPointer */
}
/***********************************************************************
* get_x11_cursor
*/
static
Cursor
get_x11_cursor
(
HCURSOR
handle
)
{
Cursor
cursor
;
if
(
cursor_context
&&
!
XFindContext
(
gdi_display
,
(
XID
)
handle
,
cursor_context
,
(
char
**
)
&
cursor
))
return
cursor
;
return
0
;
}
/***********************************************************************
* update_mouse_state
...
...
@@ -945,6 +957,45 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr )
return
cursor
;
}
/***********************************************************************
* CreateCursorIcon (X11DRV.@)
*/
void
CDECL
X11DRV_CreateCursorIcon
(
HCURSOR
handle
,
CURSORICONINFO
*
info
)
{
static
const
WORD
ICON_HOTSPOT
=
0x4242
;
Cursor
cursor
;
/* ignore icons (FIXME: shouldn't use magic hotspot value) */
if
(
info
->
ptHotSpot
.
x
==
ICON_HOTSPOT
&&
info
->
ptHotSpot
.
y
==
ICON_HOTSPOT
)
return
;
wine_tsx11_lock
();
cursor
=
create_cursor
(
gdi_display
,
info
);
if
(
cursor
)
{
if
(
!
cursor_context
)
cursor_context
=
XUniqueContext
();
XSaveContext
(
gdi_display
,
(
XID
)
handle
,
cursor_context
,
(
char
*
)
cursor
);
TRACE
(
"cursor %p %ux%u, planes %u, bpp %u -> xid %lx
\n
"
,
handle
,
info
->
nWidth
,
info
->
nHeight
,
info
->
bPlanes
,
info
->
bBitsPerPixel
,
cursor
);
}
wine_tsx11_unlock
();
}
/***********************************************************************
* DestroyCursorIcon (X11DRV.@)
*/
void
CDECL
X11DRV_DestroyCursorIcon
(
HCURSOR
handle
)
{
Cursor
cursor
;
wine_tsx11_lock
();
if
((
cursor
=
get_x11_cursor
(
handle
)))
{
TRACE
(
"%p xid %lx
\n
"
,
handle
,
cursor
);
XFreeCursor
(
gdi_display
,
cursor
);
XDeleteContext
(
gdi_display
,
(
XID
)
handle
,
cursor_context
);
}
wine_tsx11_unlock
();
}
/***********************************************************************
* SetCursor (X11DRV.@)
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
9485f0b7
...
...
@@ -73,6 +73,8 @@
@ cdecl ToUnicodeEx(long long ptr ptr long long long) X11DRV_ToUnicodeEx
@ cdecl UnloadKeyboardLayout(long) X11DRV_UnloadKeyboardLayout
@ cdecl VkKeyScanEx(long long) X11DRV_VkKeyScanEx
@ cdecl CreateCursorIcon(long ptr) X11DRV_CreateCursorIcon
@ cdecl DestroyCursorIcon(long) X11DRV_DestroyCursorIcon
@ cdecl SetCursor(long ptr) X11DRV_SetCursor
@ cdecl GetCursorPos(ptr) X11DRV_GetCursorPos
@ cdecl SetCursorPos(long long) X11DRV_SetCursorPos
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment