Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
204596f9
Commit
204596f9
authored
Jul 07, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay creation of the internal pos atom until needed.
parent
f0d9fe78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
17 deletions
+15
-17
win.c
dlls/user/win.c
+0
-2
winpos.c
dlls/user/winpos.c
+15
-14
winpos.h
include/winpos.h
+0
-1
No files found.
dlls/user/win.c
View file @
204596f9
...
...
@@ -617,8 +617,6 @@ BOOL WIN_CreateDesktopWindow(void)
TRACE
(
"Creating desktop window
\n
"
);
if
(
!
WINPOS_CreateInternalPosAtom
())
return
FALSE
;
SERVER_START_REQ
(
create_window
)
{
req
->
parent
=
0
;
...
...
dlls/user/winpos.c
View file @
204596f9
...
...
@@ -79,15 +79,16 @@ typedef struct
static
LPCSTR
atomInternalPos
;
static
inline
INTERNALPOS
*
get_internal_pos
(
HWND
hwnd
)
{
if
(
!
atomInternalPos
)
return
NULL
;
return
GetPropA
(
hwnd
,
atomInternalPos
);
}
/***********************************************************************
* WINPOS_CreateInternalPosAtom
*/
BOOL
WINPOS_CreateInternalPosAtom
()
static
inline
void
set_internal_pos
(
HWND
hwnd
,
INTERNALPOS
*
pos
)
{
LPCSTR
str
=
"SysIP"
;
atomInternalPos
=
(
LPCSTR
)(
DWORD
)
GlobalAddAtomA
(
str
);
return
(
atomInternalPos
)
?
TRUE
:
FALSE
;
if
(
!
atomInternalPos
)
atomInternalPos
=
(
LPCSTR
)(
DWORD
)
GlobalAddAtomA
(
"SysIP"
);
SetPropA
(
hwnd
,
atomInternalPos
,
pos
);
}
/***********************************************************************
...
...
@@ -97,9 +98,9 @@ BOOL WINPOS_CreateInternalPosAtom()
*/
void
WINPOS_CheckInternalPos
(
HWND
hwnd
)
{
LPINTERNALPOS
lpPos
=
(
LPINTERNALPOS
)
GetPropA
(
hwnd
,
atomInternalPos
);
LPINTERNALPOS
lpPos
=
get_internal_pos
(
hwnd
);
if
(
lpPos
)
if
(
lpPos
)
{
if
(
IsWindow
(
lpPos
->
hwndIconTitle
)
)
DestroyWindow
(
lpPos
->
hwndIconTitle
);
...
...
@@ -633,7 +634,7 @@ BOOL WINAPI MoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy,
*/
static
LPINTERNALPOS
WINPOS_InitInternalPos
(
WND
*
wnd
)
{
LPINTERNALPOS
lpPos
=
GetPropA
(
wnd
->
hwndSelf
,
atomInternalPos
);
LPINTERNALPOS
lpPos
=
get_internal_pos
(
wnd
->
hwndSelf
);
if
(
!
lpPos
)
{
/* this happens when the window is minimized/maximized
...
...
@@ -642,7 +643,7 @@ static LPINTERNALPOS WINPOS_InitInternalPos( WND* wnd )
lpPos
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNALPOS
)
);
if
(
!
lpPos
)
return
NULL
;
SetPropA
(
wnd
->
hwndSelf
,
atomInternalPos
,
(
HANDLE
)
lpPos
);
set_internal_pos
(
wnd
->
hwndSelf
,
lpPos
);
lpPos
->
hwndIconTitle
=
0
;
/* defer until needs to be shown */
lpPos
->
rectNormal
.
left
=
wnd
->
rectWindow
.
left
;
lpPos
->
rectNormal
.
top
=
wnd
->
rectWindow
.
top
;
...
...
@@ -677,7 +678,7 @@ static LPINTERNALPOS WINPOS_InitInternalPos( WND* wnd )
*/
BOOL
WINPOS_RedrawIconTitle
(
HWND
hWnd
)
{
LPINTERNALPOS
lpPos
=
(
LPINTERNALPOS
)
GetPropA
(
hWnd
,
atomInternalPos
);
LPINTERNALPOS
lpPos
=
get_internal_pos
(
hWnd
);
if
(
lpPos
)
{
if
(
lpPos
->
hwndIconTitle
)
...
...
@@ -695,7 +696,7 @@ BOOL WINPOS_RedrawIconTitle( HWND hWnd )
*/
BOOL
WINPOS_ShowIconTitle
(
HWND
hwnd
,
BOOL
bShow
)
{
LPINTERNALPOS
lpPos
=
(
LPINTERNALPOS
)
GetPropA
(
hwnd
,
atomInternalPos
);
LPINTERNALPOS
lpPos
=
get_internal_pos
(
hwnd
);
if
(
lpPos
&&
!
GetPropA
(
hwnd
,
"__wine_x11_managed"
))
{
...
...
@@ -786,7 +787,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
MinMax
.
ptMaxSize
.
x
+=
2
*
xinc
;
MinMax
.
ptMaxSize
.
y
+=
2
*
yinc
;
lpPos
=
(
LPINTERNALPOS
)
GetPropA
(
hwnd
,
atomInternalPos
);
lpPos
=
get_internal_pos
(
hwnd
);
if
(
lpPos
&&
!
EMPTYPOINT
(
lpPos
->
ptMaxPos
)
)
{
MinMax
.
ptMaxPosition
.
x
=
lpPos
->
ptMaxPos
.
x
;
...
...
include/winpos.h
View file @
204596f9
...
...
@@ -42,6 +42,5 @@ extern LONG WINPOS_HandleWindowPosChanging(HWND hwnd, WINDOWPOS *winpos);
extern
HWND
WINPOS_WindowFromPoint
(
HWND
hwndScope
,
POINT
pt
,
INT
*
hittest
);
extern
void
WINPOS_CheckInternalPos
(
HWND
hwnd
);
extern
void
WINPOS_ActivateOtherWindow
(
HWND
hwnd
);
extern
BOOL
WINPOS_CreateInternalPosAtom
(
void
);
#endif
/* __WINE_WINPOS_H */
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