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
31ed6473
Commit
31ed6473
authored
Apr 22, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Moved the ConfigureNotify handler to event.c.
parent
1a0d28bf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
64 deletions
+64
-64
event.c
dlls/winex11.drv/event.c
+64
-0
winpos.c
dlls/winex11.drv/winpos.c
+0
-63
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
No files found.
dlls/winex11.drv/event.c
View file @
31ed6473
...
@@ -77,6 +77,7 @@ static void X11DRV_FocusIn( HWND hwnd, XEvent *event );
...
@@ -77,6 +77,7 @@ static void X11DRV_FocusIn( HWND hwnd, XEvent *event );
static
void
X11DRV_FocusOut
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_FocusOut
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_MapNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_MapNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ConfigureNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_PropertyNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_PropertyNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ClientMessage
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ClientMessage
(
HWND
hwnd
,
XEvent
*
event
);
...
@@ -731,6 +732,69 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
...
@@ -731,6 +732,69 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
/***********************************************************************
/***********************************************************************
* X11DRV_ConfigureNotify
*/
void
X11DRV_ConfigureNotify
(
HWND
hwnd
,
XEvent
*
xev
)
{
XConfigureEvent
*
event
=
&
xev
->
xconfigure
;
struct
x11drv_win_data
*
data
;
RECT
rect
;
UINT
flags
;
int
cx
,
cy
,
x
=
event
->
x
,
y
=
event
->
y
;
if
(
!
hwnd
)
return
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
mapped
||
data
->
iconic
)
return
;
/* Get geometry */
if
(
!
event
->
send_event
)
/* normal event, need to map coordinates to the root */
{
Window
child
;
wine_tsx11_lock
();
XTranslateCoordinates
(
event
->
display
,
data
->
whole_window
,
root_window
,
0
,
0
,
&
x
,
&
y
,
&
child
);
wine_tsx11_unlock
();
}
rect
.
left
=
x
;
rect
.
top
=
y
;
rect
.
right
=
x
+
event
->
width
;
rect
.
bottom
=
y
+
event
->
height
;
OffsetRect
(
&
rect
,
virtual_screen_rect
.
left
,
virtual_screen_rect
.
top
);
TRACE
(
"win %p new X rect %d,%d,%dx%d (event %d,%d,%dx%d)
\n
"
,
hwnd
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
event
->
x
,
event
->
y
,
event
->
width
,
event
->
height
);
X11DRV_X_to_window_rect
(
data
,
&
rect
);
x
=
rect
.
left
;
y
=
rect
.
top
;
cx
=
rect
.
right
-
rect
.
left
;
cy
=
rect
.
bottom
-
rect
.
top
;
flags
=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
/* Compare what has changed */
GetWindowRect
(
hwnd
,
&
rect
);
if
(
rect
.
left
==
x
&&
rect
.
top
==
y
)
flags
|=
SWP_NOMOVE
;
else
TRACE
(
"%p moving from (%d,%d) to (%d,%d)
\n
"
,
hwnd
,
rect
.
left
,
rect
.
top
,
x
,
y
);
if
((
rect
.
right
-
rect
.
left
==
cx
&&
rect
.
bottom
-
rect
.
top
==
cy
)
||
(
IsRectEmpty
(
&
rect
)
&&
event
->
width
==
1
&&
event
->
height
==
1
))
{
if
(
flags
&
SWP_NOMOVE
)
return
;
/* if nothing changed, don't do anything */
flags
|=
SWP_NOSIZE
;
}
else
TRACE
(
"%p resizing from (%dx%d) to (%dx%d)
\n
"
,
hwnd
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
cx
,
cy
);
SetWindowPos
(
hwnd
,
0
,
x
,
y
,
cx
,
cy
,
flags
);
}
/***********************************************************************
* get_window_wm_state
* get_window_wm_state
*/
*/
int
get_window_wm_state
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
int
get_window_wm_state
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
...
...
dlls/winex11.drv/winpos.c
View file @
31ed6473
...
@@ -534,66 +534,3 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height )
...
@@ -534,66 +534,3 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height )
EnumWindows
(
update_windows_on_desktop_resize
,
(
LPARAM
)
&
resize_data
);
EnumWindows
(
update_windows_on_desktop_resize
,
(
LPARAM
)
&
resize_data
);
}
}
/***********************************************************************
* X11DRV_ConfigureNotify
*/
void
X11DRV_ConfigureNotify
(
HWND
hwnd
,
XEvent
*
xev
)
{
XConfigureEvent
*
event
=
&
xev
->
xconfigure
;
struct
x11drv_win_data
*
data
;
RECT
rect
;
UINT
flags
;
int
cx
,
cy
,
x
=
event
->
x
,
y
=
event
->
y
;
if
(
!
hwnd
)
return
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
mapped
||
data
->
iconic
)
return
;
/* Get geometry */
if
(
!
event
->
send_event
)
/* normal event, need to map coordinates to the root */
{
Window
child
;
wine_tsx11_lock
();
XTranslateCoordinates
(
event
->
display
,
data
->
whole_window
,
root_window
,
0
,
0
,
&
x
,
&
y
,
&
child
);
wine_tsx11_unlock
();
}
rect
.
left
=
x
;
rect
.
top
=
y
;
rect
.
right
=
x
+
event
->
width
;
rect
.
bottom
=
y
+
event
->
height
;
OffsetRect
(
&
rect
,
virtual_screen_rect
.
left
,
virtual_screen_rect
.
top
);
TRACE
(
"win %p new X rect %d,%d,%dx%d (event %d,%d,%dx%d)
\n
"
,
hwnd
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
event
->
x
,
event
->
y
,
event
->
width
,
event
->
height
);
X11DRV_X_to_window_rect
(
data
,
&
rect
);
x
=
rect
.
left
;
y
=
rect
.
top
;
cx
=
rect
.
right
-
rect
.
left
;
cy
=
rect
.
bottom
-
rect
.
top
;
flags
=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
/* Compare what has changed */
GetWindowRect
(
hwnd
,
&
rect
);
if
(
rect
.
left
==
x
&&
rect
.
top
==
y
)
flags
|=
SWP_NOMOVE
;
else
TRACE
(
"%p moving from (%d,%d) to (%d,%d)
\n
"
,
hwnd
,
rect
.
left
,
rect
.
top
,
x
,
y
);
if
((
rect
.
right
-
rect
.
left
==
cx
&&
rect
.
bottom
-
rect
.
top
==
cy
)
||
(
IsRectEmpty
(
&
rect
)
&&
event
->
width
==
1
&&
event
->
height
==
1
))
{
if
(
flags
&
SWP_NOMOVE
)
return
;
/* if nothing changed, don't do anything */
flags
|=
SWP_NOSIZE
;
}
else
TRACE
(
"%p resizing from (%dx%d) to (%dx%d)
\n
"
,
hwnd
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
cx
,
cy
);
SetWindowPos
(
hwnd
,
0
,
x
,
y
,
cx
,
cy
,
flags
);
}
dlls/winex11.drv/x11drv.h
View file @
31ed6473
...
@@ -643,7 +643,6 @@ extern void X11DRV_EnterNotify( HWND hwnd, XEvent *event );
...
@@ -643,7 +643,6 @@ extern void X11DRV_EnterNotify( HWND hwnd, XEvent *event );
extern
void
X11DRV_KeyEvent
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_KeyEvent
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_KeymapNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_KeymapNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_DestroyNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_DestroyNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_ConfigureNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_SelectionRequest
(
HWND
hWnd
,
XEvent
*
event
);
extern
void
X11DRV_SelectionRequest
(
HWND
hWnd
,
XEvent
*
event
);
extern
void
X11DRV_SelectionClear
(
HWND
hWnd
,
XEvent
*
event
);
extern
void
X11DRV_SelectionClear
(
HWND
hWnd
,
XEvent
*
event
);
extern
void
X11DRV_MappingNotify
(
HWND
hWnd
,
XEvent
*
event
);
extern
void
X11DRV_MappingNotify
(
HWND
hWnd
,
XEvent
*
event
);
...
...
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