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
0f2f2b34
Commit
0f2f2b34
authored
Jan 09, 2002
by
Rein Klazes
Committed by
Alexandre Julliard
Jan 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move calling of CBT hooks from WIN_CreateWindowEx() to the driver.
parent
19d66cc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
27 deletions
+53
-27
wnd.c
dlls/ttydrv/wnd.c
+25
-0
window.c
dlls/x11drv/window.c
+27
-0
win.c
windows/win.c
+1
-27
No files found.
dlls/ttydrv/wnd.c
View file @
0f2f2b34
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "win.h"
#include "win.h"
#include "winpos.h"
#include "winpos.h"
#include "debugtools.h"
#include "debugtools.h"
#include "hook.h"
DEFAULT_DEBUG_CHANNEL
(
ttydrv
);
DEFAULT_DEBUG_CHANNEL
(
ttydrv
);
...
@@ -28,6 +29,7 @@ DEFAULT_DEBUG_CHANNEL(ttydrv);
...
@@ -28,6 +29,7 @@ DEFAULT_DEBUG_CHANNEL(ttydrv);
BOOL
TTYDRV_CreateWindow
(
HWND
hwnd
,
CREATESTRUCTA
*
cs
,
BOOL
unicode
)
BOOL
TTYDRV_CreateWindow
(
HWND
hwnd
,
CREATESTRUCTA
*
cs
,
BOOL
unicode
)
{
{
BOOL
ret
;
BOOL
ret
;
HWND
hwndLinkAfter
;
#ifdef WINE_CURSES
#ifdef WINE_CURSES
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
...
@@ -60,6 +62,29 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
...
@@ -60,6 +62,29 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
FIXME
(
"(%x): stub
\n
"
,
hwnd
);
FIXME
(
"(%x): stub
\n
"
,
hwnd
);
#endif
/* defined(WINE_CURSES) */
#endif
/* defined(WINE_CURSES) */
/* Call the WH_CBT hook */
hwndLinkAfter
=
((
cs
->
style
&
(
WS_CHILD
|
WS_MAXIMIZE
))
==
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
if
(
HOOK_IsHooked
(
WH_CBT
))
{
CBT_CREATEWNDA
cbtc
;
LRESULT
lret
;
cbtc
.
lpcs
=
cs
;
cbtc
.
hwndInsertAfter
=
hwndLinkAfter
;
lret
=
(
unicode
)
?
HOOK_CallHooksW
(
WH_CBT
,
HCBT_CREATEWND
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
&
cbtc
)
:
HOOK_CallHooksA
(
WH_CBT
,
HCBT_CREATEWND
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
&
cbtc
);
if
(
lret
)
{
TRACE
(
"CBT-hook returned !0
\n
"
);
return
FALSE
;
}
}
if
(
unicode
)
if
(
unicode
)
{
{
ret
=
SendMessageW
(
hwnd
,
WM_NCCREATE
,
0
,
(
LPARAM
)
cs
);
ret
=
SendMessageW
(
hwnd
,
WM_NCCREATE
,
0
,
(
LPARAM
)
cs
);
...
...
dlls/x11drv/window.c
View file @
0f2f2b34
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "winpos.h"
#include "winpos.h"
#include "dce.h"
#include "dce.h"
#include "options.h"
#include "options.h"
#include "hook.h"
DEFAULT_DEBUG_CHANNEL
(
x11drv
);
DEFAULT_DEBUG_CHANNEL
(
x11drv
);
...
@@ -821,6 +822,7 @@ BOOL X11DRV_DestroyWindow( HWND hwnd )
...
@@ -821,6 +822,7 @@ BOOL X11DRV_DestroyWindow( HWND hwnd )
*/
*/
BOOL
X11DRV_CreateWindow
(
HWND
hwnd
,
CREATESTRUCTA
*
cs
,
BOOL
unicode
)
BOOL
X11DRV_CreateWindow
(
HWND
hwnd
,
CREATESTRUCTA
*
cs
,
BOOL
unicode
)
{
{
HWND
hwndLinkAfter
;
Display
*
display
=
thread_display
();
Display
*
display
=
thread_display
();
WND
*
wndPtr
;
WND
*
wndPtr
;
struct
x11drv_win_data
*
data
;
struct
x11drv_win_data
*
data
;
...
@@ -855,6 +857,31 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
...
@@ -855,6 +857,31 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
SetPropA
(
hwnd
,
whole_window_atom
,
(
HANDLE
)
data
->
whole_window
);
SetPropA
(
hwnd
,
whole_window_atom
,
(
HANDLE
)
data
->
whole_window
);
SetPropA
(
hwnd
,
client_window_atom
,
(
HANDLE
)
data
->
client_window
);
SetPropA
(
hwnd
,
client_window_atom
,
(
HANDLE
)
data
->
client_window
);
/* Call the WH_CBT hook */
hwndLinkAfter
=
((
cs
->
style
&
(
WS_CHILD
|
WS_MAXIMIZE
))
==
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
if
(
HOOK_IsHooked
(
WH_CBT
))
{
CBT_CREATEWNDA
cbtc
;
LRESULT
lret
;
cbtc
.
lpcs
=
cs
;
cbtc
.
hwndInsertAfter
=
hwndLinkAfter
;
lret
=
(
unicode
)
?
HOOK_CallHooksW
(
WH_CBT
,
HCBT_CREATEWND
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
&
cbtc
)
:
HOOK_CallHooksA
(
WH_CBT
,
HCBT_CREATEWND
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
&
cbtc
);
if
(
lret
)
{
TRACE
(
"CBT-hook returned !0
\n
"
);
goto
failed
;
}
}
/* Send the WM_GETMINMAXINFO message and fix the size if needed */
/* Send the WM_GETMINMAXINFO message and fix the size if needed */
if
((
cs
->
style
&
WS_THICKFRAME
)
||
!
(
cs
->
style
&
(
WS_POPUP
|
WS_CHILD
)))
if
((
cs
->
style
&
WS_THICKFRAME
)
||
!
(
cs
->
style
&
(
WS_POPUP
|
WS_CHILD
)))
{
{
...
...
windows/win.c
View file @
0f2f2b34
...
@@ -961,7 +961,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
...
@@ -961,7 +961,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
INT
sw
=
SW_SHOW
;
INT
sw
=
SW_SHOW
;
struct
tagCLASS
*
classPtr
;
struct
tagCLASS
*
classPtr
;
WND
*
wndPtr
;
WND
*
wndPtr
;
HWND
hwnd
,
hwndLinkAfter
,
parent
,
owner
;
HWND
hwnd
,
parent
,
owner
;
INT
wndExtra
;
INT
wndExtra
;
DWORD
clsStyle
;
DWORD
clsStyle
;
WNDPROC
winproc
;
WNDPROC
winproc
;
...
@@ -1067,32 +1067,6 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
...
@@ -1067,32 +1067,6 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if
(
wndExtra
)
memset
(
wndPtr
->
wExtra
,
0
,
wndExtra
);
if
(
wndExtra
)
memset
(
wndPtr
->
wExtra
,
0
,
wndExtra
);
/* Call the WH_CBT hook */
hwndLinkAfter
=
((
cs
->
style
&
(
WS_CHILD
|
WS_MAXIMIZE
))
==
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
if
(
HOOK_IsHooked
(
WH_CBT
))
{
CBT_CREATEWNDA
cbtc
;
LRESULT
ret
;
cbtc
.
lpcs
=
cs
;
cbtc
.
hwndInsertAfter
=
hwndLinkAfter
;
ret
=
(
type
==
WIN_PROC_32W
)
?
HOOK_CallHooksW
(
WH_CBT
,
HCBT_CREATEWND
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
&
cbtc
)
:
HOOK_CallHooksA
(
WH_CBT
,
HCBT_CREATEWND
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
&
cbtc
);
if
(
ret
)
{
TRACE
(
"CBT-hook returned 0
\n
"
);
free_window_handle
(
hwnd
);
CLASS_RemoveWindow
(
classPtr
);
WIN_ReleaseWndPtr
(
wndPtr
);
return
0
;
}
}
/* Correct the window style - stage 2 */
/* Correct the window style - stage 2 */
if
(
!
(
cs
->
style
&
WS_CHILD
))
if
(
!
(
cs
->
style
&
WS_CHILD
))
...
...
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