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
5e18d7d8
Commit
5e18d7d8
authored
May 29, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Detect system cursors from cursor module name in create_xcursor_system_cursor.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
ef0cb915
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
44 deletions
+17
-44
dllmain.c
dlls/winex11.drv/dllmain.c
+0
-25
mouse.c
dlls/winex11.drv/mouse.c
+17
-9
unixlib.h
dlls/winex11.drv/unixlib.h
+0
-10
No files found.
dlls/winex11.drv/dllmain.c
View file @
5e18d7d8
...
...
@@ -128,30 +128,6 @@ static NTSTATUS x11drv_clipboard_init( UINT arg )
}
static
NTSTATUS
WINAPI
x11drv_is_system_module
(
void
*
arg
,
ULONG
size
)
{
HMODULE
module
;
unsigned
int
i
;
static
const
WCHAR
cursor_modules
[][
16
]
=
{
{
'u'
,
's'
,
'e'
,
'r'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
},
{
'c'
,
'o'
,
'm'
,
'c'
,
't'
,
'l'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
},
{
'o'
,
'l'
,
'e'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
},
{
'r'
,
'i'
,
'c'
,
'h'
,
'e'
,
'd'
,
'2'
,
'0'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
}
};
if
(
!
(
module
=
GetModuleHandleW
(
arg
)))
return
system_module_none
;
for
(
i
=
0
;
i
<
ARRAYSIZE
(
cursor_modules
);
i
++
)
{
if
(
GetModuleHandleW
(
cursor_modules
[
i
]
)
==
module
)
return
i
;
}
return
system_module_none
;
}
static
NTSTATUS
x11drv_load_icon
(
UINT
id
)
{
return
HandleToUlong
(
LoadIconW
(
NULL
,
UlongToPtr
(
id
)));
...
...
@@ -189,7 +165,6 @@ static const kernel_callback kernel_callbacks[] =
x11drv_dnd_post_drop
,
x11drv_ime_set_composition_string
,
x11drv_ime_set_result
,
x11drv_is_system_module
,
x11drv_systray_change_owner
,
};
...
...
dlls/winex11.drv/mouse.c
View file @
5e18d7d8
...
...
@@ -931,12 +931,16 @@ static const struct system_cursors riched20_cursors[] =
{
0
}
};
static
const
struct
system_cursors
*
module_cursors
[]
=
static
const
struct
{
user32_cursors
,
comctl32_cursors
,
ole32_cursors
,
riched20_cursors
,
const
struct
system_cursors
*
cursors
;
WCHAR
name
[
16
];
}
module_cursors
[]
=
{
{
user32_cursors
,
{
'u'
,
's'
,
'e'
,
'r'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
}
},
{
comctl32_cursors
,
{
'c'
,
'o'
,
'm'
,
'c'
,
't'
,
'l'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
}
},
{
ole32_cursors
,
{
'o'
,
'l'
,
'e'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
}
},
{
riched20_cursors
,
{
'r'
,
'i'
,
'c'
,
'h'
,
'e'
,
'd'
,
'2'
,
'0'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
}
}
};
struct
cursor_font_fallback
...
...
@@ -1054,6 +1058,7 @@ static int find_fallback_shape( const char *name )
static
Cursor
create_xcursor_system_cursor
(
const
ICONINFOEXW
*
info
)
{
const
struct
system_cursors
*
cursors
;
const
WCHAR
*
module
;
unsigned
int
i
;
Cursor
cursor
=
0
;
HKEY
key
;
...
...
@@ -1094,11 +1099,14 @@ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info )
}
if
(
info
->
szResName
[
0
])
goto
done
;
/* only integer resources are supported here */
i
=
x11drv_client_func
(
client_func_is_system_module
,
info
->
szModName
,
(
lstrlenW
(
info
->
szModName
)
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
i
==
system_module_none
)
goto
done
;
cursors
=
module_cursors
[
i
];
if
((
module
=
wcsrchr
(
info
->
szModName
,
'\\'
)))
module
++
;
else
module
=
info
->
szModName
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
module_cursors
);
i
++
)
if
(
!
wcsicmp
(
module
,
module_cursors
[
i
].
name
))
break
;
if
(
i
==
ARRAY_SIZE
(
module_cursors
))
goto
done
;
cursors
=
module_cursors
[
i
].
cursors
;
for
(
i
=
0
;
cursors
[
i
].
id
;
i
++
)
if
(
cursors
[
i
].
id
==
info
->
wResID
)
{
...
...
dlls/winex11.drv/unixlib.h
View file @
5e18d7d8
...
...
@@ -75,15 +75,6 @@ struct systray_dock_params
BOOL
*
layered
;
};
enum
system_modules
{
system_module_user32
,
system_module_comctl32
,
system_module_ole32
,
system_module_riched20
,
system_module_none
=
0xffff
,
};
/* x11drv_tablet_info params */
struct
tablet_info_params
{
...
...
@@ -108,7 +99,6 @@ enum x11drv_client_funcs
client_func_dnd_post_drop
,
client_func_ime_set_composition_string
,
client_func_ime_set_result
,
client_func_is_system_module
,
client_func_systray_change_owner
,
client_func_last
};
...
...
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