e: merge comp module into core

* Move compositor to core, but letting the configuration there
 * Rename all files and functions from e_mod_comp_* to e_comp_*
 * Move the config dialogs to a new module named conf_comp. It still
   uses a domain config, otherwise it would not pick the current
   user's configuration. Maybe it would be wise to later on move these
   options to e_config
 * Fixup the wizard mess linking the header in the build tree in order
   to be able to create the config. Since now it's in core, we don't
   need to play linking games in the build system

I'm not sure if the wayland part works. It was not even building
previously so I'll let for who cares about this to actually test and
report bugs.



SVN revision: 82454
devs/asdfuser/comp-sounds
Lucas De Marchi 11 years ago
parent 8096505844
commit 8cacf8429d
  1. 4
      configure.ac
  2. 10
      po/POTFILES.in
  3. 33
      src/bin/Makefile.am
  4. 1844
      src/bin/e_comp.c
  5. 17
      src/bin/e_comp.h
  6. 84
      src/bin/e_comp_cfdata.c
  7. 23
      src/bin/e_comp_cfdata.h
  8. 27
      src/bin/e_comp_update.c
  9. 46
      src/bin/e_comp_update.h
  10. 55
      src/bin/e_comp_wl.c
  11. 20
      src/bin/e_comp_wl.h
  12. 15
      src/bin/e_comp_wl_buffer.c
  13. 10
      src/bin/e_comp_wl_buffer.h
  14. 193
      src/bin/e_comp_wl_comp.c
  15. 12
      src/bin/e_comp_wl_comp.h
  16. 55
      src/bin/e_comp_wl_input.c
  17. 11
      src/bin/e_comp_wl_input.h
  18. 17
      src/bin/e_comp_wl_output.c
  19. 11
      src/bin/e_comp_wl_output.h
  20. 13
      src/bin/e_comp_wl_region.c
  21. 11
      src/bin/e_comp_wl_region.h
  22. 475
      src/bin/e_comp_wl_shell.c
  23. 11
      src/bin/e_comp_wl_shell.h
  24. 97
      src/bin/e_comp_wl_surface.c
  25. 20
      src/bin/e_comp_wl_surface.h
  26. 3
      src/bin/e_includes.h
  27. 7
      src/bin/e_main.c
  28. 8
      src/modules/Makefile.am
  29. 45
      src/modules/Makefile_comp.am
  30. 17
      src/modules/Makefile_conf_comp.am
  31. 20
      src/modules/Makefile_wizard.am
  32. 47
      src/modules/comp/e_mod_comp_update.h
  33. 10
      src/modules/comp/e_mod_comp_wl_buffer.h
  34. 12
      src/modules/comp/e_mod_comp_wl_comp.h
  35. 11
      src/modules/comp/e_mod_comp_wl_input.h
  36. 11
      src/modules/comp/e_mod_comp_wl_output.h
  37. 11
      src/modules/comp/e_mod_comp_wl_region.h
  38. 476
      src/modules/comp/e_mod_comp_wl_shell.c
  39. 11
      src/modules/comp/e_mod_comp_wl_shell.h
  40. 20
      src/modules/comp/e_mod_comp_wl_surface.h
  41. 0
      src/modules/conf_comp/e-module-comp.edj
  42. 43
      src/modules/conf_comp/e_mod_config.c
  43. 0
      src/modules/conf_comp/e_mod_config.h
  44. 41
      src/modules/conf_comp/e_mod_main.c
  45. 4
      src/modules/conf_comp/e_mod_main.h
  46. 0
      src/modules/conf_comp/module.desktop.in
  47. 18
      src/modules/wizard/page_150.c

@ -846,6 +846,7 @@ AC_E_OPTIONAL_MODULE([fileman_opinfo], true)
AC_E_OPTIONAL_MODULE([wizard], true)
AC_E_OPTIONAL_MODULE([conf], true)
AC_E_OPTIONAL_MODULE([conf2], $have_elementary)
AC_E_OPTIONAL_MODULE([conf_comp], true)
AC_E_OPTIONAL_MODULE([conf_wallpaper2], true)
AC_E_OPTIONAL_MODULE([conf_theme], true, true)
AC_E_OPTIONAL_MODULE([conf_intl], true)
@ -871,7 +872,6 @@ AC_E_OPTIONAL_MODULE([syscon], true)
AC_E_OPTIONAL_MODULE([everything], true)
AC_E_OPTIONAL_MODULE([systray], true)
AC_E_OPTIONAL_MODULE([appmenu], true)
AC_E_OPTIONAL_MODULE([comp], true)
AC_E_OPTIONAL_MODULE([physics], true, [CHECK_MODULE_PHYSICS])
AC_E_OPTIONAL_MODULE([quickaccess], true)
AC_E_OPTIONAL_MODULE([shot], true)
@ -981,7 +981,7 @@ src/modules/everything/module.desktop
src/modules/everything/everything.pc
src/modules/systray/module.desktop
src/modules/appmenu/module.desktop
src/modules/comp/module.desktop
src/modules/conf_comp/module.desktop
src/modules/physics/module.desktop
src/modules/quickaccess/module.desktop
src/modules/shot/module.desktop

@ -136,12 +136,10 @@ src/modules/battery/e_mod_config.c
src/modules/battery/e_mod_main.c
src/modules/clock/e_mod_config.c
src/modules/clock/e_mod_main.c
src/modules/comp/e_mod_comp.c
src/modules/comp/e_mod_config.c
src/modules/comp/e_mod_main.c
src/modules/conf/e_conf.c
src/modules/conf/e_mod_config.c
src/modules/conf/e_mod_main.c
src/modules/conf_comp/e_mod_config.c
src/modules/conf_comp/e_mod_main.c
src/modules/conf_comp/e_mod_config.c
src/modules/conf_comp/e_mod_main.c
src/modules/conf_applications/e_int_config_apps.c
src/modules/conf_applications/e_int_config_apps_personal.c
src/modules/conf_applications/e_int_config_defapps.c

@ -55,6 +55,9 @@ e_canvas.h \
e_color_class.h \
e_color_dialog.h \
e_color.h \
e_comp.h \
e_comp_cfdata.h \
e_comp_update.h \
e_config_data.h \
e_config_dialog.h \
e_config.h \
@ -199,6 +202,18 @@ e_xkb.h \
e_xsettings.h \
e_zone.h
if HAVE_WAYLAND_CLIENTS
ENLIGHTENMENTHEADERS += \
e_comp_wl.h \
e_comp_wl_buffer.h \
e_comp_wl_comp.h \
e_comp_wl_input.h \
e_comp_wl_output.h \
e_comp_wl_region.h \
e_comp_wl_shell.h \
e_comp_wl_surface.h
endif
enlightenment_src = \
e_about.c \
@ -215,6 +230,9 @@ e_canvas.c \
e_color.c \
e_color_class.c \
e_color_dialog.c \
e_comp.c \
e_comp_cfdata.c \
e_comp_update.c \
e_config.c \
e_config_data.c \
e_config_dialog.c \
@ -363,13 +381,26 @@ e_xsettings.c \
e_zone.c \
$(ENLIGHTENMENTHEADERS)
if HAVE_WAYLAND_CLIENTS
enlightenment_src += \
e_comp_wl.c \
e_comp_wl_buffer.c \
e_comp_wl_comp.c \
e_comp_wl_input.c \
e_comp_wl_output.c \
e_comp_wl_region.c \
e_comp_wl_shell.c \
e_comp_wl_surface.c
endif
enlightenment_CFLAGS = $(AM_CPPFLAGS) @WAYLAND_CFLAGS@
enlightenment_CPPFLAGS = $(AM_CPPFLAGS) -DE_LOGGING=1
enlightenment_SOURCES = \
e_main.c \
$(enlightenment_src)
enlightenment_LDFLAGS = -export-dynamic
enlightenment_LDADD = @e_libs@ @ELM_LIBS@ @EMOTION_LIBS@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ -lm
enlightenment_LDADD = @e_libs@ @ELM_LIBS@ @EMOTION_LIBS@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ -lm
enlightenment_imc_SOURCES = \
e.h \

File diff suppressed because it is too large Load Diff

@ -1,16 +1,19 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_MOD_COMP_H
#define E_MOD_COMP_H
typedef struct _E_Comp E_Comp;
typedef struct _E_Comp_Win E_Comp_Win;
typedef struct _E_Comp_Zone E_Comp_Zone;
Eina_Bool e_mod_comp_init(void);
void e_mod_comp_shutdown(void);
#define E_COMP_ENGINE_SW 1
#define E_COMP_ENGINE_GL 2
#else
#ifndef E_MOD_COMP_H
#define E_MOD_COMP_H
Eina_Bool e_comp_init(void);
void e_comp_shutdown(void);
void e_mod_comp_shadow_set(void);
EAPI void e_comp_shadow_set(void);
#endif
#endif

@ -1,14 +1,13 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_comp_cfdata.h"
#include "e_comp_cfdata.h"
EAPI void
e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
{
*match_edd = E_CONFIG_DD_NEW("Comp_Match", Match);
*match_edd = E_CONFIG_DD_NEW("Comp_Match", E_Comp_Match);
#undef T
#undef D
#define T Match
#define T E_Comp_Match
#define D *match_edd
E_CONFIG_VAL(D, T, title, STR);
E_CONFIG_VAL(D, T, name, STR);
@ -27,10 +26,10 @@ e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
E_CONFIG_VAL(D, T, urgent, CHAR);
E_CONFIG_VAL(D, T, shadow_style, STR);
*conf_edd = E_CONFIG_DD_NEW("Comp_Config", Config);
*conf_edd = E_CONFIG_DD_NEW("Comp_Config", E_Comp_Config);
#undef T
#undef D
#define T Config
#define T E_Comp_Config
#define D *conf_edd
E_CONFIG_VAL(D, T, shadow_style, STR);
E_CONFIG_VAL(D, T, engine, INT);
@ -60,15 +59,15 @@ e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
E_CONFIG_LIST(D, T, match.menus, *match_edd);
}
EAPI Config *
e_mod_comp_cfdata_config_new(void)
EAPI E_Comp_Config *
e_comp_cfdata_config_new(void)
{
Config *cfg;
Match *mat;
E_Comp_Config *cfg;
E_Comp_Match *mat;
cfg = E_NEW(Config, 1);
cfg = E_NEW(E_Comp_Config, 1);
cfg->shadow_style = eina_stringshare_add("default");
cfg->engine = ENGINE_SW;
cfg->engine = E_COMP_ENGINE_SW;
cfg->max_unmapped_pixels = 32 * 1024; // implement
cfg->max_unmapped_time = 10 * 3600; // implement
cfg->min_unmapped_time = 5 * 60; // implement
@ -95,80 +94,80 @@ e_mod_comp_cfdata_config_new(void)
cfg->first_draw_delay = 0.15;
cfg->match.popups = NULL;
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.popups = eina_list_append(cfg->match.popups, mat);
mat->name = eina_stringshare_add("shelf");
mat->shadow_style = eina_stringshare_add("popup");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.popups = eina_list_append(cfg->match.popups, mat);
mat->name = eina_stringshare_add("_e_popup_desklock");
mat->shadow_style = eina_stringshare_add("still");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.popups = eina_list_append(cfg->match.popups, mat);
mat->name = eina_stringshare_add("_e_popup_notification");
mat->shadow_style = eina_stringshare_add("still");
mat->focus = 1;
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.popups = eina_list_append(cfg->match.popups, mat);
mat->shadow_style = eina_stringshare_add("popup");
cfg->match.borders = NULL;
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.borders = eina_list_append(cfg->match.borders, mat);
mat->fullscreen = 1;
mat->shadow_style = eina_stringshare_add("fullscreen");
cfg->match.overrides = NULL;
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->name = eina_stringshare_add("E");
mat->clas = eina_stringshare_add("Background_Window");
mat->shadow_style = eina_stringshare_add("none");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->name = eina_stringshare_add("E");
mat->clas = eina_stringshare_add("everything");
mat->shadow_style = eina_stringshare_add("everything");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->name = eina_stringshare_add("E");
mat->clas = eina_stringshare_add("Init_Window");
mat->shadow_style = eina_stringshare_add("still");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_POPUP_MENU;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_COMBO;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_TOOLTIP;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->shadow_style = eina_stringshare_add("popup");
cfg->match.menus = NULL;
mat = E_NEW(Match, 1);
mat = E_NEW(E_Comp_Match, 1);
cfg->match.menus = eina_list_append(cfg->match.menus, mat);
mat->shadow_style = eina_stringshare_add("menu");
@ -178,7 +177,7 @@ e_mod_comp_cfdata_config_new(void)
static void
_match_list_free(Eina_List *list)
{
Match *m;
E_Comp_Match *m;
EINA_LIST_FREE(list, m)
{
@ -192,7 +191,7 @@ _match_list_free(Eina_List *list)
}
EAPI void
e_mod_cfdata_config_free(Config *cfg)
e_comp_cfdata_config_free(E_Comp_Config *cfg)
{
if (!cfg) return;
eina_stringshare_del(cfg->shadow_style);
@ -204,4 +203,3 @@ e_mod_cfdata_config_free(Config *cfg)
free(cfg);
}

@ -1,10 +1,10 @@
#ifndef E_MOD_COMP_CFDATA_H
#define E_MOD_COMP_CFDATA_H
typedef struct _Config Config;
typedef struct _Match Match;
struct _Config
#ifdef E_TYPEDEFS
typedef struct _E_Comp_Config E_Comp_Config;
typedef struct _E_Comp_Match E_Comp_Match;
#else
#ifndef E_COMP_CFDATA_H
#define E_COMP_CFDATA_H
struct _E_Comp_Config
{
const char *shadow_style;
int engine;
@ -38,7 +38,7 @@ struct _Config
} match;
};
struct _Match
struct _E_Comp_Match
{
const char *title; // glob - used for borders, NULL if not to be used
const char *name; // glob - used for borders, overrides, popups, NULL if not to be used
@ -60,8 +60,9 @@ struct _Match
char urgent; // used for setting urgent state (on popups): 1 is urgent, unset is use regular logic
};
EAPI void e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd);
EAPI Config *e_mod_comp_cfdata_config_new(void);
EAPI void e_mod_cfdata_config_free(Config *cfg);
EAPI void e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd);
EAPI E_Comp_Config *e_comp_cfdata_config_new(void);
EAPI void e_comp_cfdata_config_free(E_Comp_Config *cfg);
#endif
#endif

@ -1,11 +1,10 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_comp_update.h"
#include "e_comp_update.h"
//////////////////////////////////////////////////////////////////////////
static void
_e_mod_comp_tiles_alloc(E_Update *up)
_e_comp_tiles_alloc(E_Update *up)
{
if (up->tiles) return;
up->tiles = calloc(up->tw * up->th, sizeof(unsigned char));
@ -14,7 +13,7 @@ _e_mod_comp_tiles_alloc(E_Update *up)
//////////////////////////////////////////////////////////////////////////
E_Update *
e_mod_comp_update_new(void)
e_comp_update_new(void)
{
E_Update *up;
@ -26,32 +25,32 @@ e_mod_comp_update_new(void)
}
void
e_mod_comp_update_free(E_Update *up)
e_comp_update_free(E_Update *up)
{
free(up->tiles);
free(up);
}
void
e_mod_comp_update_policy_set(E_Update *up,
e_comp_update_policy_set(E_Update *up,
E_Update_Policy pol)
{
up->pol = pol;
}
void
e_mod_comp_update_tile_size_set(E_Update *up,
e_comp_update_tile_size_set(E_Update *up,
int tsw,
int tsh)
{
if ((up->tsw == tsw) && (up->tsh == tsh)) return;
up->tsw = tsw;
up->tsh = tsh;
e_mod_comp_update_clear(up);
e_comp_update_clear(up);
}
void
e_mod_comp_update_resize(E_Update *up,
e_comp_update_resize(E_Update *up,
int w,
int h)
{
@ -69,7 +68,7 @@ e_mod_comp_update_resize(E_Update *up,
up->tw = (up->w + up->tsw - 1) / up->tsw;
up->th = (up->h + up->tsh - 1) / up->tsh;
up->tiles = NULL;
_e_mod_comp_tiles_alloc(up);
_e_comp_tiles_alloc(up);
if ((ptiles) && (up->tiles))
{
if (pth <= up->th)
@ -105,7 +104,7 @@ e_mod_comp_update_resize(E_Update *up,
}
void
e_mod_comp_update_add(E_Update *up,
e_comp_update_add(E_Update *up,
int x,
int y,
int w,
@ -117,7 +116,7 @@ e_mod_comp_update_add(E_Update *up,
if ((w <= 0) || (h <= 0)) return;
if ((up->tw <= 0) || (up->th <= 0)) return;
_e_mod_comp_tiles_alloc(up);
_e_comp_tiles_alloc(up);
E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, up->w, up->h);
if ((w <= 0) || (h <= 0)) return;
@ -157,7 +156,7 @@ e_mod_comp_update_add(E_Update *up,
}
E_Update_Rect *
e_mod_comp_update_rects_get(E_Update *up)
e_comp_update_rects_get(E_Update *up)
{
E_Update_Rect *r;
int ri = 0;
@ -237,7 +236,7 @@ e_mod_comp_update_rects_get(E_Update *up)
}
void
e_mod_comp_update_clear(E_Update *up)
e_comp_update_clear(E_Update *up)
{
if (up->tiles)
{

@ -0,0 +1,46 @@
#ifdef E_TYPEDEFS
typedef struct _E_Update E_Update;
typedef struct _E_Update_Rect E_Update_Rect;
typedef enum _E_Update_Policy
{
E_UPDATE_POLICY_RAW,
E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH,
} E_Update_Policy;
#else
#ifndef E_COMP_UPDATE_H
#define E_COMP_UPDATE_H
struct _E_Update_Rect
{
int x, y, w, h;
};
struct _E_Update
{
int w, h;
int tw, th;
int tsw, tsh;
unsigned char *tiles;
E_Update_Policy pol;
};
E_Update *e_comp_update_new(void);
void e_comp_update_free(E_Update *up);
void e_comp_update_policy_set(E_Update *up,
E_Update_Policy pol);
void e_comp_update_tile_size_set(E_Update *up,
int tsw,
int tsh);
void e_comp_update_resize(E_Update *up,
int w,
int h);
void e_comp_update_add(E_Update *up,
int x,
int y,
int w,
int h);
E_Update_Rect *e_comp_update_rects_get(E_Update *up);
void e_comp_update_clear(E_Update *up);
#endif
#endif

@ -1,16 +1,15 @@
#include "e.h"
#include "e_mod_main.h"
#ifdef HAVE_WAYLAND_CLIENTS
# include <xcb/xcb_image.h>
# include "e_mod_comp_wl.h"
# include "e_mod_comp_wl_comp.h"
# include "e_mod_comp_wl_output.h"
# include "e_mod_comp_wl_input.h"
# include "e_mod_comp_wl_shell.h"
# include "e_comp_wl.h"
# include "e_comp_wl_comp.h"
# include "e_comp_wl_output.h"
# include "e_comp_wl_input.h"
# include "e_comp_wl_shell.h"
#endif
/* local function prototypes */
static Eina_Bool _e_mod_comp_wl_fd_handle(void *data, Ecore_Fd_Handler *hdl);
static Eina_Bool _e_comp_wl_fd_handle(void *data, Ecore_Fd_Handler *hdl);
/* private variables */
static Ecore_Fd_Handler *_wl_fd_handler = NULL;
@ -19,7 +18,7 @@ static Ecore_Fd_Handler *_wl_fd_handler = NULL;
struct wl_display *_wl_disp;
Eina_Bool
e_mod_comp_wl_init(void)
e_comp_wl_init(void)
{
struct wl_event_loop *loop;
int fd = 0;
@ -41,7 +40,7 @@ e_mod_comp_wl_init(void)
}
/* init a wayland compositor ?? */
if (!e_mod_comp_wl_comp_init())
if (!e_comp_wl_comp_init())
{
wl_display_terminate(_wl_disp);
EINA_LOG_ERR("Failed to create wayland compositor\n");
@ -49,30 +48,30 @@ e_mod_comp_wl_init(void)
}
/* init output */
if (!e_mod_comp_wl_output_init())
if (!e_comp_wl_output_init())
{
e_mod_comp_wl_comp_shutdown();
e_comp_wl_comp_shutdown();
wl_display_terminate(_wl_disp);
EINA_LOG_ERR("Failed to create wayland output\n");
return EINA_FALSE;
}
/* init input */
if (!e_mod_comp_wl_input_init())
if (!e_comp_wl_input_init())
{
e_mod_comp_wl_output_shutdown();
e_mod_comp_wl_comp_shutdown();
e_comp_wl_output_shutdown();
e_comp_wl_comp_shutdown();
wl_display_terminate(_wl_disp);
EINA_LOG_ERR("Failed to create wayland input\n");
return EINA_FALSE;
}
/* init a wayland shell */
if (!e_mod_comp_wl_shell_init())
if (!e_comp_wl_shell_init())
{
e_mod_comp_wl_input_shutdown();
e_mod_comp_wl_output_shutdown();
e_mod_comp_wl_comp_shutdown();
e_comp_wl_input_shutdown();
e_comp_wl_output_shutdown();
e_comp_wl_comp_shutdown();
wl_display_terminate(_wl_disp);
EINA_LOG_ERR("Failed to create wayland shell\n");
return EINA_FALSE;
@ -83,7 +82,7 @@ e_mod_comp_wl_init(void)
_wl_fd_handler =
ecore_main_fd_handler_add(fd, ECORE_FD_READ,// | ECORE_FD_WRITE,
_e_mod_comp_wl_fd_handle, NULL, NULL, NULL);
_e_comp_wl_fd_handle, NULL, NULL, NULL);
wl_event_loop_dispatch(loop, 0);
@ -91,7 +90,7 @@ e_mod_comp_wl_init(void)
}
void
e_mod_comp_wl_shutdown(void)
e_comp_wl_shutdown(void)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -99,17 +98,17 @@ e_mod_comp_wl_shutdown(void)
ecore_main_fd_handler_del(_wl_fd_handler);
_wl_fd_handler = NULL;
e_mod_comp_wl_shell_shutdown();
e_mod_comp_wl_input_shutdown();
e_mod_comp_wl_output_shutdown();
e_mod_comp_wl_comp_shutdown();
e_comp_wl_shell_shutdown();
e_comp_wl_input_shutdown();
e_comp_wl_output_shutdown();
e_comp_wl_comp_shutdown();
if (_wl_disp) wl_display_terminate(_wl_disp);
_wl_disp = NULL;
}
uint32_t
e_mod_comp_wl_time_get(void)
e_comp_wl_time_get(void)
{
struct timeval tv;
@ -118,7 +117,7 @@ e_mod_comp_wl_time_get(void)
}
Ecore_X_Pixmap
e_mod_comp_wl_pixmap_get(Ecore_X_Window win)
e_comp_wl_pixmap_get(Ecore_X_Window win)
{
/* Wayland_Compositor *comp; */
/* Wayland_Surface *ws; */
@ -126,7 +125,7 @@ e_mod_comp_wl_pixmap_get(Ecore_X_Window win)
/* LOGFN(__FILE__, __LINE__, __FUNCTION__); */
/* comp = e_mod_comp_wl_comp_get(); */
/* comp = e_comp_wl_comp_get(); */
/* if (wl_list_empty(&comp->surfaces)) return 0; */
/* wl_list_for_each(ws, &comp->surfaces, link) */
@ -180,7 +179,7 @@ e_mod_comp_wl_pixmap_get(Ecore_X_Window win)
/* local functions */
static Eina_Bool
_e_mod_comp_wl_fd_handle(void *data __UNUSED__, Ecore_Fd_Handler *hdl)
_e_comp_wl_fd_handle(void *data __UNUSED__, Ecore_Fd_Handler *hdl)
{
struct wl_event_loop *loop;

@ -1,7 +1,7 @@
#ifdef E_TYPEDEFS
#else
# ifndef E_MOD_COMP_WL_H
# define E_MOD_COMP_WL_H
# ifndef E_COMP_WL_H
# define E_COMP_WL_H
# include <pixman.h>
# include <GLES2/gl2.h>
@ -91,7 +91,7 @@ struct _Wayland_Shell
void (*destroy) (Wayland_Shell *shell);
};
struct _Wayland_Shell_Surface
struct _Wayland_Shell_Surface
{
struct wl_resource resource;
Wayland_Surface *surface;
@ -103,7 +103,7 @@ struct _Wayland_Shell_Surface
char *title, *clas;
struct
struct
{
struct wl_pointer_grab grab;
uint32_t timestamp;
@ -115,7 +115,7 @@ struct _Wayland_Compositor
{
struct wl_list surfaces;
struct
struct
{
EGLDisplay display;
EGLContext context;
@ -178,17 +178,17 @@ struct wl_shell
struct wl_listener lock_surface_listener;
struct wl_list hidden_surfaces;
struct
struct
{
struct wl_resource *desktop_shell;
struct wl_client *client;
} child;
};
Eina_Bool e_mod_comp_wl_init(void);
void e_mod_comp_wl_shutdown(void);
uint32_t e_mod_comp_wl_time_get(void);
Ecore_X_Pixmap e_mod_comp_wl_pixmap_get(Ecore_X_Window win);
Eina_Bool e_comp_wl_init(void);
void e_comp_wl_shutdown(void);
uint32_t e_comp_wl_time_get(void);
Ecore_X_Pixmap e_comp_wl_pixmap_get(Ecore_X_Window win);
extern struct wl_display *_wl_disp;

@ -1,14 +1,13 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_comp.h"
#include "e_comp.h"
#ifdef HAVE_WAYLAND_CLIENTS
# include "e_mod_comp_wl.h"
# include "e_mod_comp_wl_buffer.h"
# include "e_mod_comp_wl_comp.h"
# include "e_comp_wl.h"
# include "e_comp_wl_buffer.h"
# include "e_comp_wl_comp.h"
#endif
void
e_mod_comp_wl_buffer_post_release(struct wl_buffer *buffer)
e_comp_wl_buffer_post_release(struct wl_buffer *buffer)
{
if (--buffer->busy_count > 0) return;
if (buffer->resource.client)
@ -16,7 +15,7 @@ e_mod_comp_wl_buffer_post_release(struct wl_buffer *buffer)
}
void
e_mod_comp_wl_buffer_attach(struct wl_buffer *buffer, struct wl_surface *surface)
e_comp_wl_buffer_attach(struct wl_buffer *buffer, struct wl_surface *surface)
{
Wayland_Surface *ws;
@ -48,7 +47,7 @@ e_mod_comp_wl_buffer_attach(struct wl_buffer *buffer, struct wl_surface *surface
{
Wayland_Compositor *comp;
comp = e_mod_comp_wl_comp_get();
comp = e_comp_wl_comp_get();
if (ws->image != EGL_NO_IMAGE_KHR)
comp->destroy_image(comp->egl.display, ws->image);
ws->image = comp->create_image(comp->egl.display, NULL,

@ -0,0 +1,10 @@
#ifdef E_TYPEDEFS
#else
# ifndef E_COMP_WL_BUFFER_H
# define E_COMP_WL_BUFFER_H
void e_comp_wl_buffer_post_release(struct wl_buffer *buffer);
void e_comp_wl_buffer_attach(struct wl_buffer *buffer, struct wl_surface *surface);
# endif
#endif

@ -1,11 +1,10 @@
#include "e.h"
#include "e_mod_main.h"
#ifdef HAVE_WAYLAND_CLIENTS
# include "e_mod_comp_wl.h"
# include "e_mod_comp_wl_comp.h"
# include "e_mod_comp_wl_input.h"
# include "e_mod_comp_wl_surface.h"
# include "e_mod_comp_wl_region.h"
# include "e_comp_wl.h"
# include "e_comp_wl_comp.h"
# include "e_comp_wl_input.h"
# include "e_comp_wl_surface.h"
# include "e_comp_wl_region.h"
#endif
#ifdef __linux__
@ -25,47 +24,47 @@
#define MODIFIER_SUPER (1 << 10)
/* local function prototypes */
static Eina_Bool _e_mod_comp_wl_comp_egl_init(void);
static void _e_mod_comp_wl_comp_egl_shutdown(void);
static void _e_mod_comp_wl_comp_destroy(void);
static void _e_mod_comp_wl_comp_bind(struct wl_client *client, void *data, uint32_t version __UNUSED__, uint32_t id);
static void _e_mod_comp_wl_comp_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id);
static void _e_mod_comp_wl_comp_region_create(struct wl_client *client, struct wl_resource *resource, unsigned int id);
static void _e_mod_comp_wl_comp_region_destroy(struct wl_resource *resource);
static Eina_Bool _e_mod_comp_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_comp_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__);
static Eina_Bool _e_mod_comp_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_comp_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_comp_wl_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_comp_wl_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_comp_wl_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_comp_wl_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_comp_wl_cb_key_up(void *data __UNUSED__, int type __UNUSED__, void *event);
static Wayland_Surface *_e_mod_comp_wl_comp_pick_surface(int32_t x __UNUSED__, int32_t y __UNUSED__, int32_t *sx, int32_t *sy);
static void _e_mod_comp_wl_comp_update_modifier(Wayland_Input *input, uint32_t key, uint32_t state);
static Eina_Bool _e_comp_wl_comp_egl_init(void);
static void _e_comp_wl_comp_egl_shutdown(void);
static void _e_comp_wl_comp_destroy(void);
static void _e_comp_wl_comp_bind(struct wl_client *client, void *data, uint32_t version __UNUSED__, uint32_t id);
static void _e_comp_wl_comp_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id);
static void _e_comp_wl_comp_region_create(struct wl_client *client, struct wl_resource *resource, unsigned int id);
static void _e_comp_wl_comp_region_destroy(struct wl_resource *resource);
static Eina_Bool _e_comp_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_comp_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__);
static Eina_Bool _e_comp_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_comp_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_comp_wl_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_comp_wl_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_comp_wl_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_comp_wl_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_comp_wl_cb_key_up(void *data __UNUSED__, int type __UNUSED__, void *event);
static Wayland_Surface *_e_comp_wl_comp_pick_surface(int32_t x __UNUSED__, int32_t y __UNUSED__, int32_t *sx, int32_t *sy);
static void _e_comp_wl_comp_update_modifier(Wayland_Input *input, uint32_t key, uint32_t state);
/* wayland interfaces */
static const struct wl_compositor_interface _wl_comp_interface =
{
_e_mod_comp_wl_comp_surface_create,
_e_mod_comp_wl_comp_region_create
_e_comp_wl_comp_surface_create,
_e_comp_wl_comp_region_create
};
static const struct wl_surface_interface _wl_surface_interface =
{
e_mod_comp_wl_surface_destroy,
e_mod_comp_wl_surface_attach,
e_mod_comp_wl_surface_damage,
e_mod_comp_wl_surface_frame,
e_mod_comp_wl_surface_set_opaque_region,
e_mod_comp_wl_surface_set_input_region,
e_mod_comp_wl_surface_commit
e_comp_wl_surface_destroy,
e_comp_wl_surface_attach,
e_comp_wl_surface_damage,
e_comp_wl_surface_frame,
e_comp_wl_surface_set_opaque_region,
e_comp_wl_surface_set_input_region,
e_comp_wl_surface_commit
};
static const struct wl_region_interface _wl_region_interface =
{
e_mod_comp_wl_region_destroy,
e_mod_comp_wl_region_add,
e_mod_comp_wl_region_subtract
e_comp_wl_region_destroy,
e_comp_wl_region_add,
e_comp_wl_region_subtract
};
/* private variables */
@ -73,7 +72,7 @@ static Wayland_Compositor *_wl_comp;
static Eina_List *_wl_event_handlers = NULL;
Eina_Bool
e_mod_comp_wl_comp_init(void)
e_comp_wl_comp_init(void)
{
const char *extensions;
@ -87,17 +86,17 @@ e_mod_comp_wl_comp_init(void)
memset(_wl_comp, 0, sizeof(*_wl_comp));
if (!_e_mod_comp_wl_comp_egl_init())
if (!_e_comp_wl_comp_egl_init())
{
EINA_LOG_ERR("Could not initialize egl\n");
free(_wl_comp);
return EINA_FALSE;
}
_wl_comp->destroy = _e_mod_comp_wl_comp_destroy;
_wl_comp->destroy = _e_comp_wl_comp_destroy;
if (!wl_display_add_global(_wl_disp, &wl_compositor_interface, _wl_comp,
_e_mod_comp_wl_comp_bind))
_e_comp_wl_comp_bind))
{
EINA_LOG_ERR("Failed to add compositor to wayland\n");
free(_wl_comp);
@ -138,45 +137,45 @@ e_mod_comp_wl_comp_init(void)
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN,
_e_mod_comp_wl_cb_focus_in, NULL));
_e_comp_wl_cb_focus_in, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT,
_e_mod_comp_wl_cb_focus_out, NULL));
_e_comp_wl_cb_focus_out, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN,
_e_mod_comp_wl_cb_mouse_in, NULL));
_e_comp_wl_cb_mouse_in, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT,
_e_mod_comp_wl_cb_mouse_out, NULL));
_e_comp_wl_cb_mouse_out, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE,
_e_mod_comp_wl_cb_mouse_move, NULL));
_e_comp_wl_cb_mouse_move, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN,
_e_mod_comp_wl_cb_mouse_down, NULL));
_e_comp_wl_cb_mouse_down, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
_e_mod_comp_wl_cb_mouse_up, NULL));
_e_comp_wl_cb_mouse_up, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
_e_mod_comp_wl_cb_key_down, NULL));
_e_comp_wl_cb_key_down, NULL));
_wl_event_handlers =
eina_list_append(_wl_event_handlers,
ecore_event_handler_add(ECORE_EVENT_KEY_UP,
_e_mod_comp_wl_cb_key_up, NULL));
_e_comp_wl_cb_key_up, NULL));
return EINA_TRUE;
}
void
e_mod_comp_wl_comp_shutdown(void)
e_comp_wl_comp_shutdown(void)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -186,13 +185,13 @@ e_mod_comp_wl_comp_shutdown(void)
}
Wayland_Compositor *
e_mod_comp_wl_comp_get(void)
e_comp_wl_comp_get(void)
{
return _wl_comp;
}
void
e_mod_comp_wl_comp_repick(struct wl_seat *seat, uint32_t timestamp __UNUSED__)
e_comp_wl_comp_repick(struct wl_seat *seat, uint32_t timestamp __UNUSED__)
{
Wayland_Surface *ws, *focus;
struct wl_pointer *pointer;
@ -200,7 +199,7 @@ e_mod_comp_wl_comp_repick(struct wl_seat *seat, uint32_t timestamp __UNUSED__)
if (!(pointer = seat->pointer)) return;
ws =
_e_mod_comp_wl_comp_pick_surface(pointer->x, pointer->y,
_e_comp_wl_comp_pick_surface(pointer->x, pointer->y,
&pointer->current_x, &pointer->current_y);
if (!ws) return;
if (&ws->surface != pointer->current)
@ -222,7 +221,7 @@ e_mod_comp_wl_comp_repick(struct wl_seat *seat, uint32_t timestamp __UNUSED__)
/* local functions */
static Eina_Bool
_e_mod_comp_wl_comp_egl_init(void)
_e_comp_wl_comp_egl_init(void)
{
EGLint major, minor, n;
EGLint config_attribs[] =
@ -288,7 +287,7 @@ _e_mod_comp_wl_comp_egl_init(void)
}
static void
_e_mod_comp_wl_comp_egl_shutdown(void)
_e_comp_wl_comp_egl_shutdown(void)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -299,21 +298,21 @@ _e_mod_comp_wl_comp_egl_shutdown(void)
}
static void
_e_mod_comp_wl_comp_destroy(void)
_e_comp_wl_comp_destroy(void)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (_wl_comp->has_bind)
_wl_comp->unbind_display(_wl_comp->egl.display, _wl_disp);
_e_mod_comp_wl_comp_egl_shutdown();
_e_comp_wl_comp_egl_shutdown();
if (&_wl_comp->surfaces) wl_list_remove(&_wl_comp->surfaces);
free(_wl_comp);
}
static void
_e_mod_comp_wl_comp_bind(struct wl_client *client, void *data, uint32_t version __UNUSED__, uint32_t id)
_e_comp_wl_comp_bind(struct wl_client *client, void *data, uint32_t version __UNUSED__, uint32_t id)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -322,19 +321,19 @@ _e_mod_comp_wl_comp_bind(struct wl_client *client, void *data, uint32_t version
}
static void
_e_mod_comp_wl_comp_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id)
_e_comp_wl_comp_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id)
{
Wayland_Surface *ws;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(ws = e_mod_comp_wl_surface_create(0, 0, 0, 0)))
if (!(ws = e_comp_wl_surface_create(0, 0, 0, 0)))
{
wl_resource_post_no_memory(resource);
return;
}
ws->surface.resource.destroy = e_mod_comp_wl_surface_destroy_surface;
ws->surface.resource.destroy = e_comp_wl_surface_destroy_surface;
ws->surface.resource.object.id = id;
ws->surface.resource.object.interface = &wl_surface_interface;
ws->surface.resource.object.implementation =
@ -345,7 +344,7 @@ _e_mod_comp_wl_comp_surface_create(struct wl_client *client, struct wl_resource
}
static void
_e_mod_comp_wl_comp_region_create(struct wl_client *client, struct wl_resource *resource, unsigned int id)
_e_comp_wl_comp_region_create(struct wl_client *client, struct wl_resource *resource, unsigned int id)
{
Wayland_Region *region;
@ -356,7 +355,7 @@ _e_mod_comp_wl_comp_region_create(struct wl_client *client, struct wl_resource *
return;
}
region->resource.destroy = _e_mod_comp_wl_comp_region_destroy;
region->resource.destroy = _e_comp_wl_comp_region_destroy;
region->resource.object.id = id;
region->resource.object.interface = &wl_region_interface;
region->resource.object.implementation =
@ -368,7 +367,7 @@ _e_mod_comp_wl_comp_region_create(struct wl_client *client, struct wl_resource *
}
static void
_e_mod_comp_wl_comp_region_destroy(struct wl_resource *resource)
_e_comp_wl_comp_region_destroy(struct wl_resource *resource)
{
Wayland_Region *region;
@ -378,7 +377,7 @@ _e_mod_comp_wl_comp_region_destroy(struct wl_resource *resource)
}
static Eina_Bool
_e_mod_comp_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
_e_comp_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Wayland_Input *input;
Wayland_Surface *ws;
@ -389,7 +388,7 @@ _e_mod_comp_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *eve
ev = event;
if (wl_list_empty(&_wl_comp->surfaces)) return ECORE_CALLBACK_PASS_ON;
input = e_mod_comp_wl_input_get();
input = e_comp_wl_input_get();
wl_list_for_each(ws, &_wl_comp->surfaces, link)
{
if (((ws->win) && (ws->win->border))
@ -405,7 +404,7 @@ _e_mod_comp_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *eve
}
static Eina_Bool
_e_mod_comp_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
_e_comp_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{
Wayland_Input *input;
/* Ecore_X_Event_Window_Focus_Out *ev; */
@ -413,7 +412,7 @@ _e_mod_comp_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *ev
// LOGFN(__FILE__, __LINE__, __FUNCTION__);
/* ev = event; */
input = e_mod_comp_wl_input_get();
input = e_comp_wl_input_get();
if ((!input) || (!input->seat.keyboard))
return ECORE_CALLBACK_PASS_ON;
wl_keyboard_set_focus(input->seat.keyboard, NULL);
@ -423,7 +422,7 @@ _e_mod_comp_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *ev
}
static Eina_Bool
_e_mod_comp_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event)
_e_comp_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Wayland_Input *input;
Ecore_X_Event_Mouse_In *ev;
@ -434,20 +433,20 @@ _e_mod_comp_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *eve
ev = event;
if (wl_list_empty(&_wl_comp->surfaces)) return ECORE_CALLBACK_PASS_ON;
input = e_mod_comp_wl_input_get();
input = e_comp_wl_input_get();
ptr = input->seat.pointer;
ptr->x = ev->x;
ptr->y = ev->y;
timestamp = e_mod_comp_wl_time_get();
e_mod_comp_wl_comp_repick(&input->seat, timestamp);
timestamp = e_comp_wl_time_get();
e_comp_wl_comp_repick(&input->seat, timestamp);
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_e_mod_comp_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event)
_e_comp_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Wayland_Input *input;
Ecore_X_Event_Mouse_Out *ev;
@ -457,16 +456,16 @@ _e_mod_comp_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *ev
ev = event;
if (wl_list_empty(&_wl_comp->surfaces)) return ECORE_CALLBACK_PASS_ON;
input = e_mod_comp_wl_input_get();
input = e_comp_wl_input_get();
timestamp = e_mod_comp_wl_time_get();
e_mod_comp_wl_comp_repick(&input->seat, timestamp);
timestamp = e_comp_wl_time_get();
e_comp_wl_comp_repick(&input->seat, timestamp);
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_e_mod_comp_wl_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
_e_comp_wl_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Wayland_Input *input;
Ecore_Event_Mouse_Move *ev;
@ -479,14 +478,14 @@ _e_mod_comp_wl_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *e
ev = event;
if (wl_list_empty(&_wl_comp->surfaces)) return ECORE_CALLBACK_PASS_ON;
input = e_mod_comp_wl_input_get();
input = e_comp_wl_input_get();
ptr = input->seat.pointer;
ptr->x = ev->x;
ptr->y = ev->y;
timestamp = e_mod_comp_wl_time_get();
e_mod_comp_wl_comp_repick(&input->seat, timestamp);
timestamp = e_comp_wl_time_get();
e_comp_wl_comp_repick(&input->seat, timestamp);
interface = ptr->grab->interface;
interface->motion(ptr->grab, timestamp, ptr->grab->x, ptr->grab->y);
@ -497,7 +496,7 @@ _e_mod_comp_wl_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *e
}
static Eina_Bool
_e_mod_comp_wl_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event)
_e_comp_wl_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Wayland_Input *input;
Ecore_Event_Mouse_Button *ev;
@ -525,9 +524,9 @@ _e_mod_comp_wl_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *e
break;
}
input = e_mod_comp_wl_input_get();
input = e_comp_wl_input_get();
ptr = input->seat.pointer;
timestamp = e_mod_comp_wl_time_get();
timestamp = e_comp_wl_time_get();
if (ptr->button_count == 0)
{
ptr->grab_button = btn;
@ -549,7 +548,7 @@ _e_mod_comp_wl_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *e
}
static Eina_Bool
_e_mod_comp_wl_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event)
_e_comp_wl_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Wayland_Input *input;
Ecore_Event_Mouse_Button *ev;
@ -577,12 +576,12 @@ _e_mod_comp_wl_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *eve
break;
}
input = e_mod_comp_wl_input_get();
input = e_comp_wl_input_get();
ptr = input->seat.pointer;
ptr->button_count--;