[PATCH 05/17] ephyr: Move event processing into ephyr.c.
Julien Cristau
jcristau at debian.org
Fri Aug 30 08:51:16 PDT 2013
On Mon, Aug 26, 2013 at 13:26:11 -0700, Eric Anholt wrote:
> No more extra event structure to translate between hostx.c and
> ephyr.c!
> ---
> hw/kdrive/ephyr/ephyr.c | 393 ++++++++++++++++++++++++++++++++++++------------
> hw/kdrive/ephyr/hostx.c | 225 ---------------------------
> hw/kdrive/ephyr/hostx.h | 64 ++------
> 3 files changed, 310 insertions(+), 372 deletions(-)
>
[...]
> diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
> index 8018f94..1e19c87 100644
> --- a/hw/kdrive/ephyr/hostx.h
> +++ b/hw/kdrive/ephyr/hostx.h
> @@ -41,65 +41,28 @@
> #endif
>
> typedef struct EphyrHostXVars EphyrHostXVars;
> -typedef struct EphyrHostXEvent EphyrHostXEvent;
> -typedef enum EphyrHostXEventType {
> - EPHYR_EV_MOUSE_MOTION,
> - EPHYR_EV_MOUSE_PRESS,
> - EPHYR_EV_MOUSE_RELEASE,
> - EPHYR_EV_KEY_PRESS,
> - EPHYR_EV_KEY_RELEASE,
> - EPHYR_EV_EXPOSE,
> - EPHYR_EV_CONFIGURE,
> -} EphyrHostXEventType;
>
> typedef struct {
> int minKeyCode;
> int maxKeyCode;
> } EphyrKeySyms;
>
> -struct EphyrHostXEvent {
> - EphyrHostXEventType type;
>
> - union {
> - struct mouse_motion {
> - int x;
> - int y;
> - int screen;
> - int window;
> - } mouse_motion;
> +struct EphyrHostScreen {
> + Window win;
> + Window win_pre_existing; /* Set via -parent option like xnest */
> + Window peer_win; /* Used for GL; should be at most one */
> + xcb_image_t *ximg;
> + int win_width, win_height;
> + int server_depth;
> + unsigned char *fb_data; /* only used when host bpp != server bpp */
> + xcb_shm_segment_info_t shminfo;
>
The previous patch killed EphyrHostScreen, I assume it wasn't supposed
to come back here?
> - struct mouse_down {
> - int button_num;
> - } mouse_down;
> -
> - struct mouse_up {
> - int button_num;
> - } mouse_up;
> -
> - struct key_up {
> - int scancode;
> - } key_up;
> -
> - struct key_down {
> - int scancode;
> - } key_down;
> -
> - struct expose {
> - int window;
> - } expose;
> -
> - struct configure {
> - int width;
> - int height;
> - int screen;
> - int window;
> - } configure;
> -
> - } data;
> -
> - int key_state;
> + void *info; /* Pointer to the screen this is associated with */
> + int mynum; /* Screen number */
> };
>
> +
> typedef struct {
> VisualID visualid;
> int screen;
Cheers,
Julien
More information about the xorg-devel
mailing list