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
d96bc155
Commit
d96bc155
authored
Apr 02, 1999
by
Francois Boisvert
Committed by
Alexandre Julliard
Apr 02, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suspend all windows locks before the control is passed to the
application. Also fixed some bugs in dce.c
parent
03b5529a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
7 deletions
+59
-7
callback.c
misc/callback.c
+10
-1
dce.c
windows/dce.c
+7
-3
win.c
windows/win.c
+31
-2
winproc.c
windows/winproc.c
+11
-1
No files found.
misc/callback.c
View file @
d96bc155
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include "user.h"
#include "user.h"
#include "queue.h"
#include "queue.h"
#include "debug.h"
#include "debug.h"
#include "win.h"
/**********************************************************************
/**********************************************************************
...
@@ -22,7 +23,15 @@ static LRESULT WINAPI CALLBACK_CallWndProc( WNDPROC16 proc, HWND16 hwnd,
...
@@ -22,7 +23,15 @@ static LRESULT WINAPI CALLBACK_CallWndProc( WNDPROC16 proc, HWND16 hwnd,
UINT16
msg
,
WPARAM16
wParam
,
UINT16
msg
,
WPARAM16
wParam
,
LPARAM
lParam
)
LPARAM
lParam
)
{
{
return
proc
(
hwnd
,
msg
,
wParam
,
lParam
);
LRESULT
retvalue
;
int
iWndsLocks
;
/* To avoid any deadlocks, all the locks on the windows structures
must be suspended before the control is passed to the application */
iWndsLocks
=
WIN_SuspendWndsLock
();
retvalue
=
proc
(
hwnd
,
msg
,
wParam
,
lParam
);
WIN_RestoreWndsLock
(
iWndsLocks
);
return
retvalue
;
}
}
...
...
windows/dce.c
View file @
d96bc155
...
@@ -227,7 +227,8 @@ static INT DCE_ReleaseDC( DCE* dce )
...
@@ -227,7 +227,8 @@ static INT DCE_ReleaseDC( DCE* dce )
*/
*/
BOOL
DCE_InvalidateDCE
(
WND
*
pWnd
,
const
RECT
*
pRectUpdate
)
BOOL
DCE_InvalidateDCE
(
WND
*
pWnd
,
const
RECT
*
pRectUpdate
)
{
{
WND
*
wndScope
=
pWnd
->
parent
;
WND
*
wndScope
=
WIN_LockWndPtr
(
pWnd
->
parent
);
WND
*
pDesktop
=
WIN_GetDesktop
();
BOOL
bRet
=
FALSE
;
BOOL
bRet
=
FALSE
;
if
(
wndScope
)
if
(
wndScope
)
...
@@ -260,10 +261,10 @@ BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
...
@@ -260,10 +261,10 @@ BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
continue
;
continue
;
}
}
if
(
!
Options
.
desktopGeometry
&&
wndCurrent
==
WIN_GetDesktop
()
)
if
(
!
Options
.
desktopGeometry
&&
wndCurrent
==
pDesktop
)
{
{
/* don't bother with fake desktop */
/* don't bother with fake desktop */
WIN_ReleaseDesktop
(
);
WIN_ReleaseWndPtr
(
wndCurrent
);
continue
;
continue
;
}
}
...
@@ -306,6 +307,7 @@ BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
...
@@ -306,6 +307,7 @@ BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
bRet
=
TRUE
;
bRet
=
TRUE
;
}
}
}
}
WIN_ReleaseWndPtr
(
wnd
);
break
;
break
;
}
}
xoffset
+=
wnd
->
rectClient
.
left
;
xoffset
+=
wnd
->
rectClient
.
left
;
...
@@ -315,7 +317,9 @@ BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
...
@@ -315,7 +317,9 @@ BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
WIN_ReleaseWndPtr
(
wndCurrent
);
WIN_ReleaseWndPtr
(
wndCurrent
);
}
}
}
/* dce list */
}
/* dce list */
WIN_ReleaseWndPtr
(
wndScope
);
}
}
WIN_ReleaseDesktop
();
return
bRet
;
return
bRet
;
}
}
...
...
windows/win.c
View file @
d96bc155
...
@@ -2766,9 +2766,19 @@ BOOL16 WINAPI EnumWindows16( WNDENUMPROC16 lpEnumFunc, LPARAM lParam )
...
@@ -2766,9 +2766,19 @@ BOOL16 WINAPI EnumWindows16( WNDENUMPROC16 lpEnumFunc, LPARAM lParam )
for
(
ppWnd
=
list
;
*
ppWnd
;
ppWnd
++
)
for
(
ppWnd
=
list
;
*
ppWnd
;
ppWnd
++
)
{
{
LRESULT
lpEnumFuncRetval
;
int
iWndsLocks
=
0
;
/* Make sure that the window still exists */
/* Make sure that the window still exists */
if
(
!
IsWindow
((
*
ppWnd
)
->
hwndSelf
))
continue
;
if
(
!
IsWindow
((
*
ppWnd
)
->
hwndSelf
))
continue
;
if
(
!
lpEnumFunc
(
(
*
ppWnd
)
->
hwndSelf
,
lParam
))
break
;
/* To avoid any deadlocks, all the locks on the windows
structures must be suspended before the control
is passed to the application */
iWndsLocks
=
WIN_SuspendWndsLock
();
lpEnumFuncRetval
=
lpEnumFunc
(
(
*
ppWnd
)
->
hwndSelf
,
lParam
);
WIN_RestoreWndsLock
(
iWndsLocks
);
if
(
!
lpEnumFuncRetval
)
break
;
}
}
WIN_ReleaseWinArray
(
list
);
WIN_ReleaseWinArray
(
list
);
WIN_ReleaseDesktop
();
WIN_ReleaseDesktop
();
...
@@ -2806,10 +2816,20 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func,
...
@@ -2806,10 +2816,20 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func,
for
(
ppWnd
=
list
;
*
ppWnd
;
ppWnd
++
)
for
(
ppWnd
=
list
;
*
ppWnd
;
ppWnd
++
)
{
{
LRESULT
funcRetval
;
int
iWndsLocks
=
0
;
/* Make sure that the window still exists */
/* Make sure that the window still exists */
if
(
!
IsWindow
((
*
ppWnd
)
->
hwndSelf
))
continue
;
if
(
!
IsWindow
((
*
ppWnd
)
->
hwndSelf
))
continue
;
if
(
QUEUE_GetQueueTask
((
*
ppWnd
)
->
hmemTaskQ
)
!=
hTask
)
continue
;
if
(
QUEUE_GetQueueTask
((
*
ppWnd
)
->
hmemTaskQ
)
!=
hTask
)
continue
;
if
(
!
func
(
(
*
ppWnd
)
->
hwndSelf
,
lParam
))
break
;
/* To avoid any deadlocks, all the locks on the windows
structures must be suspended before the control
is passed to the application */
iWndsLocks
=
WIN_SuspendWndsLock
();
funcRetval
=
func
(
(
*
ppWnd
)
->
hwndSelf
,
lParam
);
WIN_RestoreWndsLock
(
iWndsLocks
);
if
(
!
funcRetval
)
break
;
}
}
WIN_ReleaseWinArray
(
list
);
WIN_ReleaseWinArray
(
list
);
WIN_ReleaseDesktop
();
WIN_ReleaseDesktop
();
...
@@ -2841,11 +2861,20 @@ static BOOL16 WIN_EnumChildWindows( WND **ppWnd, WNDENUMPROC16 func,
...
@@ -2841,11 +2861,20 @@ static BOOL16 WIN_EnumChildWindows( WND **ppWnd, WNDENUMPROC16 func,
for
(
;
*
ppWnd
;
ppWnd
++
)
for
(
;
*
ppWnd
;
ppWnd
++
)
{
{
int
iWndsLocks
=
0
;
/* Make sure that the window still exists */
/* Make sure that the window still exists */
if
(
!
IsWindow
((
*
ppWnd
)
->
hwndSelf
))
continue
;
if
(
!
IsWindow
((
*
ppWnd
)
->
hwndSelf
))
continue
;
/* Build children list first */
/* Build children list first */
childList
=
WIN_BuildWinArray
(
*
ppWnd
,
BWA_SKIPOWNED
,
NULL
);
childList
=
WIN_BuildWinArray
(
*
ppWnd
,
BWA_SKIPOWNED
,
NULL
);
/* To avoid any deadlocks, all the locks on the windows
structures must be suspended before the control
is passed to the application */
iWndsLocks
=
WIN_SuspendWndsLock
();
ret
=
func
(
(
*
ppWnd
)
->
hwndSelf
,
lParam
);
ret
=
func
(
(
*
ppWnd
)
->
hwndSelf
,
lParam
);
WIN_RestoreWndsLock
(
iWndsLocks
);
if
(
childList
)
if
(
childList
)
{
{
if
(
ret
)
ret
=
WIN_EnumChildWindows
(
childList
,
func
,
lParam
);
if
(
ret
)
ret
=
WIN_EnumChildWindows
(
childList
,
func
,
lParam
);
...
...
windows/winproc.c
View file @
d96bc155
...
@@ -118,9 +118,17 @@ BOOL WINPROC_Init(void)
...
@@ -118,9 +118,17 @@ BOOL WINPROC_Init(void)
static
LRESULT
WINPROC_CallWndProc
(
WNDPROC
proc
,
HWND
hwnd
,
UINT
msg
,
static
LRESULT
WINPROC_CallWndProc
(
WNDPROC
proc
,
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
WPARAM
wParam
,
LPARAM
lParam
)
{
{
LRESULT
retvalue
;
int
iWndsLocks
;
TRACE
(
relay
,
"(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)
\n
"
,
TRACE
(
relay
,
"(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)
\n
"
,
proc
,
hwnd
,
SPY_GetMsgName
(
msg
),
wParam
,
lParam
);
proc
,
hwnd
,
SPY_GetMsgName
(
msg
),
wParam
,
lParam
);
return
proc
(
hwnd
,
msg
,
wParam
,
lParam
);
/* To avoid any deadlocks, all the locks on the windows structures
must be suspended before the control is passed to the application */
iWndsLocks
=
WIN_SuspendWndsLock
();
retvalue
=
proc
(
hwnd
,
msg
,
wParam
,
lParam
);
WIN_RestoreWndsLock
(
iWndsLocks
);
return
retvalue
;
}
}
...
@@ -2156,7 +2164,9 @@ LRESULT WINPROC_CallProc16To32W( HWND16 hwnd, UINT16 msg,
...
@@ -2156,7 +2164,9 @@ LRESULT WINPROC_CallProc16To32W( HWND16 hwnd, UINT16 msg,
if
(
WINPROC_MapMsg16To32W
(
hwnd
,
msg
,
wParam
,
&
msg32
,
&
wParam32
,
&
lParam
)
==
-
1
)
if
(
WINPROC_MapMsg16To32W
(
hwnd
,
msg
,
wParam
,
&
msg32
,
&
wParam32
,
&
lParam
)
==
-
1
)
return
0
;
return
0
;
result
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg32
,
wParam32
,
lParam
);
result
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg32
,
wParam32
,
lParam
);
return
WINPROC_UnmapMsg16To32W
(
hwnd
,
msg32
,
wParam32
,
lParam
,
result
);
return
WINPROC_UnmapMsg16To32W
(
hwnd
,
msg32
,
wParam32
,
lParam
,
result
);
}
}
...
...
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