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
00bf3811
Commit
00bf3811
authored
Jul 24, 1999
by
Sylvain St-Germain
Committed by
Alexandre Julliard
Jul 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed inconsistency in conditions that determines if a window requires
a WM border.
parent
28896ee7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
9 deletions
+22
-9
win.h
include/win.h
+4
-0
nonclient.c
windows/nonclient.c
+17
-6
wnd.c
windows/x11drv/wnd.c
+1
-3
No files found.
include/win.h
View file @
00bf3811
...
...
@@ -226,4 +226,8 @@ extern LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
extern
LRESULT
WINAPI
ListBoxWndProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
extern
LRESULT
WINAPI
ComboLBWndProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
);
/* generic method that returns TRUE if the window properties ask for a
window manager type of border */
extern
BOOL
WIN_WindowNeedsWMBorder
(
DWORD
style
,
DWORD
exStyle
);
#endif
/* __WINE_WIN_H */
windows/nonclient.c
View file @
00bf3811
...
...
@@ -75,6 +75,21 @@ static HBITMAP16 hbitmapRestoreD = 0;
(((hit) == HTBOTTOM) || ((hit) == HTBOTTOMLEFT) || ((hit) == HTBOTTOMRIGHT))
/***********************************************************************
* WIN_WindowNeedsWMBorder
*
* This method defines the rules for a window to have a WM border,
* caption... It is used for consitency purposes.
*/
BOOL
WIN_WindowNeedsWMBorder
(
DWORD
style
,
DWORD
exStyle
)
{
if
(
!
(
style
&
WS_CHILD
)
&&
Options
.
managed
&&
(((
style
&
WS_CAPTION
)
==
WS_CAPTION
)
||
(
style
&
WS_THICKFRAME
)
||
(
exStyle
&
WS_EX_DLGMODALFRAME
)))
return
TRUE
;
return
FALSE
;
}
/***********************************************************************
* NC_AdjustRect
*
* Compute the size of the window rectangle from the size of the
...
...
@@ -88,9 +103,7 @@ static void NC_AdjustRect( LPRECT16 rect, DWORD style, BOOL menu,
if
(
style
&
WS_ICONIC
)
return
;
/* Decide if the window will be managed (see CreateWindowEx) */
if
(
!
(
Options
.
managed
&&
!
(
style
&
WS_CHILD
)
&&
((
style
&
(
WS_DLGFRAME
|
WS_THICKFRAME
))
||
(
exStyle
&
WS_EX_DLGMODALFRAME
))))
if
(
!
WIN_WindowNeedsWMBorder
(
style
,
exStyle
))
{
if
(
HAS_THICKFRAME
(
style
,
exStyle
))
InflateRect16
(
rect
,
GetSystemMetrics
(
SM_CXFRAME
),
GetSystemMetrics
(
SM_CYFRAME
)
);
...
...
@@ -156,9 +169,7 @@ NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL menu, DWORD exStyle)
if
(
style
&
WS_ICONIC
)
return
;
/* Decide if the window will be managed (see CreateWindowEx) */
if
(
!
(
Options
.
managed
&&
!
(
style
&
WS_CHILD
)
&&
((
style
&
(
WS_DLGFRAME
|
WS_THICKFRAME
))
||
(
exStyle
&
WS_EX_DLGMODALFRAME
))))
if
(
!
WIN_WindowNeedsWMBorder
(
style
,
exStyle
))
{
if
(
HAS_THICKFRAME
(
style
,
exStyle
))
InflateRect16
(
rect
,
GetSystemMetrics
(
SM_CXFRAME
),
GetSystemMetrics
(
SM_CYFRAME
)
);
...
...
windows/x11drv/wnd.c
View file @
00bf3811
...
...
@@ -188,9 +188,7 @@ BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BO
/* Create "managed" windows only if a title bar or resizable */
/* frame is required. */
if
(
Options
.
managed
&&
(
((
cs
->
style
&
WS_CAPTION
)
==
WS_CAPTION
)
||
(
cs
->
style
&
WS_THICKFRAME
)
||
(
cs
->
dwExStyle
&
WS_EX_DLGMODALFRAME
)))
if
(
WIN_WindowNeedsWMBorder
(
cs
->
style
,
cs
->
dwExStyle
))
{
win_attr
.
event_mask
=
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
PointerMotionMask
|
...
...
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