Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
19e8cc96
Commit
19e8cc96
authored
Jun 16, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move WM_NCLBUTTONDBLCLK and WM_LBUTTONDBLCLK implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
bdae778e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
58 deletions
+48
-58
controls.h
dlls/user32/controls.h
+0
-1
defwnd.c
dlls/user32/defwnd.c
+0
-6
nonclient.c
dlls/user32/nonclient.c
+0
-51
defwnd.c
dlls/win32u/defwnd.c
+48
-0
No files found.
dlls/user32/controls.h
View file @
19e8cc96
...
...
@@ -121,7 +121,6 @@ extern HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu ) DECLSPEC_HIDDEN;
/* nonclient area */
extern
LRESULT
NC_HandleNCMouseMove
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCMouseLeave
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCLButtonDblClk
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleSysCommand
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
/* scrollbar */
...
...
dlls/user32/defwnd.c
View file @
19e8cc96
...
...
@@ -175,12 +175,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
iF10Key
=
iMenuSysKey
=
0
;
break
;
case
WM_LBUTTONDBLCLK
:
return
NC_HandleNCLButtonDblClk
(
hwnd
,
HTCLIENT
,
lParam
);
case
WM_NCLBUTTONDBLCLK
:
return
NC_HandleNCLButtonDblClk
(
hwnd
,
wParam
,
lParam
);
case
WM_RBUTTONUP
:
{
POINT
pt
;
...
...
dlls/user32/nonclient.c
View file @
19e8cc96
...
...
@@ -261,57 +261,6 @@ static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt )
/***********************************************************************
* NC_HandleNCLButtonDblClk
*
* Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc().
*/
LRESULT
NC_HandleNCLButtonDblClk
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
/*
* if this is an icon, send a restore since we are handling
* a double click
*/
if
(
IsIconic
(
hwnd
))
{
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
SC_RESTORE
,
lParam
);
return
0
;
}
switch
(
wParam
)
/* Hit test */
{
case
HTCAPTION
:
/* stop processing if WS_MAXIMIZEBOX is missing */
if
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_MAXIMIZEBOX
)
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
IsZoomed
(
hwnd
)
?
SC_RESTORE
:
SC_MAXIMIZE
,
lParam
);
break
;
case
HTSYSMENU
:
{
HMENU
hSysMenu
=
NtUserGetSystemMenu
(
hwnd
,
FALSE
);
UINT
state
=
GetMenuState
(
hSysMenu
,
SC_CLOSE
,
MF_BYCOMMAND
);
/* If the close item of the sysmenu is disabled or not present do nothing */
if
((
state
&
(
MF_DISABLED
|
MF_GRAYED
))
||
(
state
==
0xFFFFFFFF
))
break
;
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
SC_CLOSE
,
lParam
);
break
;
}
case
HTHSCROLL
:
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
SC_HSCROLL
+
HTHSCROLL
,
lParam
);
break
;
case
HTVSCROLL
:
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
SC_VSCROLL
+
HTVSCROLL
,
lParam
);
break
;
}
return
0
;
}
/***********************************************************************
* NC_HandleSysCommand
*
* Handle a WM_SYSCOMMAND message. Called from DefWindowProc().
...
...
dlls/win32u/defwnd.c
View file @
19e8cc96
...
...
@@ -2169,6 +2169,48 @@ static LRESULT handle_nc_rbutton_down( HWND hwnd, WPARAM wparam, LPARAM lparam )
return
0
;
}
static
LRESULT
handle_nc_button_dbl_click
(
HWND
hwnd
,
WPARAM
wparam
,
LPARAM
lparam
)
{
/* if this is an icon, send a restore since we are handling a double click */
if
(
is_iconic
(
hwnd
))
{
send_message
(
hwnd
,
WM_SYSCOMMAND
,
SC_RESTORE
,
lparam
);
return
0
;
}
switch
(
wparam
)
/* Hit test */
{
case
HTCAPTION
:
/* stop processing if WS_MAXIMIZEBOX is missing */
if
(
get_window_long
(
hwnd
,
GWL_STYLE
)
&
WS_MAXIMIZEBOX
)
send_message
(
hwnd
,
WM_SYSCOMMAND
,
is_zoomed
(
hwnd
)
?
SC_RESTORE
:
SC_MAXIMIZE
,
lparam
);
break
;
case
HTSYSMENU
:
{
HMENU
hSysMenu
=
NtUserGetSystemMenu
(
hwnd
,
FALSE
);
UINT
state
=
get_menu_state
(
hSysMenu
,
SC_CLOSE
,
MF_BYCOMMAND
);
/* If the close item of the sysmenu is disabled or not present do nothing */
if
((
state
&
(
MF_DISABLED
|
MF_GRAYED
))
||
state
==
0xffffffff
)
break
;
send_message
(
hwnd
,
WM_SYSCOMMAND
,
SC_CLOSE
,
lparam
);
break
;
}
case
HTHSCROLL
:
send_message
(
hwnd
,
WM_SYSCOMMAND
,
SC_HSCROLL
+
HTHSCROLL
,
lparam
);
break
;
case
HTVSCROLL
:
send_message
(
hwnd
,
WM_SYSCOMMAND
,
SC_VSCROLL
+
HTVSCROLL
,
lparam
);
break
;
}
return
0
;
}
LRESULT
default_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
BOOL
ansi
)
{
LRESULT
result
=
0
;
...
...
@@ -2220,6 +2262,12 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
case
WM_NCRBUTTONDOWN
:
return
handle_nc_rbutton_down
(
hwnd
,
wparam
,
lparam
);
case
WM_LBUTTONDBLCLK
:
return
handle_nc_button_dbl_click
(
hwnd
,
HTCLIENT
,
lparam
);
case
WM_NCLBUTTONDBLCLK
:
return
handle_nc_button_dbl_click
(
hwnd
,
wparam
,
lparam
);
case
WM_CONTEXTMENU
:
if
(
get_window_long
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
send_message
(
get_parent
(
hwnd
),
msg
,
(
WPARAM
)
hwnd
,
lparam
);
...
...
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