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
585da929
Commit
585da929
authored
Apr 17, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Moved the ExposeEvent handler to event.c.
Use consistent naming for all event handlers.
parent
3fd1fc76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
68 deletions
+69
-68
event.c
dlls/winex11.drv/event.c
+69
-16
winpos.c
dlls/winex11.drv/winpos.c
+0
-51
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
No files found.
dlls/winex11.drv/event.c
View file @
585da929
...
...
@@ -51,6 +51,7 @@
#include "shlobj.h"
/* DROPFILES */
#include "shellapi.h"
#include "wine/server.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
event
);
...
...
@@ -72,10 +73,11 @@ extern BOOL ximInComposeMode;
#define DndURL 128
/* KDE drag&drop */
/* Event handlers */
static
void
EVENT_FocusIn
(
HWND
hwnd
,
XEvent
*
event
);
static
void
EVENT_FocusOut
(
HWND
hwnd
,
XEvent
*
event
);
static
void
EVENT_PropertyNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
EVENT_ClientMessage
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_FocusIn
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_FocusOut
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_PropertyNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ClientMessage
(
HWND
hwnd
,
XEvent
*
event
);
struct
event_handler
{
...
...
@@ -95,8 +97,8 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] =
{
MotionNotify
,
X11DRV_MotionNotify
},
{
EnterNotify
,
X11DRV_EnterNotify
},
/* LeaveNotify */
{
FocusIn
,
EVENT
_FocusIn
},
{
FocusOut
,
EVENT
_FocusOut
},
{
FocusIn
,
X11DRV
_FocusIn
},
{
FocusOut
,
X11DRV
_FocusOut
},
{
KeymapNotify
,
X11DRV_KeymapNotify
},
{
Expose
,
X11DRV_Expose
},
/* GraphicsExpose */
...
...
@@ -114,12 +116,12 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] =
/* ResizeRequest */
/* CirculateNotify */
/* CirculateRequest */
{
PropertyNotify
,
EVENT
_PropertyNotify
},
{
PropertyNotify
,
X11DRV
_PropertyNotify
},
{
SelectionClear
,
X11DRV_SelectionClear
},
{
SelectionRequest
,
X11DRV_SelectionRequest
},
/* SelectionNotify */
/* ColormapNotify */
{
ClientMessage
,
EVENT
_ClientMessage
},
{
ClientMessage
,
X11DRV
_ClientMessage
},
{
MappingNotify
,
X11DRV_MappingNotify
},
};
...
...
@@ -568,9 +570,9 @@ static const char * const focus_details[] =
};
/**********************************************************************
*
EVENT
_FocusIn
*
X11DRV
_FocusIn
*/
static
void
EVENT
_FocusIn
(
HWND
hwnd
,
XEvent
*
xev
)
static
void
X11DRV
_FocusIn
(
HWND
hwnd
,
XEvent
*
xev
)
{
XFocusChangeEvent
*
event
=
&
xev
->
xfocus
;
XIC
xic
;
...
...
@@ -602,11 +604,11 @@ static void EVENT_FocusIn( HWND hwnd, XEvent *xev )
/**********************************************************************
*
EVENT
_FocusOut
*
X11DRV
_FocusOut
*
* Note: only top-level windows get FocusOut events.
*/
static
void
EVENT
_FocusOut
(
HWND
hwnd
,
XEvent
*
xev
)
static
void
X11DRV
_FocusOut
(
HWND
hwnd
,
XEvent
*
xev
)
{
XFocusChangeEvent
*
event
=
&
xev
->
xfocus
;
HWND
hwnd_tmp
;
...
...
@@ -659,6 +661,57 @@ static void EVENT_FocusOut( HWND hwnd, XEvent *xev )
/***********************************************************************
* X11DRV_Expose
*/
static
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
xev
)
{
XExposeEvent
*
event
=
&
xev
->
xexpose
;
RECT
rect
;
struct
x11drv_win_data
*
data
;
int
flags
=
RDW_INVALIDATE
|
RDW_ERASE
;
TRACE
(
"win %p (%lx) %d,%d %dx%d
\n
"
,
hwnd
,
event
->
window
,
event
->
x
,
event
->
y
,
event
->
width
,
event
->
height
);
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
event
->
window
==
data
->
whole_window
)
{
rect
.
left
=
data
->
whole_rect
.
left
+
event
->
x
;
rect
.
top
=
data
->
whole_rect
.
top
+
event
->
y
;
flags
|=
RDW_FRAME
;
}
else
{
rect
.
left
=
data
->
client_rect
.
left
+
event
->
x
;
rect
.
top
=
data
->
client_rect
.
top
+
event
->
y
;
}
rect
.
right
=
rect
.
left
+
event
->
width
;
rect
.
bottom
=
rect
.
top
+
event
->
height
;
if
(
event
->
window
!=
root_window
)
{
SERVER_START_REQ
(
update_window_zorder
)
{
req
->
window
=
hwnd
;
req
->
rect
.
left
=
rect
.
left
;
req
->
rect
.
top
=
rect
.
top
;
req
->
rect
.
right
=
rect
.
right
;
req
->
rect
.
bottom
=
rect
.
bottom
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
/* make position relative to client area instead of parent */
OffsetRect
(
&
rect
,
-
data
->
client_rect
.
left
,
-
data
->
client_rect
.
top
);
flags
|=
RDW_ALLCHILDREN
;
}
RedrawWindow
(
hwnd
,
&
rect
,
0
,
flags
);
}
/***********************************************************************
* get_window_wm_state
*/
int
get_window_wm_state
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
...
...
@@ -755,9 +808,9 @@ static void handle_wm_state_notify( struct x11drv_win_data *data, XPropertyEvent
/***********************************************************************
*
EVENT
_PropertyNotify
*
X11DRV
_PropertyNotify
*/
static
void
EVENT
_PropertyNotify
(
HWND
hwnd
,
XEvent
*
xev
)
static
void
X11DRV
_PropertyNotify
(
HWND
hwnd
,
XEvent
*
xev
)
{
XPropertyEvent
*
event
=
&
xev
->
xproperty
;
struct
x11drv_win_data
*
data
;
...
...
@@ -1130,9 +1183,9 @@ static const struct client_message_handler client_messages[] =
/**********************************************************************
*
EVENT
_ClientMessage
*
X11DRV
_ClientMessage
*/
static
void
EVENT
_ClientMessage
(
HWND
hwnd
,
XEvent
*
xev
)
static
void
X11DRV
_ClientMessage
(
HWND
hwnd
,
XEvent
*
xev
)
{
XClientMessageEvent
*
event
=
&
xev
->
xclient
;
unsigned
int
i
;
...
...
dlls/winex11.drv/winpos.c
View file @
585da929
...
...
@@ -61,57 +61,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
static
const
char
managed_prop
[]
=
"__wine_x11_managed"
;
/***********************************************************************
* X11DRV_Expose
*/
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
xev
)
{
XExposeEvent
*
event
=
&
xev
->
xexpose
;
RECT
rect
;
struct
x11drv_win_data
*
data
;
int
flags
=
RDW_INVALIDATE
|
RDW_ERASE
;
TRACE
(
"win %p (%lx) %d,%d %dx%d
\n
"
,
hwnd
,
event
->
window
,
event
->
x
,
event
->
y
,
event
->
width
,
event
->
height
);
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
event
->
window
==
data
->
whole_window
)
{
rect
.
left
=
data
->
whole_rect
.
left
+
event
->
x
;
rect
.
top
=
data
->
whole_rect
.
top
+
event
->
y
;
flags
|=
RDW_FRAME
;
}
else
{
rect
.
left
=
data
->
client_rect
.
left
+
event
->
x
;
rect
.
top
=
data
->
client_rect
.
top
+
event
->
y
;
}
rect
.
right
=
rect
.
left
+
event
->
width
;
rect
.
bottom
=
rect
.
top
+
event
->
height
;
if
(
event
->
window
!=
root_window
)
{
SERVER_START_REQ
(
update_window_zorder
)
{
req
->
window
=
hwnd
;
req
->
rect
.
left
=
rect
.
left
;
req
->
rect
.
top
=
rect
.
top
;
req
->
rect
.
right
=
rect
.
right
;
req
->
rect
.
bottom
=
rect
.
bottom
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
/* make position relative to client area instead of parent */
OffsetRect
(
&
rect
,
-
data
->
client_rect
.
left
,
-
data
->
client_rect
.
top
);
flags
|=
RDW_ALLCHILDREN
;
}
RedrawWindow
(
hwnd
,
&
rect
,
0
,
flags
);
}
/***********************************************************************
* update_net_wm_states
*/
static
void
update_net_wm_states
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
...
...
dlls/winex11.drv/x11drv.h
View file @
585da929
...
...
@@ -641,7 +641,6 @@ extern void X11DRV_MotionNotify( HWND hwnd, XEvent *event );
extern
void
X11DRV_EnterNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_KeyEvent
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_KeymapNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_DestroyNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_MapNotify
(
HWND
hwnd
,
XEvent
*
event
);
extern
void
X11DRV_ConfigureNotify
(
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