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
3217e534
Commit
3217e534
authored
Mar 29, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11drv: Replace the SWP_WINE_NOHOSTMOVE flag by a lock count.
parent
4c777d74
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
13 deletions
+20
-13
window.c
dlls/x11drv/window.c
+2
-2
winpos.c
dlls/x11drv/winpos.c
+17
-8
x11drv.h
dlls/x11drv/x11drv.h
+1
-0
winpos.h
include/winpos.h
+0
-3
No files found.
dlls/x11drv/window.c
View file @
3217e534
...
...
@@ -602,8 +602,7 @@ void X11DRV_sync_window_position( Display *display, struct x11drv_win_data *data
data
->
client_rect
=
*
new_client_rect
;
OffsetRect
(
&
data
->
client_rect
,
-
data
->
whole_rect
.
left
,
-
data
->
whole_rect
.
top
);
if
(
!
data
->
whole_window
)
return
;
if
(
swp_flags
&
SWP_WINE_NOHOSTMOVE
)
return
;
if
(
!
data
->
whole_window
||
data
->
lock_changes
)
return
;
mask
=
get_window_changes
(
&
changes
,
&
old_whole_rect
,
&
data
->
whole_rect
);
...
...
@@ -837,6 +836,7 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd )
data
->
xic
=
0
;
data
->
managed
=
FALSE
;
data
->
dce
=
NULL
;
data
->
lock_changes
=
0
;
data
->
hWMIconBitmap
=
0
;
data
->
hWMIconMask
=
0
;
...
...
dlls/x11drv/winpos.c
View file @
3217e534
...
...
@@ -567,7 +567,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
{
req
->
handle
=
hwnd
;
req
->
previous
=
insert_after
;
req
->
flags
=
swp_flags
&
~
SWP_WINE_NOHOSTMOVE
;
req
->
flags
=
swp_flags
;
req
->
window
.
left
=
rectWindow
->
left
;
req
->
window
.
top
=
rectWindow
->
top
;
req
->
window
.
right
=
rectWindow
->
right
;
...
...
@@ -625,7 +625,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
/* FIXME: copy the valid bits */
if
(
data
->
whole_window
&&
!
(
swp_flags
&
SWP_WINE_NOHOSTMOVE
)
)
if
(
data
->
whole_window
&&
!
data
->
lock_changes
)
{
if
((
old_style
&
WS_VISIBLE
)
&&
!
(
new_style
&
WS_VISIBLE
))
{
...
...
@@ -647,7 +647,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
X11DRV_sync_window_position
(
display
,
data
,
swp_flags
,
rectClient
,
&
new_whole_rect
);
if
(
data
->
whole_window
&&
!
(
swp_flags
&
SWP_WINE_NOHOSTMOVE
)
)
if
(
data
->
whole_window
&&
!
data
->
lock_changes
)
{
if
((
new_style
&
WS_VISIBLE
)
&&
!
(
new_style
&
WS_MINIMIZE
)
&&
X11DRV_is_window_rect_mapped
(
rectWindow
))
...
...
@@ -694,7 +694,6 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *winpos )
winpos
->
cx
,
winpos
->
cy
,
winpos
->
flags
);
orig_flags
=
winpos
->
flags
;
winpos
->
flags
&=
~
SWP_WINE_NOHOSTMOVE
;
/* First make sure that coordinates are valid for WM_WINDOWPOSCHANGING */
if
(
!
(
winpos
->
flags
&
SWP_NOMOVE
))
...
...
@@ -1107,8 +1106,10 @@ void X11DRV_MapNotify( HWND hwnd, XEvent *event )
WIN_ReleasePtr
(
win
);
SendMessageA
(
hwnd
,
WM_SHOWWINDOW
,
SW_RESTORE
,
0
);
data
->
lock_changes
++
;
SetWindowPos
(
hwnd
,
0
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
SWP_NOZORDER
|
SWP_WINE_NOHOSTMOVE
);
SWP_NOZORDER
);
data
->
lock_changes
--
;
}
else
WIN_ReleasePtr
(
win
);
if
(
hwndFocus
&&
IsChild
(
hwnd
,
hwndFocus
))
X11DRV_SetFocus
(
hwndFocus
);
/* FIXME */
...
...
@@ -1140,8 +1141,10 @@ void X11DRV_UnmapNotify( HWND hwnd, XEvent *event )
EndMenu
();
SendMessageA
(
hwnd
,
WM_SHOWWINDOW
,
SW_MINIMIZE
,
0
);
data
->
lock_changes
++
;
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
GetSystemMetrics
(
SM_CXICON
),
GetSystemMetrics
(
SM_CYICON
),
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
|
SWP_WINE_NOHOSTMOVE
);
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
);
data
->
lock_changes
--
;
}
else
WIN_ReleasePtr
(
win
);
}
...
...
@@ -1154,12 +1157,16 @@ void X11DRV_handle_desktop_resize( unsigned int width, unsigned int height )
{
RECT
rect
;
HWND
hwnd
=
GetDesktopWindow
();
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
screen_width
=
width
;
screen_height
=
height
;
TRACE
(
"desktop %p change to (%dx%d)
\n
"
,
hwnd
,
width
,
height
);
SetRect
(
&
rect
,
0
,
0
,
width
,
height
);
X11DRV_set_window_pos
(
hwnd
,
0
,
&
rect
,
&
rect
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_WINE_NOHOSTMOVE
,
NULL
);
data
->
lock_changes
++
;
X11DRV_set_window_pos
(
hwnd
,
0
,
&
rect
,
&
rect
,
SWP_NOZORDER
|
SWP_NOMOVE
,
NULL
);
data
->
lock_changes
--
;
SendMessageTimeoutW
(
HWND_BROADCAST
,
WM_DISPLAYCHANGE
,
screen_depth
,
MAKELPARAM
(
width
,
height
),
SMTO_ABORTIFHUNG
,
2000
,
NULL
);
}
...
...
@@ -1202,7 +1209,7 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
y
=
rect
.
top
;
cx
=
rect
.
right
-
rect
.
left
;
cy
=
rect
.
bottom
-
rect
.
top
;
flags
=
SWP_NOACTIVATE
|
SWP_NOZORDER
|
SWP_WINE_NOHOSTMOVE
;
flags
=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
/* Compare what has changed */
...
...
@@ -1223,7 +1230,9 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
TRACE
(
"%p resizing from (%ldx%ld) to (%dx%d)
\n
"
,
hwnd
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
cx
,
cy
);
data
->
lock_changes
++
;
SetWindowPos
(
hwnd
,
0
,
x
,
y
,
cx
,
cy
,
flags
);
data
->
lock_changes
--
;
}
...
...
dlls/x11drv/x11drv.h
View file @
3217e534
...
...
@@ -643,6 +643,7 @@ struct x11drv_win_data
XIC
xic
;
/* X input context */
BOOL
managed
;
/* is window managed? */
struct
dce
*
dce
;
/* DCE for CS_OWNDC or CS_CLASSDC windows */
unsigned
int
lock_changes
;
/* lock count for X11 change requests */
HBITMAP
hWMIconBitmap
;
HBITMAP
hWMIconMask
;
};
...
...
include/winpos.h
View file @
3217e534
...
...
@@ -31,9 +31,6 @@
#define SWP_NOCLIENTSIZE 0x0800
#define SWP_NOCLIENTMOVE 0x1000
/* Wine extra SWP flag */
#define SWP_WINE_NOHOSTMOVE 0x80000000
extern
BOOL
WINPOS_RedrawIconTitle
(
HWND
hWnd
);
extern
BOOL
WINPOS_ShowIconTitle
(
HWND
hwnd
,
BOOL
bShow
);
extern
void
WINPOS_GetMinMaxInfo
(
HWND
hwnd
,
POINT
*
maxSize
,
POINT
*
maxPos
,
POINT
*
minTrack
,
...
...
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