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
f88e5aa7
Commit
f88e5aa7
authored
Mar 21, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up assumptions about WS_CHILD flag so that we can allow it to
be changed in SetWindowLong.
parent
2f7292cb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
19 deletions
+18
-19
dce.c
windows/dce.c
+1
-1
dialog.c
windows/dialog.c
+1
-1
nonclient.c
windows/nonclient.c
+3
-3
win.c
windows/win.c
+7
-9
winpos.c
windows/winpos.c
+2
-2
wnd.c
windows/x11drv/wnd.c
+4
-3
No files found.
windows/dce.c
View file @
f88e5aa7
...
...
@@ -560,7 +560,7 @@ HRGN DCE_GetVisRgn( HWND hwnd, WORD flags, HWND hwndChild, WORD cflags )
* WS_CLIPSIBLINGS style
*/
while
(
wndPtr
->
dwStyle
&
WS_CHILD
)
while
(
wndPtr
->
parent
)
{
WIN_UpdateWndPtr
(
&
wndPtr
,
wndPtr
->
parent
);
xoffset
-=
wndPtr
->
rectClient
.
left
;
...
...
windows/dialog.c
View file @
f88e5aa7
...
...
@@ -1994,7 +1994,7 @@ HWND WINAPI GetNextDlgGroupItem( HWND hwndDlg, HWND hwndCtrl,
goto
END
;
}
/* Make sure hwndCtrl is a top-level child */
while
(
(
pWndCtrl
->
dwStyle
&
WS_CHILD
)
&&
(
pWndCtrl
->
parent
!=
pWndDlg
))
while
(
pWndCtrl
->
parent
&&
(
pWndCtrl
->
parent
!=
pWndDlg
))
WIN_UpdateWndPtr
(
&
pWndCtrl
,
pWndCtrl
->
parent
);
if
(
pWndCtrl
->
parent
!=
pWndDlg
)
{
...
...
windows/nonclient.c
View file @
f88e5aa7
...
...
@@ -2101,7 +2101,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
if
(
GetCapture
()
!=
hwnd
)
SetCapture
(
hwnd
);
if
(
wndPtr
->
dwStyle
&
WS_CHILD
)
if
(
wndPtr
->
parent
&&
(
wndPtr
->
parent
->
hwndSelf
!=
GetDesktopWindow
())
)
{
/* Retrieve a default cache DC (without using the window style) */
hdc
=
GetDCEx
(
wndPtr
->
parent
->
hwndSelf
,
0
,
DCX_CACHE
);
...
...
@@ -2235,7 +2235,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
if
(
!
DragFullWindows
)
NC_DrawMovingFrame
(
hdc
,
&
sizingRect
,
thickframe
);
if
(
wndPtr
->
dwStyle
&
WS_CHILD
)
if
(
wndPtr
->
parent
&&
(
wndPtr
->
parent
->
hwndSelf
!=
GetDesktopWindow
())
)
ReleaseDC
(
wndPtr
->
parent
->
hwndSelf
,
hdc
);
else
ReleaseDC
(
0
,
hdc
);
...
...
@@ -2693,7 +2693,7 @@ LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT pt )
TRACE
(
"Handling WM_SYSCOMMAND %x %ld,%ld
\n
"
,
wParam
,
pt
.
x
,
pt
.
y
);
if
(
(
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
(
uCommand
!=
SC_KEYMENU
))
if
(
wndPtr
->
parent
&&
(
uCommand
!=
SC_KEYMENU
))
ScreenToClient
(
wndPtr
->
parent
->
hwndSelf
,
&
pt
);
switch
(
uCommand
)
...
...
windows/win.c
View file @
f88e5aa7
...
...
@@ -1329,11 +1329,11 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
{
if
(
h
==
hwnd
)
{
SetFocus
(
Get
WindowLongA
(
hwnd
,
GWL_HWNDPARENT
));
SetFocus
(
Get
Parent
(
h
));
bFocusSet
=
TRUE
;
break
;
}
h
=
Get
WindowLongA
(
h
,
GWL_HWNDPARENT
);
h
=
Get
Parent
(
h
);
}
/* If the focus is on the window we will destroy and it has no parent,
* set the focus to 0.
...
...
@@ -2031,9 +2031,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
goto
end
;
case
GWL_STYLE
:
style
.
styleOld
=
wndPtr
->
dwStyle
;
newval
&=
~
(
WS_CHILD
);
/* this bit can't be changed this way */
style
.
styleNew
=
newval
|
(
style
.
styleOld
&
(
WS_CHILD
));
style
.
styleNew
=
newval
;
if
(
wndPtr
->
flags
&
WIN_ISWIN32
)
SendMessageA
(
hwnd
,
WM_STYLECHANGING
,
GWL_STYLE
,(
LPARAM
)
&
style
);
wndPtr
->
dwStyle
=
style
.
styleNew
;
...
...
@@ -2454,9 +2452,10 @@ BOOL16 WINAPI IsChild16( HWND16 parent, HWND16 child )
BOOL
WINAPI
IsChild
(
HWND
parent
,
HWND
child
)
{
WND
*
wndPtr
=
WIN_FindWndPtr
(
child
);
while
(
wndPtr
&&
(
wndPtr
->
dwStyle
&
WS_CHILD
)
)
while
(
wndPtr
&&
wndPtr
->
parent
)
{
WIN_UpdateWndPtr
(
&
wndPtr
,
wndPtr
->
parent
);
if
(
wndPtr
->
hwndSelf
==
GetDesktopWindow
())
break
;
if
(
wndPtr
->
hwndSelf
==
parent
)
{
WIN_ReleaseWndPtr
(
wndPtr
);
...
...
@@ -2484,7 +2483,7 @@ BOOL WINAPI IsWindowVisible( HWND hwnd )
{
BOOL
retval
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
while
(
wndPtr
&&
(
wndPtr
->
dwStyle
&
WS_CHILD
)
)
while
(
wndPtr
&&
wndPtr
->
parent
)
{
if
(
!
(
wndPtr
->
dwStyle
&
WS_VISIBLE
))
{
...
...
@@ -2496,7 +2495,6 @@ BOOL WINAPI IsWindowVisible( HWND hwnd )
retval
=
(
wndPtr
&&
(
wndPtr
->
dwStyle
&
WS_VISIBLE
));
WIN_ReleaseWndPtr
(
wndPtr
);
return
retval
;
}
...
...
@@ -3159,7 +3157,7 @@ BOOL16 DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo, BOOL bNoSend )
if
(
!
(
ptrQueryWnd
->
dwStyle
&
WS_MINIMIZE
)
)
{
tempRect
=
ptrQueryWnd
->
rectClient
;
if
(
ptrQueryWnd
->
dwStyle
&
WS_CHILD
)
if
(
ptrQueryWnd
->
parent
)
MapWindowPoints
(
ptrQueryWnd
->
parent
->
hwndSelf
,
0
,
(
LPPOINT
)
&
tempRect
,
2
);
...
...
windows/winpos.c
View file @
f88e5aa7
...
...
@@ -246,7 +246,7 @@ void WINAPI GetWindowRect16( HWND16 hwnd, LPRECT16 rect )
if
(
!
wndPtr
)
return
;
CONV_RECT32TO16
(
&
wndPtr
->
rectWindow
,
rect
);
if
(
wndPtr
->
dwStyle
&
WS_CHILD
)
if
(
wndPtr
->
parent
)
MapWindowPoints16
(
wndPtr
->
parent
->
hwndSelf
,
0
,
(
POINT16
*
)
rect
,
2
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
...
...
@@ -261,7 +261,7 @@ BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect )
if
(
!
wndPtr
)
return
FALSE
;
*
rect
=
wndPtr
->
rectWindow
;
if
(
wndPtr
->
dwStyle
&
WS_CHILD
)
if
(
wndPtr
->
parent
)
MapWindowPoints
(
wndPtr
->
parent
->
hwndSelf
,
0
,
(
POINT
*
)
rect
,
2
);
WIN_ReleaseWndPtr
(
wndPtr
);
return
TRUE
;
...
...
windows/x11drv/wnd.c
View file @
f88e5aa7
...
...
@@ -851,7 +851,8 @@ void X11DRV_WND_SetFocus(WND *wndPtr)
void
X11DRV_WND_PreSizeMove
(
WND
*
wndPtr
)
{
/* Grab the server only when moving top-level windows without desktop */
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
(
X11DRV_GetXRootWindow
()
==
DefaultRootWindow
(
display
)))
if
((
X11DRV_GetXRootWindow
()
==
DefaultRootWindow
(
display
))
&&
(
wndPtr
->
parent
->
hwndSelf
==
GetDesktopWindow
()))
TSXGrabServer
(
display
);
}
...
...
@@ -860,8 +861,8 @@ void X11DRV_WND_PreSizeMove(WND *wndPtr)
*/
void
X11DRV_WND_PostSizeMove
(
WND
*
wndPtr
)
{
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
(
X11DRV_GetXRootWindow
()
==
DefaultRootWindow
(
display
)))
if
(
(
X11DRV_GetXRootWindow
()
==
DefaultRootWindow
(
display
))
&&
(
wndPtr
->
parent
->
hwndSelf
==
GetDesktopWindow
(
)))
TSXUngrabServer
(
display
);
}
...
...
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