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
4af9ac67
Commit
4af9ac67
authored
May 01, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Directly use win32u in more places.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7769c8e9
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
18 deletions
+24
-18
clipboard.c
dlls/winex11.drv/clipboard.c
+1
-1
desktop.c
dlls/winex11.drv/desktop.c
+3
-2
event.c
dlls/winex11.drv/event.c
+3
-2
mouse.c
dlls/winex11.drv/mouse.c
+4
-4
window.c
dlls/winex11.drv/window.c
+8
-4
wintab.c
dlls/winex11.drv/wintab.c
+5
-5
No files found.
dlls/winex11.drv/clipboard.c
View file @
4af9ac67
...
...
@@ -2292,7 +2292,7 @@ void X11DRV_UpdateClipboard(void)
if
(
GetCurrentThreadId
()
==
clipboard_thread_id
)
return
;
now
=
NtGetTickCount
();
if
((
int
)(
now
-
last_update
)
<=
SELECTION_UPDATE_DELAY
)
return
;
if
(
SendMessageTimeoutW
(
GetClipboardOwner
(),
WM_X11DRV_UPDATE_CLIPBOARD
,
0
,
0
,
if
(
send_message_timeout
(
NtUser
GetClipboardOwner
(),
WM_X11DRV_UPDATE_CLIPBOARD
,
0
,
0
,
SMTO_ABORTIFHUNG
,
5000
,
&
ret
)
&&
ret
)
last_update
=
now
;
}
...
...
dlls/winex11.drv/desktop.c
View file @
4af9ac67
...
...
@@ -192,9 +192,10 @@ static LONG X11DRV_desktop_set_current_mode( ULONG_PTR id, DEVMODEW *mode )
static
void
query_desktop_work_area
(
RECT
*
rc_work
)
{
static
const
WCHAR
trayW
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'T'
,
'r'
,
'a'
,
'y'
,
'W'
,
'n'
,
'd'
,
0
};
static
const
WCHAR
trayW
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'T'
,
'r'
,
'a'
,
'y'
,
'W'
,
'n'
,
'd'
};
UNICODE_STRING
str
=
{
sizeof
(
trayW
),
sizeof
(
trayW
),
(
WCHAR
*
)
trayW
};
RECT
rect
;
HWND
hwnd
=
FindWindowW
(
trayW
,
NULL
);
HWND
hwnd
=
NtUserFindWindowEx
(
0
,
0
,
&
str
,
NULL
,
0
);
if
(
!
hwnd
||
!
NtUserIsWindowVisible
(
hwnd
))
return
;
if
(
!
NtUserGetWindowRect
(
hwnd
,
&
rect
))
return
;
...
...
dlls/winex11.drv/event.c
View file @
4af9ac67
...
...
@@ -665,10 +665,11 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
HMENU
hSysMenu
;
if
(
NtUserGetClassLongW
(
hwnd
,
GCL_STYLE
)
&
CS_NOCLOSE
)
return
;
hSysMenu
=
GetSystemMenu
(
hwnd
,
FALSE
);
hSysMenu
=
NtUserGetSystemMenu
(
hwnd
,
FALSE
);
if
(
hSysMenu
)
{
UINT
state
=
GetMenuState
(
hSysMenu
,
SC_CLOSE
,
MF_BYCOMMAND
);
UINT
state
=
NtUserThunkedMenuItemInfo
(
hSysMenu
,
SC_CLOSE
,
MF_BYCOMMAND
,
NtUserGetMenuState
,
NULL
,
NULL
);
if
(
state
==
0xFFFFFFFF
||
(
state
&
(
MF_DISABLED
|
MF_GRAYED
)))
return
;
}
...
...
dlls/winex11.drv/mouse.c
View file @
4af9ac67
...
...
@@ -406,7 +406,7 @@ static BOOL grab_clipping_window( const RECT *clip )
if
(
data
->
xi2_state
!=
xi_enabled
)
{
WARN
(
"XInput2 not supported, refusing to clip to %s
\n
"
,
wine_dbgstr_rect
(
clip
)
);
DestroyWindow
(
msg_hwnd
);
NtUser
DestroyWindow
(
msg_hwnd
);
NtUserClipCursor
(
NULL
);
return
TRUE
;
}
...
...
@@ -432,7 +432,7 @@ static BOOL grab_clipping_window( const RECT *clip )
if
(
!
clipping_cursor
)
{
disable_xinput2
();
DestroyWindow
(
msg_hwnd
);
NtUser
DestroyWindow
(
msg_hwnd
);
return
FALSE
;
}
clip_rect
=
*
clip
;
...
...
@@ -1697,9 +1697,9 @@ void move_resize_window( HWND hwnd, int dir )
while
(
NtUserPeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
!
CallMsgFilterW
(
&
msg
,
MSGF_SIZE
))
if
(
!
NtUserCallMsgFilter
(
&
msg
,
MSGF_SIZE
))
{
TranslateMessage
(
&
msg
);
NtUserTranslateMessage
(
&
msg
,
0
);
NtUserDispatchMessage
(
&
msg
);
}
}
...
...
dlls/winex11.drv/window.c
View file @
4af9ac67
...
...
@@ -2007,13 +2007,16 @@ HWND create_foreign_window( Display *display, Window xwin )
if
(
!
class_registered
)
{
UNICODE_STRING
class_name
,
version
=
{
0
};
WNDCLASSEXW
class
;
memset
(
&
class
,
0
,
sizeof
(
class
)
);
class
.
cbSize
=
sizeof
(
class
);
class
.
lpfnWndProc
=
foreign_window_proc
;
class
.
lpszClassName
=
classW
;
if
(
!
RegisterClassExW
(
&
class
)
&&
GetLastError
()
!=
ERROR_CLASS_ALREADY_EXISTS
)
RtlInitUnicodeString
(
&
class_name
,
classW
);
if
(
!
NtUserRegisterClassExWOW
(
&
class
,
&
class_name
,
&
version
,
NULL
,
0
,
0
,
NULL
)
&&
GetLastError
()
!=
ERROR_CLASS_ALREADY_EXISTS
)
{
ERR
(
"Could not register foreign window class
\n
"
);
return
FALSE
;
...
...
@@ -2052,7 +2055,7 @@ HWND create_foreign_window( Display *display, Window xwin )
if
(
!
(
data
=
alloc_win_data
(
display
,
hwnd
)))
{
DestroyWindow
(
hwnd
);
NtUser
DestroyWindow
(
hwnd
);
return
0
;
}
SetRect
(
&
data
->
window_rect
,
pos
.
x
,
pos
.
y
,
pos
.
x
+
attr
.
width
,
pos
.
y
+
attr
.
height
);
...
...
@@ -2681,12 +2684,13 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
/* check if the window icon should be hidden (i.e. moved off-screen) */
static
BOOL
hide_icon
(
struct
x11drv_win_data
*
data
)
{
static
const
WCHAR
trayW
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'T'
,
'r'
,
'a'
,
'y'
,
'W'
,
'n'
,
'd'
,
0
};
static
const
WCHAR
trayW
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'T'
,
'r'
,
'a'
,
'y'
,
'W'
,
'n'
,
'd'
};
UNICODE_STRING
str
=
{
sizeof
(
trayW
),
sizeof
(
trayW
),
(
WCHAR
*
)
trayW
};
if
(
data
->
managed
)
return
TRUE
;
/* hide icons in desktop mode when the taskbar is active */
if
(
!
is_virtual_desktop
())
return
FALSE
;
return
NtUserIsWindowVisible
(
FindWindowW
(
trayW
,
NULL
));
return
NtUserIsWindowVisible
(
NtUserFindWindowEx
(
0
,
0
,
&
str
,
NULL
,
0
));
}
/***********************************************************************
...
...
dlls/winex11.drv/wintab.c
View file @
4af9ac67
...
...
@@ -536,8 +536,8 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
gSysContext
.
lcSensZ
=
65536
;
gSysContext
.
lcSysSensX
=
65536
;
gSysContext
.
lcSysSensY
=
65536
;
gSysContext
.
lcSysExtX
=
GetSystemMetrics
(
SM_CXVIRTUALSCREEN
);
gSysContext
.
lcSysExtY
=
GetSystemMetrics
(
SM_CYVIRTUALSCREEN
);
gSysContext
.
lcSysExtX
=
NtUserGetSystemMetrics
(
SM_CXVIRTUALSCREEN
);
gSysContext
.
lcSysExtY
=
NtUserGetSystemMetrics
(
SM_CYVIRTUALSCREEN
);
/* initialize cursors */
disable_system_cursors
();
...
...
@@ -905,7 +905,7 @@ static BOOL motion_event( HWND hwnd, XEvent *event )
gMsgPacket
.
pkNormalPressure
=
motion
->
axis_data
[
2
];
gMsgPacket
.
pkButtons
=
get_button_state
(
curnum
);
gMsgPacket
.
pkChanged
=
get_changed_state
(
&
gMsgPacket
);
SendMessageW
(
hwndTabletDefault
,
WT_PACKET
,
gMsgPacket
.
pkSerialNumber
,(
LPARAM
)
hwnd
);
send_message
(
hwndTabletDefault
,
WT_PACKET
,
gMsgPacket
.
pkSerialNumber
,
(
LPARAM
)
hwnd
);
last_packet
=
gMsgPacket
;
return
TRUE
;
}
...
...
@@ -944,7 +944,7 @@ static BOOL button_event( HWND hwnd, XEvent *event )
}
gMsgPacket
.
pkButtons
=
get_button_state
(
curnum
);
gMsgPacket
.
pkChanged
=
get_changed_state
(
&
gMsgPacket
);
SendMessageW
(
hwndTabletDefault
,
WT_PACKET
,
gMsgPacket
.
pkSerialNumber
,(
LPARAM
)
hwnd
);
send_message
(
hwndTabletDefault
,
WT_PACKET
,
gMsgPacket
.
pkSerialNumber
,
(
LPARAM
)
hwnd
);
last_packet
=
gMsgPacket
;
return
TRUE
;
}
...
...
@@ -996,7 +996,7 @@ static BOOL proximity_event( HWND hwnd, XEvent *event )
*/
proximity_info
=
MAKELPARAM
((
event
->
type
==
proximity_in_type
),
(
event
->
type
==
proximity_in_type
)
||
(
event
->
type
==
proximity_out_type
));
SendMessageW
(
hwndTabletDefault
,
WT_PROXIMITY
,
(
WPARAM
)
hwnd
,
proximity_info
);
send_message
(
hwndTabletDefault
,
WT_PROXIMITY
,
(
WPARAM
)
hwnd
,
proximity_info
);
return
TRUE
;
}
...
...
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