Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
b650372b
Commit
b650372b
authored
21 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Don't bother sending WM_NCCREATE to the desktop window, this doesn't
work anyway (spotted by Uwe Bonnes).
parent
5abc0654
No related branches found
Branches containing commit
Tags
wine-961117
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
controls/desktop.c
+3
-15
3 additions, 15 deletions
controls/desktop.c
dlls/ttydrv/wnd.c
+22
-21
22 additions, 21 deletions
dlls/ttydrv/wnd.c
dlls/x11drv/desktop.c
+7
-0
7 additions, 0 deletions
dlls/x11drv/desktop.c
dlls/x11drv/window.c
+2
-3
2 additions, 3 deletions
dlls/x11drv/window.c
with
34 additions
and
39 deletions
controls/desktop.c
+
3
−
15
View file @
b650372b
...
...
@@ -116,18 +116,8 @@ static HBITMAP DESKTOP_LoadBitmap( HDC hdc, const char *filename )
*/
static
LRESULT
WINAPI
DesktopWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
retvalue
=
0
;
if
(
message
==
WM_NCCREATE
)
{
hbrushPattern
=
0
;
hbitmapWallPaper
=
0
;
SetDeskPattern
();
SetDeskWallPaper
(
(
LPSTR
)
-
1
);
retvalue
=
1
;
}
/* all other messages are ignored */
return
retvalue
;
/* all messages are ignored */
return
0
;
}
/***********************************************************************
...
...
@@ -192,9 +182,7 @@ BOOL WINAPI PaintDesktop(HDC hdc)
*/
BOOL16
WINAPI
SetDeskPattern
(
void
)
{
char
buffer
[
100
];
GetProfileStringA
(
"desktop"
,
"Pattern"
,
"(None)"
,
buffer
,
100
);
return
DESKTOP_SetPattern
(
buffer
);
return
SystemParametersInfoA
(
SPI_SETDESKPATTERN
,
-
1
,
NULL
,
FALSE
);
}
...
...
This diff is collapsed.
Click to expand it.
dlls/ttydrv/wnd.c
+
22
−
21
View file @
b650372b
...
...
@@ -44,42 +44,43 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
BOOL
ret
;
HWND
hwndLinkAfter
;
CBT_CREATEWNDA
cbtc
;
#ifdef WINE_CURSES
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
WINDOW
*
window
;
INT
cellWidth
=
8
,
cellHeight
=
8
;
/* FIXME: Hardcoded */
TRACE
(
"(%p)
\n
"
,
hwnd
);
if
(
!
wndPtr
->
parent
)
/* desktop window */
{
wndPtr
->
pDriverData
=
root_window
;
WIN_ReleasePtr
(
wndPtr
);
return
TRUE
;
}
#ifdef WINE_CURSES
/* Only create top-level windows */
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
))
{
if
(
!
wndPtr
->
parent
)
/* desktop */
window
=
root_window
;
else
{
int
x
=
wndPtr
->
rectWindow
.
left
;
int
y
=
wndPtr
->
rectWindow
.
top
;
int
cx
=
wndPtr
->
rectWindow
.
right
-
wndPtr
->
rectWindow
.
left
;
int
cy
=
wndPtr
->
rectWindow
.
bottom
-
wndPtr
->
rectWindow
.
top
;
window
=
subwin
(
root_window
,
cy
/
cellHeight
,
cx
/
cellWidth
,
y
/
cellHeight
,
x
/
cellWidth
);
werase
(
window
);
wrefresh
(
window
);
}
WINDOW
*
window
;
const
INT
cellWidth
=
8
,
cellHeight
=
8
;
/* FIXME: Hardcoded */
int
x
=
wndPtr
->
rectWindow
.
left
;
int
y
=
wndPtr
->
rectWindow
.
top
;
int
cx
=
wndPtr
->
rectWindow
.
right
-
wndPtr
->
rectWindow
.
left
;
int
cy
=
wndPtr
->
rectWindow
.
bottom
-
wndPtr
->
rectWindow
.
top
;
window
=
subwin
(
root_window
,
cy
/
cellHeight
,
cx
/
cellWidth
,
y
/
cellHeight
,
x
/
cellWidth
);
werase
(
window
);
wrefresh
(
window
);
wndPtr
->
pDriverData
=
window
;
}
WIN_ReleasePtr
(
wndPtr
);
#else
/* defined(WINE_CURSES) */
FIXME
(
"(%x): stub
\n
"
,
hwnd
);
#endif
/* defined(WINE_CURSES) */
WIN_ReleasePtr
(
wndPtr
);
/* Call the WH_CBT hook */
hwndLinkAfter
=
((
cs
->
style
&
(
WS_CHILD
|
WS_MAXIMIZE
))
==
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
hwndLinkAfter
=
((
cs
->
style
&
(
WS_CHILD
|
WS_MAXIMIZE
))
==
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
cbtc
.
lpcs
=
cs
;
cbtc
.
hwndInsertAfter
=
hwndLinkAfter
;
...
...
This diff is collapsed.
Click to expand it.
dlls/x11drv/desktop.c
+
7
−
0
View file @
b650372b
...
...
@@ -36,6 +36,11 @@ static LRESULT WINAPI desktop_winproc( HWND hwnd, UINT message, WPARAM wParam, L
{
switch
(
message
)
{
case
WM_NCCREATE
:
SystemParametersInfoA
(
SPI_SETDESKPATTERN
,
-
1
,
NULL
,
FALSE
);
SetDeskWallPaper
(
(
LPSTR
)
-
1
);
return
TRUE
;
case
WM_ERASEBKGND
:
PaintDesktop
(
(
HDC
)
wParam
);
ValidateRect
(
hwnd
,
NULL
);
...
...
@@ -79,6 +84,8 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data )
XMapWindow
(
display
,
root_window
);
wine_tsx11_unlock
();
SendMessageW
(
hwnd
,
WM_NCCREATE
,
0
,
0
/* should be CREATESTRUCT */
);
while
(
GetMessageW
(
&
msg
,
hwnd
,
0
,
0
))
DispatchMessageW
(
&
msg
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/x11drv/window.c
+
2
−
3
View file @
b650372b
...
...
@@ -612,7 +612,7 @@ void X11DRV_register_window( Display *display, HWND hwnd, struct x11drv_win_data
/**********************************************************************
* create_desktop
*/
static
void
create_desktop
(
Display
*
display
,
WND
*
wndPtr
,
CREATESTRUCTA
*
cs
)
static
void
create_desktop
(
Display
*
display
,
WND
*
wndPtr
)
{
X11DRV_WND_DATA
*
data
=
wndPtr
->
pDriverData
;
...
...
@@ -640,7 +640,6 @@ static void create_desktop( Display *display, WND *wndPtr, CREATESTRUCTA *cs )
SetPropA
(
wndPtr
->
hwndSelf
,
client_window_atom
,
(
HANDLE
)
root_window
);
SetPropA
(
wndPtr
->
hwndSelf
,
"__wine_x11_visual_id"
,
(
HANDLE
)
XVisualIDFromVisual
(
visual
)
);
SendMessageW
(
wndPtr
->
hwndSelf
,
WM_NCCREATE
,
0
,
(
LPARAM
)
cs
);
if
(
root_window
!=
DefaultRootWindow
(
display
))
X11DRV_create_desktop_thread
();
}
...
...
@@ -899,7 +898,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
if
(
!
wndPtr
->
parent
)
{
create_desktop
(
display
,
wndPtr
,
cs
);
create_desktop
(
display
,
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
return
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment