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
9dbdd708
Commit
9dbdd708
authored
Sep 09, 2009
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Handle WM_DELETE_WINDOW by simulating clicking the caption Close button.
parent
c89b4aec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
event.c
dlls/winex11.drv/event.c
+6
-2
window.c
dlls/winex11.drv/window.c
+0
-2
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
No files found.
dlls/winex11.drv/event.c
View file @
9dbdd708
...
...
@@ -511,6 +511,7 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
if
(
IsWindowEnabled
(
hwnd
))
{
HMENU
hSysMenu
;
POINT
pt
;
if
(
GetClassLongW
(
hwnd
,
GCL_STYLE
)
&
CS_NOCLOSE
)
return
;
hSysMenu
=
GetSystemMenu
(
hwnd
,
FALSE
);
...
...
@@ -524,7 +525,7 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
{
LRESULT
ma
=
SendMessageW
(
hwnd
,
WM_MOUSEACTIVATE
,
(
WPARAM
)
GetAncestor
(
hwnd
,
GA_ROOT
),
MAKEL
ONG
(
HTCLOSE
,
WM_LBUTTONDOWN
)
);
MAKEL
PARAM
(
HTCLOSE
,
WM_NCLBUTTONDOWN
)
);
switch
(
ma
)
{
case
MA_NOACTIVATEANDEAT
:
...
...
@@ -541,7 +542,10 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
break
;
}
}
PostMessageW
(
hwnd
,
WM_X11DRV_DELETE_WINDOW
,
0
,
0
);
/* Simulate clicking the caption Close button */
GetCursorPos
(
&
pt
);
PostMessageW
(
hwnd
,
WM_NCLBUTTONDOWN
,
HTCLOSE
,
MAKELPARAM
(
pt
.
x
,
pt
.
y
)
);
PostMessageW
(
hwnd
,
WM_LBUTTONUP
,
HTCLOSE
,
MAKELPARAM
(
pt
.
x
,
pt
.
y
)
);
}
}
else
if
(
protocol
==
x11drv_atom
(
WM_TAKE_FOCUS
))
...
...
dlls/winex11.drv/window.c
View file @
9dbdd708
...
...
@@ -2308,8 +2308,6 @@ LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
{
case
WM_X11DRV_ACQUIRE_SELECTION
:
return
X11DRV_AcquireClipboard
(
hwnd
);
case
WM_X11DRV_DELETE_WINDOW
:
return
SendMessageW
(
hwnd
,
WM_SYSCOMMAND
,
SC_CLOSE
,
0
);
case
WM_X11DRV_SET_WIN_FORMAT
:
return
set_win_format
(
hwnd
,
(
XID
)
wp
);
case
WM_X11DRV_SET_WIN_REGION
:
...
...
dlls/winex11.drv/x11drv.h
View file @
9dbdd708
...
...
@@ -700,7 +700,6 @@ extern DWORD EVENT_x11_time_to_win32_time(Time time);
enum
x11drv_window_messages
{
WM_X11DRV_ACQUIRE_SELECTION
=
0x80001000
,
WM_X11DRV_DELETE_WINDOW
,
WM_X11DRV_SET_WIN_FORMAT
,
WM_X11DRV_SET_WIN_REGION
,
WM_X11DRV_RESIZE_DESKTOP
...
...
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