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
b650372b
Commit
b650372b
authored
Apr 19, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't bother sending WM_NCCREATE to the desktop window, this doesn't
work anyway (spotted by Uwe Bonnes).
parent
5abc0654
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
39 deletions
+34
-39
desktop.c
controls/desktop.c
+3
-15
wnd.c
dlls/ttydrv/wnd.c
+22
-21
desktop.c
dlls/x11drv/desktop.c
+7
-0
window.c
dlls/x11drv/window.c
+2
-3
No files found.
controls/desktop.c
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
);
}
...
...
dlls/ttydrv/wnd.c
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
;
...
...
dlls/x11drv/desktop.c
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
;
}
...
...
dlls/x11drv/window.c
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
;
}
...
...
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