From 6ea0eee39abae43cbeaec1c678696f75bda1ce50 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Mon, 28 Dec 2015 16:25:51 +0900 Subject: [PATCH] resolve the merge conflict for previous merge(commit id: 27fa5eca) conflicts. Change-Id: I0eb2e2b6052e2e5740085fd54fd1e14f267fb25d --- configure.ac | 76 +- src/bin/Makefile.mk | 18 +- src/bin/e_atoms.c | 27 +- src/bin/e_atoms.h | 6 +- src/bin/e_auth.c | 232 ----- src/bin/e_auth.h | 6 - src/bin/e_client.c | 98 +-- src/bin/e_client.h | 134 +-- src/bin/e_comp.c | 99 +-- src/bin/e_comp.h | 47 +- src/bin/e_comp_canvas.c | 14 +- src/bin/e_comp_object.c | 131 +-- src/bin/e_comp_object.h | 12 +- src/bin/e_comp_wl.c | 937 ++++----------------- src/bin/e_comp_wl.h | 35 +- src/bin/e_comp_wl_data.c | 442 +--------- src/bin/e_comp_wl_data.h | 16 +- src/bin/e_comp_wl_input.c | 355 +------- src/bin/e_comp_wl_input.h | 6 - src/bin/e_comp_x.c | 68 +- src/bin/e_config.h | 4 - src/bin/e_desk.c | 6 +- src/bin/e_dnd.c | 18 +- src/bin/e_hints.c | 12 +- src/bin/e_hints.h | 19 +- src/bin/e_info_server.c | 4 +- src/bin/e_info_server.h | 2 +- src/bin/e_log.h | 14 +- src/bin/e_main.c | 25 - src/bin/e_module.c | 72 +- src/bin/e_module.h | 21 +- src/bin/e_object.c | 8 +- src/bin/e_object.h | 8 +- src/bin/e_pixmap.c | 323 +++---- src/bin/e_pixmap.h | 57 +- src/bin/e_pointer.c | 15 - src/bin/e_scale.c | 8 +- src/bin/e_scale.h | 6 +- src/bin/e_signals.c | 102 --- src/bin/e_win.c | 28 +- src/bin/e_zone.c | 29 +- src/bin/e_zone.h | 61 +- src/modules/Makefile.mk | 10 +- src/modules/Makefile_music_control.mk | 4 - src/modules/Makefile_wl_desktop_shell.mk | 19 +- src/modules/Makefile_wl_screenshot.mk | 27 - src/modules/bufferqueue/e_mod_main.c | 18 +- src/modules/mixer/emixer.c | 2 +- src/modules/packagekit/e_mod_packagekit.c | 5 - src/modules/wl_desktop_shell/e_mod_main.c | 159 +--- src/modules/wl_desktop_shell/e_scaler.c | 134 ++- src/modules/wl_drm/e_mod_main.c | 74 +- src/modules/wl_screenshot/e_mod_main.c | 348 -------- src/modules/wl_screenshot/e_screenshooter_server.c | 104 --- src/modules/wl_screenshot/e_screenshooter_server.h | 7 - src/modules/wl_x11/e_mod_main.c | 31 +- 56 files changed, 620 insertions(+), 3923 deletions(-) delete mode 100644 src/bin/e_auth.c delete mode 100644 src/modules/Makefile_wl_screenshot.mk delete mode 100644 src/modules/wl_screenshot/e_mod_main.c delete mode 100644 src/modules/wl_screenshot/e_screenshooter_server.c delete mode 100644 src/modules/wl_screenshot/e_screenshooter_server.h diff --git a/configure.ac b/configure.ac index dd94435..00aaa85 100755 --- a/configure.ac +++ b/configure.ac @@ -579,35 +579,6 @@ e_requires="\ $udisks_mount \ $device_libs" -<<<<<<< HEAD -PKG_CHECK_MODULES(E, [$e_requires]) -requirements_e="\ -evas >= ${efl_version} \ -ecore >= ${efl_version} \ -ecore-evas >= ${efl_version} \ -ecore-con >= ${efl_version} \ -ecore-ipc >= ${efl_version} \ -ecore-file >= ${efl_version} \ -eet >= ${efl_version} \ -edje >= ${efl_version} \ -efreet >= ${efl_version} \ -efreet-mime >= ${efl_version} \ -efreet-trash >= ${efl_version} \ -eina >= ${efl_version} \ -eldbus >= ${efl_version} \ -eio >= ${efl_version} \ -eo >= ${efl_version} \ -elementary >= ${efl_version} \ -emotion >= ${efl_version} \ -$udisks_mount \ -$eeze_mount \ -$device_libs" -if test "x${e_cv_want_wayland_only}" != "xyes"; then - requirements_e="$requirements_e ecore-x >= $efl_version" -fi -======= ->>>>>>> upstream - PKG_CHECK_MODULES(E_OPEN, [ eina >= ${efl_version} ecore >= ${efl_version} @@ -615,24 +586,12 @@ PKG_CHECK_MODULES(E_OPEN, [ efreet-mime >= ${efl_version} ]) -<<<<<<< HEAD PKG_CHECK_MODULES(E_INFO, [ eina >= ${efl_version} ecore >= ${efl_version} eldbus >= ${efl_version} ]) -e_libs="$E_LIBS $LIBINTL $fnmatch_libs $execinfo_libs" -e_cflags="-DUSE_E_CONFIG_H $E_CFLAGS -D_F_ZONE_WINDOW_ROTATION_ -D_F_E_VIRTUAL_KEYBOARD_TYPE_ -D_F_E_CLIENT_NEW_CLIENT_POST_HOOK_ -D_F_E_COMP_OBJECT_INTERCEPT_HOOK_ -D_F_TRANSIENT_FOR_PATCH -D_F_DISABLE_BACKLIGHT_MOD_SUPPORT" -e_configflags="-DUSE_E_CONFIG_H -D_F_ZONE_WINDOW_ROTATION_ -D_F_E_VIRTUAL_KEYBOARD_TYPE_ -D_F_E_CLIENT_NEW_CLIENT_POST_HOOK_ -D_F_E_COMP_OBJECT_INTERCEPT_HOOK_ -D_F_TRANSIENT_FOR_PATCH -D_F_DISABLE_BACKLIGHT_MOD_SUPPORT" - -AC_SUBST([e_libs]) -AC_SUBST([e_cflags]) -AC_SUBST([e_configflags]) -AC_SUBST([requirements_e]) - -======= ->>>>>>> upstream PKG_CHECK_EXISTS([xkeyboard-config],[ xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config 2>/dev/null` AC_DEFINE_UNQUOTED([XKB_BASE],["$xkb_base"],[Define to the base directory for X keyboard configuration data]) @@ -810,13 +769,8 @@ AC_ARG_ENABLE([wayland-egl], AC_MSG_CHECKING([whether wayland EGL support is enabled]) AC_MSG_RESULT([${e_cv_want_wayland_egl}]) -<<<<<<< HEAD if test "x${e_cv_want_wayland_only}" != "xno" || test "x${e_cv_want_wayland_clients}" != "xno";then - PKG_CHECK_MODULES([WAYLAND], [ecore-wayland wayland-server >= 1.7.0 xkbcommon uuid xdg-shell-server scaler-server transform-server screenshooter-server screenshooter-client tizen-extension-server], -======= -if test "x${e_cv_want_wayland_only}" != "xno" ;then - PKG_CHECK_MODULES([WAYLAND], [ecore-wayland >= 1.16 wayland-server >= 1.8.0 wayland-client >= 1.8.0 xkbcommon uuid], ->>>>>>> upstream + PKG_CHECK_MODULES([WAYLAND], [ecore-wayland >= 1.16 wayland-server >= 1.8.0 wayland-client >= 1.8.0 xkbcommon uuid xdg-shell-server scaler-server transform-server screenshooter-server screenshooter-client tizen-extension-server], [ have_wayland=yes AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support]) @@ -836,7 +790,6 @@ if test "x${have_wayland}" = "xyes"; then else have_wayland_egl=no fi -<<<<<<< HEAD if test "x${e_cv_want_wayland_only}" != "xno"; then have_wayland_only=yes AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment]) @@ -861,8 +814,6 @@ if test "x${have_wayland}" = "xyes"; then else have_wayland_tbm=no fi -======= ->>>>>>> upstream fi AM_CONDITIONAL([HAVE_WAYLAND], [test "x${have_wayland}" = "xyes"]) @@ -924,20 +875,7 @@ define([CHECK_MODULE_WL_FB], ]) AM_CONDITIONAL([HAVE_WL_FB], [test "x${WL_FB}" = "xtrue"]) -<<<<<<< HEAD -define([CHECK_MODULE_WL_SCREENSHOT], -[ - if test "x${have_wayland_clients}" = "xyes" || test "x${e_cv_want_wayland_only}" = "xyes"; then - AC_E_CHECK_PKG(WL_SCREENSHOT, [ ecore >= $efl_version eina >= $efl_version ], [WL_SCREENSHOT=true], [WL_SCREENSHOT=false]) - else - WL_SCREENSHOT=false - fi -]) -AM_CONDITIONAL([HAVE_WL_SCREENSHOT], [test "x${WL_SCREENSHOT}" = "xtrue"]) - -======= WL_DRM=false ->>>>>>> upstream define([CHECK_MODULE_WL_DRM], [ if test "x${have_wayland}" = "xyes" ; then @@ -948,7 +886,6 @@ define([CHECK_MODULE_WL_DRM], ]) AM_CONDITIONAL([HAVE_WL_DRM], [test "x${WL_DRM}" = "xtrue"]) -<<<<<<< HEAD define([CHECK_MODULE_BUFFERQUEUE], [ if test "x${have_wayland_clients}" = "xyes" || test "x${e_cv_want_wayland_only}" = "xyes"; then @@ -958,7 +895,7 @@ define([CHECK_MODULE_BUFFERQUEUE], fi ]) AM_CONDITIONAL([HAVE_BUFFERQUEUE], [test "x${BUFFERQUEUE}" = "xtrue"]) -======= + HAVE_XWAYLAND_DEPS=false define([CHECK_MODULE_XWAYLAND], [ @@ -991,7 +928,6 @@ define([CHECK_MODULE_WL_WEEKEYBOARD], fi ]) AM_CONDITIONAL([HAVE_WL_WEEKEYBOARD], [test "x${WL_WEEKEYBOARD}" = "xtrue"]) ->>>>>>> upstream AC_E_OPTIONAL_MODULE([ibar], true) AC_E_OPTIONAL_MODULE([clock], true) @@ -1046,11 +982,8 @@ AC_E_OPTIONAL_MODULE([wl_x11], $have_wayland, [CHECK_MODULE_WL_X11]) AC_E_OPTIONAL_MODULE([wl_wl], $have_wayland, [CHECK_MODULE_WL_WL]) #AC_E_OPTIONAL_MODULE([wl_fb], $have_wayland, [CHECK_MODULE_WL_FB]) AC_E_OPTIONAL_MODULE([wl_drm], $have_wayland, [CHECK_MODULE_WL_DRM]) -<<<<<<< HEAD -AC_E_OPTIONAL_MODULE([wl_screenshot], $have_wayland, [CHECK_MODULE_WL_SCREENSHOT]) AC_E_OPTIONAL_MODULE([policy_mobile], true) AC_E_OPTIONAL_MODULE([bufferqueue], $have_wayland, [CHECK_MODULE_BUFFERQUEUE]) -======= AC_E_OPTIONAL_MODULE([wl_text_input], $have_wayland, [CHECK_MODULE_WL_TEXT_INPUT]) AC_E_OPTIONAL_MODULE([wl_weekeyboard], $have_wayland, [CHECK_MODULE_WL_WEEKEYBOARD]) AC_E_OPTIONAL_MODULE([policy_mobile], true) @@ -1109,14 +1042,13 @@ if test "x${have_wayland_only}" != "xyes"; then fi e_libs="$E_LIBS $LIBINTL $fnmatch_libs $execinfo_libs" -e_cflags="-DUSE_E_CONFIG_H $E_CFLAGS" -e_configflags="-DUSE_E_CONFIG_H" +e_cflags="-DUSE_E_CONFIG_H $E_CFLAGS -D_F_ZONE_WINDOW_ROTATION_ -D_F_E_VIRTUAL_KEYBOARD_TYPE_ -D_F_E_CLIENT_NEW_CLIENT_POST_HOOK_ -D_F_E_COMP_OBJECT_INTERCEPT_HOOK_ -D_F_TRANSIENT_FOR_PATCH -D_F_DISABLE_BACKLIGHT_MOD_SUPPORT" +e_configflags="-DUSE_E_CONFIG_H -D_F_ZONE_WINDOW_ROTATION_ -D_F_E_VIRTUAL_KEYBOARD_TYPE_ -D_F_E_CLIENT_NEW_CLIENT_POST_HOOK_ -D_F_E_COMP_OBJECT_INTERCEPT_HOOK_ -D_F_TRANSIENT_FOR_PATCH -D_F_DISABLE_BACKLIGHT_MOD_SUPPORT" AC_SUBST([e_libs]) AC_SUBST([e_cflags]) AC_SUBST([e_configflags]) AC_SUBST([requirements_e]) ->>>>>>> upstream HALT="/sbin/shutdown -h now" REBOOT="/sbin/shutdown -r now" diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk index d6eb784..64881fc 100644 --- a/src/bin/Makefile.mk +++ b/src/bin/Makefile.mk @@ -395,33 +395,19 @@ endif endif -<<<<<<< HEAD -src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ -DNEED_WL -if ! HAVE_WAYLAND_ONLY -src_bin_enlightenment_CPPFLAGS += @ECORE_X_CFLAGS@ -DNEED_X=1 -endif +src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ if HAVE_WAYLAND_TBM src_bin_enlightenment_CPPFLAGS += @WAYLAND_TBM_CFLAGS@ @ECORE_DRM_CFLAGS@ endif -======= -src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ ->>>>>>> upstream src_bin_enlightenment_SOURCES = \ src/bin/e_main.c \ $(enlightenment_src) src_bin_enlightenment_LDFLAGS = -export-dynamic -<<<<<<< HEAD -src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ @WL_DRM_LIBS@ @WAYLAND_EGL_LIBS@ -lm @SHM_OPEN_LIBS@ -if ! HAVE_WAYLAND_ONLY -src_bin_enlightenment_LDADD += @ECORE_X_LIBS@ -endif +src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ @WL_DRM_LIBS@ @WAYLAND_EGL_LIBS@ -lm @SHM_OPEN_LIBS@ @ECORE_X_LIBS@ if HAVE_WAYLAND_TBM src_bin_enlightenment_LDADD += @WAYLAND_TBM_LIBS@ @ECORE_DRM_LIBS@ endif -======= -src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ @WL_DRM_LIBS@ @WAYLAND_EGL_LIBS@ -lm @SHM_OPEN_LIBS@ @ECORE_X_LIBS@ ->>>>>>> upstream src_bin_enlightenment_imc_SOURCES = \ src/bin/e.h \ diff --git a/src/bin/e_atoms.c b/src/bin/e_atoms.c index c411b6c..368054f 100644 --- a/src/bin/e_atoms.c +++ b/src/bin/e_atoms.c @@ -2,20 +2,6 @@ /* Atoms */ #ifndef HAVE_WAYLAND_ONLY -<<<<<<< HEAD -EAPI Ecore_X_Atom E_ATOM_MANAGED = 0; -EAPI Ecore_X_Atom E_ATOM_ZONE = 0; -EAPI Ecore_X_Atom E_ATOM_DESK = 0; -EAPI Ecore_X_Atom E_ATOM_MAPPED = 0; -EAPI Ecore_X_Atom E_ATOM_SHADE_DIRECTION = 0; -EAPI Ecore_X_Atom E_ATOM_HIDDEN = 0; -EAPI Ecore_X_Atom E_ATOM_BORDER_SIZE = 0; -EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE = 0; -EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED = 0; -EAPI Ecore_X_Atom E_ATOM_WINDOW_OPAQUE = 0; -EAPI Ecore_X_Atom E_ATOM_DESKTOP_FILE = 0; -EAPI Ecore_X_Atom E_ATOM_ZONE_GEOMETRY = 0; -======= E_API Ecore_X_Atom E_ATOM_MANAGED = 0; E_API Ecore_X_Atom E_ATOM_ZONE = 0; E_API Ecore_X_Atom E_ATOM_DESK = 0; @@ -25,10 +11,10 @@ E_API Ecore_X_Atom E_ATOM_HIDDEN = 0; E_API Ecore_X_Atom E_ATOM_BORDER_SIZE = 0; E_API Ecore_X_Atom E_ATOM_WINDOW_STATE = 0; E_API Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED = 0; +E_API Ecore_X_Atom E_ATOM_WINDOW_OPAQUE = 0; E_API Ecore_X_Atom E_ATOM_DESKTOP_FILE = 0; E_API Ecore_X_Atom E_ATOM_ZONE_GEOMETRY = 0; E_API Ecore_X_Atom WL_SURFACE_ID = 0; ->>>>>>> upstream #endif /* externally accessible functions */ @@ -51,11 +37,7 @@ e_atoms_init(void) "E_ZONE_GEOMETRY", "WL_SURFACE_ID" }; -<<<<<<< HEAD - Ecore_X_Atom atoms[12]; -======= Ecore_X_Atom atoms[EINA_C_ARRAY_LENGTH(atom_names)]; ->>>>>>> upstream ecore_x_atoms_get(atom_names, EINA_C_ARRAY_LENGTH(atom_names), atoms); E_ATOM_MANAGED = atoms[0]; @@ -67,15 +49,10 @@ e_atoms_init(void) E_ATOM_BORDER_SIZE = atoms[6]; E_ATOM_WINDOW_STATE = atoms[7]; E_ATOM_WINDOW_STATE_CENTERED = atoms[8]; -<<<<<<< HEAD E_ATOM_WINDOW_OPAQUE = atoms[9]; E_ATOM_DESKTOP_FILE = atoms[10]; E_ATOM_ZONE_GEOMETRY = atoms[11]; -======= - E_ATOM_DESKTOP_FILE = atoms[9]; - E_ATOM_ZONE_GEOMETRY = atoms[10]; - WL_SURFACE_ID = atoms[11]; ->>>>>>> upstream + WL_SURFACE_ID = atoms[12]; #endif return 1; } diff --git a/src/bin/e_atoms.h b/src/bin/e_atoms.h index 39840bf..cef1cfc 100644 --- a/src/bin/e_atoms.h +++ b/src/bin/e_atoms.h @@ -23,14 +23,10 @@ extern E_API Ecore_X_Atom E_ATOM_DESKTOP_FILE; extern E_API Ecore_X_Atom E_ATOM_WINDOW_STATE; extern E_API Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED; -<<<<<<< HEAD -extern EAPI Ecore_X_Atom E_ATOM_WINDOW_OPAQUE; +extern E_API Ecore_X_Atom E_ATOM_WINDOW_OPAQUE; -extern EAPI Ecore_X_Atom E_ATOM_ZONE_GEOMETRY; -======= extern E_API Ecore_X_Atom E_ATOM_ZONE_GEOMETRY; extern E_API Ecore_X_Atom WL_SURFACE_ID; ->>>>>>> upstream EINTERN int e_atoms_init(void); EINTERN int e_atoms_shutdown(void); diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c deleted file mode 100644 index 78d171c..0000000 --- a/src/bin/e_auth.c +++ /dev/null @@ -1,232 +0,0 @@ -#include "e.h" - -#if defined(HAVE_PAM) && !defined(__FreeBSD__) -# include -# include - - -typedef struct E_Auth -{ - struct - { - struct pam_conv conv; - pam_handle_t *handle; - } pam; - - char user[4096]; - char passwd[4096]; -} E_Auth; - -static pid_t _e_auth_child_pid = -1; - -static char * -_auth_auth_get_current_user(void) -{ - char *user; - struct passwd *pwent = NULL; - - pwent = getpwuid(getuid()); - if (!pwent) return NULL; - user = strdup(pwent->pw_name); - return user; -} - -static int -_auth_auth_pam_conv(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) -{ - int replies = 0; - E_Auth *da = (E_Auth *)appdata_ptr; - struct pam_response *reply = NULL; - - reply = (struct pam_response *)malloc(sizeof(struct pam_response) * num_msg); - - if (!reply) return PAM_CONV_ERR; - - for (replies = 0; replies < num_msg; replies++) - { - switch (msg[replies]->msg_style) - { - case PAM_PROMPT_ECHO_ON: - reply[replies].resp_retcode = PAM_SUCCESS; - reply[replies].resp = strdup(da->user); - break; - - case PAM_PROMPT_ECHO_OFF: - reply[replies].resp_retcode = PAM_SUCCESS; - reply[replies].resp = strdup(da->passwd); - break; - - case PAM_ERROR_MSG: - case PAM_TEXT_INFO: - reply[replies].resp_retcode = PAM_SUCCESS; - reply[replies].resp = NULL; - break; - - default: - free(reply); - return PAM_CONV_ERR; - } - } - *resp = reply; - return PAM_SUCCESS; -} - -static int -_auth_pam_init(E_Auth *da) -{ - int pamerr; - const char *pam_prof; - char *current_host; - char *current_user; - - if (!da) return -1; - - da->pam.conv.conv = _auth_auth_pam_conv; - da->pam.conv.appdata_ptr = da; - da->pam.handle = NULL; - - /* try other pam profiles - and system-auth (login for fbsd users) is a fallback */ - pam_prof = "login"; - if (ecore_file_exists("/etc/pam.d/enlightenment")) - pam_prof = "enlightenment"; - else if (ecore_file_exists("/etc/pam.d/xscreensaver")) - pam_prof = "xscreensaver"; - else if (ecore_file_exists("/etc/pam.d/kscreensaver")) - pam_prof = "kscreensaver"; - else if (ecore_file_exists("/etc/pam.d/system-auth")) - pam_prof = "system-auth"; - else if (ecore_file_exists("/etc/pam.d/system")) - pam_prof = "system"; - else if (ecore_file_exists("/etc/pam.d/xdm")) - pam_prof = "xdm"; - else if (ecore_file_exists("/etc/pam.d/gdm")) - pam_prof = "gdm"; - else if (ecore_file_exists("/etc/pam.d/kdm")) - pam_prof = "kdm"; - - if ((pamerr = pam_start(pam_prof, da->user, &(da->pam.conv), - &(da->pam.handle))) != PAM_SUCCESS) - return pamerr; - - current_user = _auth_auth_get_current_user(); - - if ((pamerr = pam_set_item(da->pam.handle, PAM_USER, current_user)) != PAM_SUCCESS) - { - free(current_user); - return pamerr; - } - - current_host = e_auth_hostname_get(); - if ((pamerr = pam_set_item(da->pam.handle, PAM_RHOST, current_host)) != PAM_SUCCESS) - { - free(current_user); - free(current_host); - return pamerr; - } - - free(current_user); - free(current_host); - return 0; -} -#endif // HAVE_PAM && !__FreeBSD__ - -E_API int -#if defined(__FreeBSD__) -e_auth_begin(char *passwd) -{ - char buf[PATH_MAX], *p; - Ecore_Exe *exe = NULL; - int ret = 0; - - if (strlen(passwd) == 0) goto out; - - snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_ckpasswd", - e_prefix_lib_get()); - - exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); - if (ecore_exe_send(exe, passwd, strlen(passwd)) != EINA_TRUE) goto out; - ecore_exe_close_stdin(exe); - - ret = ecore_exe_pid_get(exe); - if (ret == -1) - { - ret = 0; - goto out; - } - - exe = NULL; -out: - if (exe) ecore_exe_free(exe); - - /* security - null out passwd string once we are done with it */ - for (p = passwd; *p; p++) - *p = 0; - if (passwd[0] || passwd[3]) fprintf(stderr, "ACK!\n"); - - return ret; -} -#elif defined(HAVE_PAM) -e_auth_begin(char *passwd) -{ - /* child */ - int pamerr; - E_Auth da; - char *current_user; - struct sigaction action; - - _e_auth_child_pid = fork(); - if (_e_auth_child_pid > 0) return _e_auth_child_pid; - if (_e_auth_child_pid < 0) return -1; - - action.sa_handler = SIG_DFL; - action.sa_flags = SA_ONSTACK | SA_NODEFER | SA_RESETHAND | SA_SIGINFO; - sigemptyset(&action.sa_mask); - sigaction(SIGSEGV, &action, NULL); - sigaction(SIGILL, &action, NULL); - sigaction(SIGFPE, &action, NULL); - sigaction(SIGBUS, &action, NULL); - sigaction(SIGABRT, &action, NULL); - - current_user = _auth_auth_get_current_user(); - eina_strlcpy(da.user, current_user, sizeof(da.user)); - eina_strlcpy(da.passwd, passwd, sizeof(da.passwd)); - /* security - null out passwd string once we are done with it */ - e_util_memclear(passwd, strlen(passwd)); - - da.pam.handle = NULL; - da.pam.conv.conv = NULL; - da.pam.conv.appdata_ptr = NULL; - - pamerr = _auth_pam_init(&da); - if (pamerr != PAM_SUCCESS) - { - free(current_user); - exit(1); - } - pamerr = pam_authenticate(da.pam.handle, 0); - pam_end(da.pam.handle, pamerr); - /* security - null out passwd string once we are done with it */ - e_util_memclear(da.passwd, sizeof(da.passwd)); - - if (pamerr == PAM_SUCCESS) - { - free(current_user); - exit(0); - } - free(current_user); - exit(-1); - - return 0; -} -#else -e_auth_begin(char *passwd EINA_UNUSED) -{ - return 0; -} -#endif - -E_API char * -e_auth_hostname_get(void) -{ - return strdup("localhost"); -} diff --git a/src/bin/e_auth.h b/src/bin/e_auth.h index 0f7576f..67c7ada 100644 --- a/src/bin/e_auth.h +++ b/src/bin/e_auth.h @@ -1,12 +1,6 @@ #ifndef E_AUTH_H #define E_AUTH_H -<<<<<<< HEAD -======= -E_API int e_auth_begin(char *passwd); -E_API char *e_auth_hostname_get(void); - ->>>>>>> upstream static inline int e_auth_hash_djb2(const char *key, int len) { diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 81abb4b..65719a8 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -3,37 +3,6 @@ static int _e_client_hooks_delete = 0; static int _e_client_hooks_walking = 0; -<<<<<<< HEAD -EAPI int E_EVENT_CLIENT_ADD = -1; -EAPI int E_EVENT_CLIENT_REMOVE = -1; -EAPI int E_EVENT_CLIENT_ZONE_SET = -1; -EAPI int E_EVENT_CLIENT_DESK_SET = -1; -EAPI int E_EVENT_CLIENT_RESIZE = -1; -EAPI int E_EVENT_CLIENT_MOVE = -1; -EAPI int E_EVENT_CLIENT_SHOW = -1; -EAPI int E_EVENT_CLIENT_HIDE = -1; -EAPI int E_EVENT_CLIENT_ICONIFY = -1; -EAPI int E_EVENT_CLIENT_UNICONIFY = -1; -EAPI int E_EVENT_CLIENT_STACK = -1; -EAPI int E_EVENT_CLIENT_FOCUS_IN = -1; -EAPI int E_EVENT_CLIENT_FOCUS_OUT = -1; -EAPI int E_EVENT_CLIENT_PROPERTY = -1; -EAPI int E_EVENT_CLIENT_FULLSCREEN = -1; -EAPI int E_EVENT_CLIENT_UNFULLSCREEN = -1; -#ifdef _F_ZONE_WINDOW_ROTATION_ -EAPI int E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN = -1; -EAPI int E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL = -1; -EAPI int E_EVENT_CLIENT_ROTATION_CHANGE_END = -1; -#endif -EAPI int E_EVENT_CLIENT_VISIBILITY_CHANGE = -1; -#ifdef HAVE_WAYLAND_ONLY -EAPI int E_EVENT_CLIENT_BUFFER_CHANGE = -1; -#endif - -static Eina_Hash *clients_hash = NULL; // pixmap->client - -static int focus_track_frozen = 0; -======= E_API int E_EVENT_CLIENT_ADD = -1; E_API int E_EVENT_CLIENT_REMOVE = -1; E_API int E_EVENT_CLIENT_ZONE_SET = -1; @@ -50,11 +19,19 @@ E_API int E_EVENT_CLIENT_FOCUS_OUT = -1; E_API int E_EVENT_CLIENT_PROPERTY = -1; E_API int E_EVENT_CLIENT_FULLSCREEN = -1; E_API int E_EVENT_CLIENT_UNFULLSCREEN = -1; +#ifdef _F_ZONE_WINDOW_ROTATION_ +E_API int E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN = -1; +E_API int E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL = -1; +E_API int E_EVENT_CLIENT_ROTATION_CHANGE_END = -1; +#endif +E_API int E_EVENT_CLIENT_VISIBILITY_CHANGE = -1; +#ifdef HAVE_WAYLAND_ONLY +E_API int E_EVENT_CLIENT_BUFFER_CHANGE = -1; +#endif static Eina_Hash *clients_hash[2] = {NULL}; // pixmap->client static unsigned int focus_track_frozen = 0; ->>>>>>> upstream static int warp_to = 0; static int warp_to_x = 0; @@ -902,15 +879,12 @@ _e_client_free(E_Client *ec) ec->e.state.profile.wait_desk = NULL; evas_object_del(ec->frame); E_OBJECT(ec)->references--; -<<<<<<< HEAD ELOG("CLIENT FREE", ec->pixmap, ec); -======= #ifdef HAVE_WAYLAND e_uuid_store_entry_del(ec->uuid); #endif ->>>>>>> upstream free(ec); } @@ -2823,7 +2797,7 @@ _e_client_visibility_zone_calculate(E_Zone *zone) EINA_RECTANGLE_SET(&r, zone->x, zone->y, zone->w, zone->h); eina_tiler_rect_add(t, &r); - o = evas_object_top_get(zone->comp->evas); + o = evas_object_top_get(e_comp->evas); for (; o; o = evas_object_below_get(o)) { ec = evas_object_data_get(o, "E_Client"); @@ -2952,7 +2926,7 @@ _e_client_visibility_zone_calculate(E_Zone *zone) } } -EAPI void +E_API void e_client_visibility_calculate(void) { E_Zone *zone; @@ -3255,13 +3229,9 @@ e_client_new(E_Pixmap *cp, int first_map, int internal) e_comp->clients = eina_list_append(e_comp->clients, ec); eina_hash_add(clients_hash[e_pixmap_type_get(cp)], &ec->pixmap, ec); -<<<<<<< HEAD ELOG("CLIENT ADD", ec->pixmap, ec); - _e_client_event_simple(ec, E_EVENT_CLIENT_ADD); -======= if (!ec->ignored) _e_client_event_simple(ec, E_EVENT_CLIENT_ADD); ->>>>>>> upstream e_comp_object_client_add(ec); if (ec->frame) { @@ -3402,23 +3372,15 @@ e_client_desk_set(E_Client *ec, E_Desk *desk) if (old_desk) { ev = E_NEW(E_Event_Client_Desk_Set, 1); -<<<<<<< HEAD if (ev) { ev->ec = ec; + UNREFD(ec, 4); e_object_ref(E_OBJECT(ec)); ev->desk = old_desk; e_object_ref(E_OBJECT(old_desk)); ecore_event_add(E_EVENT_CLIENT_DESK_SET, ev, (Ecore_End_Cb)_e_client_event_desk_set_free, NULL); } -======= - ev->ec = ec; - UNREFD(ec, 4); - e_object_ref(E_OBJECT(ec)); - ev->desk = old_desk; - e_object_ref(E_OBJECT(old_desk)); - ecore_event_add(E_EVENT_CLIENT_DESK_SET, ev, (Ecore_End_Cb)_e_client_event_desk_set_free, NULL); ->>>>>>> upstream if (old_desk->zone == ec->zone) { @@ -3953,16 +3915,11 @@ e_client_below_get(const E_Client *ec) } /* go down the layers until we find one */ -<<<<<<< HEAD - if (e_comp_canvas_layer_map(ec->layer) == 9999) return NULL; - if (e_comp_canvas_layer_map(ec->layer) <= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP)) return NULL; - for (x = e_comp_canvas_layer_map(ec->layer) - 1; x >= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x--) -======= + if (e_comp_canvas_layer_map(ec->layer) > e_comp_canvas_layer_map(E_LAYER_MAX)) return NULL; x = e_comp_canvas_layer_map(ec->layer); if (x > 0) x--; for (; x >= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x--) ->>>>>>> upstream { if (!e_comp->layers[x].clients) continue; EINA_INLIST_REVERSE_FOREACH(e_comp->layers[x].clients, ec2) @@ -3977,13 +3934,7 @@ e_client_bottom_get(void) { unsigned int x; -<<<<<<< HEAD - EINA_SAFETY_ON_NULL_RETURN_VAL(c, NULL); - for (x = e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x <= e_comp_canvas_layer_map(E_LAYER_CLIENT_ALERT); x++) -======= - for (x = e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x <= e_comp_canvas_layer_map(E_LAYER_CLIENT_PRIO); x++) ->>>>>>> upstream { E_Client *ec2; @@ -4000,13 +3951,7 @@ e_client_top_get(void) { unsigned int x; -<<<<<<< HEAD - EINA_SAFETY_ON_NULL_RETURN_VAL(c, NULL); - for (x = e_comp_canvas_layer_map(E_LAYER_CLIENT_ALERT); x >= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x--) -======= - for (x = e_comp_canvas_layer_map(E_LAYER_CLIENT_PRIO); x >= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x--) ->>>>>>> upstream { E_Client *ec2; @@ -4619,17 +4564,12 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy) E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE); if (!ec->zone) return; -<<<<<<< HEAD if ((ec->shaded) || (ec->shading) || (ec->fullscreen)) return; _e_client_hook_call(E_CLIENT_HOOK_FULLSCREEN_PRE, ec); if (ec->skip_fullscreen) return; - -======= - if ((ec->shaded) || (ec->shading) || ec->fullscreen) return; if ((!e_config->allow_above_fullscreen) && (!ec->desk->visible)) return; ->>>>>>> upstream if (ec->new_client) { ec->need_fullscreen = 1; @@ -4748,15 +4688,12 @@ e_client_iconify(E_Client *ec) { E_OBJECT_CHECK(ec); E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE); -<<<<<<< HEAD ELOGF("TZVIS", "ICONIFY |not_raise:%d |by_client:%d", ec->pixmap, ec, (unsigned int)ec->exp_iconify.not_raise, ec->exp_iconify.by_client); -======= if (!ec->zone) return; ->>>>>>> upstream if (ec->shading || ec->iconic) return; ec->iconic = 1; ec->want_focus = ec->take_focus = 0; @@ -4795,15 +4732,12 @@ e_client_uniconify(E_Client *ec) E_OBJECT_CHECK(ec); E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE); -<<<<<<< HEAD ELOGF("TZVIS", "UNICONIFY|not_raise:%d |by_client:%d", ec->pixmap, ec, (unsigned int)ec->exp_iconify.not_raise, ec->exp_iconify.by_client); -======= if (!ec->zone) return; ->>>>>>> upstream if (ec->shading || (!ec->iconic)) return; desk = e_desk_current_get(ec->desk->zone); e_client_desk_set(ec, desk); @@ -5760,7 +5694,7 @@ e_client_layout_cb_set(E_Client_Layout_Cb cb) //////////////////////////////////////////// -EAPI void e_client_transform_update(E_Client *ec) +E_API void e_client_transform_update(E_Client *ec) { if (e_client_util_resizing_get(ec)) _e_client_transform_resize(ec); @@ -5768,7 +5702,7 @@ EAPI void e_client_transform_update(E_Client *ec) //////////////////////////////////////////// -EAPI void e_client_transform_apply(E_Client *ec, double angle, double zoom, int cx, int cy) +E_API void e_client_transform_apply(E_Client *ec, double angle, double zoom, int cx, int cy) { Evas_Map *map; #ifdef HAVE_WAYLAND_ONLY @@ -5842,7 +5776,7 @@ EAPI void e_client_transform_apply(E_Client *ec, double angle, double zoom, int //////////////////////////////////////////// -EAPI void e_client_transform_clear(E_Client *ec) +E_API void e_client_transform_clear(E_Client *ec) { #ifdef HAVE_WAYLAND_ONLY E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index cfc66fb..b60f5ad 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -814,11 +814,8 @@ struct E_Client Eina_Bool ignored : 1; // client is comp-ignored Eina_Bool no_shape_cut : 1; // client shape should not be cut Eina_Bool maximize_override : 1; // client is doing crazy stuff and should "just do it" when moving/resizing -<<<<<<< HEAD Eina_Bool transformed : 1; -======= Eina_Bool keyboard_resizing : 1; ->>>>>>> upstream #ifdef HAVE_WAYLAND uuid_t uuid; @@ -857,33 +854,6 @@ struct E_Client for (EC = e_client_top_get(); EC; EC = e_client_below_get(EC)) -<<<<<<< HEAD -EAPI extern int E_EVENT_CLIENT_ADD; -EAPI extern int E_EVENT_CLIENT_REMOVE; -EAPI extern int E_EVENT_CLIENT_ZONE_SET; -EAPI extern int E_EVENT_CLIENT_DESK_SET; -EAPI extern int E_EVENT_CLIENT_RESIZE; -EAPI extern int E_EVENT_CLIENT_MOVE; -EAPI extern int E_EVENT_CLIENT_SHOW; -EAPI extern int E_EVENT_CLIENT_HIDE; -EAPI extern int E_EVENT_CLIENT_ICONIFY; -EAPI extern int E_EVENT_CLIENT_UNICONIFY; -EAPI extern int E_EVENT_CLIENT_STACK; -EAPI extern int E_EVENT_CLIENT_FOCUS_IN; -EAPI extern int E_EVENT_CLIENT_FOCUS_OUT; -EAPI extern int E_EVENT_CLIENT_PROPERTY; -EAPI extern int E_EVENT_CLIENT_FULLSCREEN; -EAPI extern int E_EVENT_CLIENT_UNFULLSCREEN; -#ifdef _F_ZONE_WINDOW_ROTATION_ -EAPI extern int E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN; -EAPI extern int E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL; -EAPI extern int E_EVENT_CLIENT_ROTATION_CHANGE_END; -#endif -EAPI extern int E_EVENT_CLIENT_VISIBILITY_CHANGE; -#ifdef HAVE_WAYLAND_ONLY -EAPI extern int E_EVENT_CLIENT_BUFFER_CHANGE; -#endif -======= E_API extern int E_EVENT_CLIENT_ADD; E_API extern int E_EVENT_CLIENT_REMOVE; E_API extern int E_EVENT_CLIENT_ZONE_SET; @@ -900,99 +870,19 @@ E_API extern int E_EVENT_CLIENT_FOCUS_OUT; E_API extern int E_EVENT_CLIENT_PROPERTY; E_API extern int E_EVENT_CLIENT_FULLSCREEN; E_API extern int E_EVENT_CLIENT_UNFULLSCREEN; - ->>>>>>> upstream +#ifdef _F_ZONE_WINDOW_ROTATION_ +E_API extern int E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN; +E_API extern int E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL; +E_API extern int E_EVENT_CLIENT_ROTATION_CHANGE_END; +#endif +E_API extern int E_EVENT_CLIENT_VISIBILITY_CHANGE; +#ifdef HAVE_WAYLAND_ONLY +E_API extern int E_EVENT_CLIENT_BUFFER_CHANGE; +#endif EINTERN void e_client_idler_before(void); EINTERN Eina_Bool e_client_init(void); EINTERN void e_client_shutdown(void); -<<<<<<< HEAD -EAPI E_Client *e_client_new(E_Comp *c, E_Pixmap *cp, int first_map, int internal); -EAPI void e_client_desk_set(E_Client *ec, E_Desk *desk); -EAPI Eina_Bool e_client_comp_grabbed_get(void); -EAPI E_Client *e_client_action_get(void); -EAPI E_Client *e_client_warping_get(void); -EAPI Eina_List *e_clients_immortal_list(void); -EAPI void e_client_mouse_in(E_Client *ec, int x, int y); -EAPI void e_client_mouse_out(E_Client *ec, int x, int y); -EAPI void e_client_mouse_wheel(E_Client *ec, Evas_Point *output, E_Binding_Event_Wheel *ev); -EAPI void e_client_mouse_down(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev); -EAPI void e_client_mouse_up(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button* ev); -EAPI void e_client_mouse_move(E_Client *ec, Evas_Point *output); -EAPI void e_client_res_change_geometry_save(E_Client *bd); -EAPI void e_client_res_change_geometry_restore(E_Client *ec); -EAPI void e_client_zone_set(E_Client *ec, E_Zone *zone); -EAPI void e_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h); -EAPI E_Client *e_client_above_get(const E_Client *ec); -EAPI E_Client *e_client_below_get(const E_Client *ec); -EAPI E_Client *e_client_bottom_get(const E_Comp *c); -EAPI E_Client *e_client_top_get(const E_Comp *c); -EAPI unsigned int e_clients_count(E_Comp *c); -EAPI void e_client_move_intercept_cb_set(E_Client *ec, E_Client_Move_Intercept_Cb cb); -EAPI E_Client_Hook *e_client_hook_add(E_Client_Hook_Point hookpoint, E_Client_Hook_Cb func, const void *data); -EAPI void e_client_hook_del(E_Client_Hook *ch); -EAPI void e_client_focus_latest_set(E_Client *ec); -EAPI void e_client_raise_latest_set(E_Client *ec); -EAPI Eina_Bool e_client_focus_track_enabled(void); -EAPI void e_client_focus_track_freeze(void); -EAPI void e_client_focus_track_thaw(void); -EAPI void e_client_refocus(void); -EAPI void e_client_focus_set_with_pointer(E_Client *ec); -EAPI void e_client_activate(E_Client *ec, Eina_Bool just_do_it); -EAPI E_Client *e_client_focused_get(void); -EAPI Eina_List *e_client_focus_stack_get(void); -EAPI Eina_List *e_client_raise_stack_get(void); -EAPI Eina_List *e_client_lost_windows_get(E_Zone *zone); -EAPI void e_client_shade(E_Client *ec, E_Direction dir); -EAPI void e_client_unshade(E_Client *ec, E_Direction dir); -EAPI void e_client_maximize(E_Client *ec, E_Maximize max); -EAPI void e_client_unmaximize(E_Client *ec, E_Maximize max); -EAPI void e_client_fullscreen(E_Client *ec, E_Fullscreen policy); -EAPI void e_client_unfullscreen(E_Client *ec); -EAPI void e_client_iconify(E_Client *ec); -EAPI void e_client_uniconify(E_Client *ec); -EAPI void e_client_urgent_set(E_Client *ec, Eina_Bool urgent); -EAPI void e_client_stick(E_Client *ec); -EAPI void e_client_unstick(E_Client *ec); -EAPI void e_client_pinned_set(E_Client *ec, Eina_Bool set); -EAPI void e_client_comp_hidden_set(E_Client *ec, Eina_Bool hidden); -EAPI Eina_Bool e_client_border_set(E_Client *ec, const char *name); -EAPI void e_client_act_move_keyboard(E_Client *ec); -EAPI void e_client_act_resize_keyboard(E_Client *ec); -EAPI void e_client_act_move_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev); -EAPI void e_client_act_move_end(E_Client *ec, E_Binding_Event_Mouse_Button *ev EINA_UNUSED); -EAPI void e_client_act_resize_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev); -EAPI void e_client_act_resize_end(E_Client *ec, E_Binding_Event_Mouse_Button *ev EINA_UNUSED); -EAPI void e_client_act_menu_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev, int key); -EAPI void e_client_act_close_begin(E_Client *ec); -EAPI void e_client_act_kill_begin(E_Client *ec); -EAPI Evas_Object *e_client_icon_add(E_Client *ec, Evas *evas); -EAPI void e_client_ping(E_Client *cw); -EAPI void e_client_move_cancel(void); -EAPI void e_client_resize_cancel(void); -EAPI Eina_Bool e_client_resize_begin(E_Client *ec); -EAPI void e_client_frame_recalc(E_Client *ec); -EAPI void e_client_signal_move_begin(E_Client *ec, const char *sig, const char *src EINA_UNUSED); -EAPI void e_client_signal_move_end(E_Client *ec, const char *sig EINA_UNUSED, const char *src EINA_UNUSED); -EAPI void e_client_signal_resize_begin(E_Client *ec, const char *dir, const char *sig, const char *src EINA_UNUSED); -EAPI void e_client_signal_resize_end(E_Client *ec, const char *dir EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED); -EAPI void e_client_resize_limit(E_Client *ec, int *w, int *h); -EAPI E_Client *e_client_under_pointer_get(E_Desk *desk, E_Client *exclude); -EAPI int e_client_pointer_warp_to_center_now(E_Client *ec); -EAPI int e_client_pointer_warp_to_center(E_Client *ec); -EAPI void e_client_redirected_set(E_Client *ec, Eina_Bool set); -EAPI Eina_Bool e_client_is_stacking(const E_Client *ec); -EAPI Eina_Bool e_client_desk_window_profile_available_check(E_Client *ec, const char *profile); -EAPI void e_client_desk_window_profile_wait_desk_set(E_Client *ec, E_Desk *desk); -EAPI void e_client_layout_cb_set(E_Client_Layout_Cb cb); -EAPI void e_client_visibility_calculate(void); - -EAPI void e_client_transform_update(E_Client *ec); -EAPI void e_client_transform_apply(E_Client *ec, double degree, double zoom, int cx, int cy); -EAPI void e_client_transform_clear(E_Client *ec); - -YOLO EAPI void e_client_focus_stack_set(Eina_List *l); -======= E_API E_Client *e_client_new(E_Pixmap *cp, int first_map, int internal); E_API void e_client_unignore(E_Client *ec); E_API void e_client_desk_set(E_Client *ec, E_Desk *desk); @@ -1073,9 +963,13 @@ E_API Eina_Bool e_client_has_xwindow(const E_Client *ec); E_API Eina_Bool e_client_desk_window_profile_available_check(E_Client *ec, const char *profile); E_API void e_client_desk_window_profile_wait_desk_set(E_Client *ec, E_Desk *desk); E_API void e_client_layout_cb_set(E_Client_Layout_Cb cb); +E_API void e_client_visibility_calculate(void); + +E_API void e_client_transform_update(E_Client *ec); +E_API void e_client_transform_apply(E_Client *ec, double degree, double zoom, int cx, int cy); +E_API void e_client_transform_clear(E_Client *ec); YOLO E_API void e_client_focus_stack_set(Eina_List *l); ->>>>>>> upstream #include "e_client.x" #endif diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 03e2eba..887354f 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -38,16 +38,10 @@ static double ecore_frametime = 0; static int _e_comp_log_dom = -1; -<<<<<<< HEAD -EAPI int E_EVENT_COMPOSITOR_RESIZE = -1; -EAPI int E_EVENT_COMPOSITOR_DISABLE = -1; -EAPI int E_EVENT_COMPOSITOR_ENABLE = -1; -EAPI int E_EVENT_COMPOSITOR_FPS_UPDATE = -1; -======= E_API int E_EVENT_COMPOSITOR_RESIZE = -1; E_API int E_EVENT_COMPOSITOR_DISABLE = -1; E_API int E_EVENT_COMPOSITOR_ENABLE = -1; ->>>>>>> upstream +E_API int E_EVENT_COMPOSITOR_FPS_UPDATE = -1; ////////////////////////////////////////////////////////////////////////// #undef DBG @@ -404,12 +398,7 @@ _e_comp_cb_update(void) { /* clear update flag */ e_comp_object_render_update_del(ec->frame); -<<<<<<< HEAD - if (_e_comp_client_update(ec)) - e_comp_post_update_add(ec); -======= _e_comp_client_update(ec); ->>>>>>> upstream } _e_comp_fps_update(); if (conf->fps_show) @@ -473,13 +462,13 @@ _e_comp_cb_update(void) } else { - if (c->calc_fps) + if (e_comp->calc_fps) { double fps = 0.0, dt; double t = ecore_time_get(); int i, avg_range = 60; - dt = t - c->frametimes[avg_range - 1]; + dt = t - e_comp->frametimes[avg_range - 1]; if (dt > 0.0) fps = (double)avg_range / dt; else fps = 0.0; @@ -488,15 +477,15 @@ _e_comp_cb_update(void) if (fps < 0.0) fps = 0.0; for (i = avg_range; i >= 1; i--) - c->frametimes[i] = c->frametimes[i - 1]; + e_comp->frametimes[i] = e_comp->frametimes[i - 1]; - c->frametimes[0] = t; - c->frameskip++; - if (c->frameskip >= avg_range) + e_comp->frametimes[0] = t; + e_comp->frameskip++; + if (e_comp->frameskip >= avg_range) { - c->frameskip = 0; - c->fps = fps; - ecore_event_add(E_EVENT_COMPOSITOR_FPS_UPDATE, NULL, NULL, NULL); + e_comp->frameskip = 0; + e_comp->fps = fps; + ecore_event_add(E_EVENT_COMPOSITOR_FPS_UPDATE, NULL, NULL, NULL); } } } @@ -769,19 +758,14 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED) INF("---------------------"); #endif -<<<<<<< HEAD - E_FREE_LIST(c->debug_rects, evas_object_del); - tb = eina_tiler_new(c->man->w, c->man->h); - EINA_SAFETY_ON_NULL_GOTO(tb, tb_fail); - -======= if (e_comp->comp_type == E_PIXMAP_TYPE_X) win = e_comp->win; else win = e_comp->cm_selection; E_FREE_LIST(e_comp->debug_rects, evas_object_del); tb = eina_tiler_new(e_comp->w, e_comp->h); ->>>>>>> upstream + EINA_SAFETY_ON_NULL_GOTO(tb, tb_fail); + eina_tiler_tile_size_set(tb, 1, 1); /* background */ eina_tiler_rect_add(tb, &(Eina_Rectangle){0, 0, e_comp->w, e_comp->h}); @@ -1179,33 +1163,25 @@ e_comp_init(void) e_util_env_set("HYBRIS_EGLPLATFORM", "wayland"); for (test = eng; *test; test++) { -<<<<<<< HEAD - if (!e_module_enable(e_module_new(*test))) - return EINA_FALSE; -======= if (e_module_enable(e_module_new(*test))) { e_comp->comp_type = E_PIXMAP_TYPE_WL; goto out; } ->>>>>>> upstream } - goto out; + return EINA_FALSE; } //#ifdef HAVE_WAYLAND_CLIENTS //e_comp_wl_init(); //#endif if (e_comp->comp_type == E_PIXMAP_TYPE_NONE) return EINA_FALSE; out: -<<<<<<< HEAD -#ifndef ENABLE_QUICK_INIT -======= if (e_comp->comp_type == E_PIXMAP_TYPE_WL) { e_comp_canvas_fake_layers_init(); e_screensaver_update(); } ->>>>>>> upstream +#ifndef ENABLE_QUICK_INIT e_comp->elm = elm_win_fake_add(e_comp->ee); elm_win_fullscreen_set(e_comp->elm, 1); evas_object_show(e_comp->elm); @@ -1432,32 +1408,21 @@ e_comp_shutdown(void) E_Pixmap_Type type = e_comp->comp_type; #endif E_FREE_FUNC(action_timeout, ecore_timer_del); -<<<<<<< HEAD - while (e_comp->clients) - e_object_del(eina_list_data_get(e_comp->clients)); -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - e_comp_wl_shutdown(); -#endif -======= EINA_LIST_FOREACH_SAFE(e_comp->clients, l, ll, ec) { DELD(ec, 99999); e_object_del(E_OBJECT(ec)); } ->>>>>>> upstream + +#ifdef HAVE_WAYLAND + e_comp_wl_shutdown(); +#endif + e_object_del(E_OBJECT(e_comp)); E_FREE_LIST(handlers, ecore_event_handler_del); E_FREE_LIST(actions, e_object_del); E_FREE_LIST(hooks, e_client_hook_del); -<<<<<<< HEAD -======= -#ifdef HAVE_WAYLAND - if (type == E_PIXMAP_TYPE_WL) - e_comp_wl_shutdown(); -#endif - ->>>>>>> upstream gl_avail = EINA_FALSE; e_comp_cfdata_config_free(conf); E_CONFIG_DD_FREE(conf_match_edd); @@ -1471,8 +1436,7 @@ e_comp_shutdown(void) return 1; } -<<<<<<< HEAD -EAPI void +E_API void e_comp_deferred_job(void) { /* Add elm fake win */ @@ -1480,10 +1444,10 @@ e_comp_deferred_job(void) evas_object_show(e_comp->elm); /* Bg update */ - if (e_zone_current_get(e_comp)->bg_object) - e_bg_zone_update(e_zone_current_get(e_comp), E_BG_TRANSITION_DESK); + if (e_zone_current_get()->bg_object) + e_bg_zone_update(e_zone_current_get(), E_BG_TRANSITION_DESK); else - e_bg_zone_update(e_zone_current_get(e_comp), E_BG_TRANSITION_START); + e_bg_zone_update(e_zone_current_get(), E_BG_TRANSITION_START); /* Pointer setting */ if (!e_comp->pointer) @@ -1497,12 +1461,8 @@ e_comp_deferred_job(void) #endif } -EAPI void -e_comp_render_queue(E_Comp *c) -======= E_API void e_comp_render_queue(void) ->>>>>>> upstream { if (conf->lock_fps) { @@ -1726,8 +1686,7 @@ e_comp_e_object_layer_get(const E_Object *obj) return 0; } -<<<<<<< HEAD -EAPI void +E_API void e_comp_layer_name_get(unsigned int layer, char *buff, int buff_size) { if (!buff) return; @@ -1762,12 +1721,8 @@ e_comp_layer_name_get(unsigned int layer, char *buff, int buff_size) } } -EAPI Eina_Bool -e_comp_grab_input(E_Comp *c, Eina_Bool mouse, Eina_Bool kbd) -======= E_API Eina_Bool e_comp_grab_input(Eina_Bool mouse, Eina_Bool kbd) ->>>>>>> upstream { Eina_Bool ret = EINA_FALSE; Ecore_Window mwin = 0, kwin = 0; @@ -1872,14 +1827,8 @@ e_comp_util_object_is_above_nocomp(Evas_Object *obj) EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE); if (!evas_object_visible_get(obj)) return EINA_FALSE; -<<<<<<< HEAD - comp = e_comp_util_evas_object_comp_get(obj); - if ((!comp) || (!comp->nocomp_ec)) return EINA_FALSE; - cl = evas_object_layer_get(comp->nocomp_ec->frame); -======= if (!e_comp->nocomp_ec) return EINA_FALSE; cl = evas_object_layer_get(e_comp->nocomp_ec->frame); ->>>>>>> upstream ol = evas_object_layer_get(obj); if (cl > ol) return EINA_FALSE; o = evas_object_above_get(e_comp->nocomp_ec->frame); diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 0309a7b..055861c 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -57,13 +57,9 @@ typedef enum _E_Layer # include "e_comp_cfdata.h" -<<<<<<< HEAD -extern EAPI int E_EVENT_COMPOSITOR_DISABLE; -extern EAPI int E_EVENT_COMPOSITOR_ENABLE; -extern EAPI int E_EVENT_COMPOSITOR_FPS_UPDATE; -======= extern E_API int E_EVENT_COMPOSITOR_DISABLE; extern E_API int E_EVENT_COMPOSITOR_ENABLE; +extern E_API int E_EVENT_COMPOSITOR_FPS_UPDATE; typedef void (*E_Comp_Cb)(void); @@ -82,7 +78,6 @@ typedef struct E_Comp_Screen_Iface /* set dpms (on, standby, suspend, off) */ void (*dpms)(int); } E_Comp_Screen_Iface; ->>>>>>> upstream struct _E_Comp { @@ -207,39 +202,7 @@ EINTERN Eina_Bool e_comp_init(void); E_API E_Comp *e_comp_new(void); E_API int e_comp_internal_save(void); EINTERN int e_comp_shutdown(void); -<<<<<<< HEAD -EAPI void e_comp_deferred_job(void); -EAPI void e_comp_render_queue(E_Comp *c); -EAPI void e_comp_shape_queue(E_Comp *c); -EAPI void e_comp_shape_queue_block(E_Comp *c, Eina_Bool block); -EAPI E_Comp_Config *e_comp_config_get(void); -EAPI const Eina_List *e_comp_list(void); -EAPI void e_comp_shadows_reset(void); -EINA_DEPRECATED EAPI E_Comp *e_comp_get(const void *o); -EAPI Ecore_Window e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y); -EAPI void e_comp_util_wins_print(const E_Comp *c); -EAPI void e_comp_ignore_win_add(E_Pixmap_Type type, Ecore_Window win); -EAPI void e_comp_ignore_win_del(E_Pixmap_Type type, Ecore_Window win); -EAPI Eina_Bool e_comp_ignore_win_find(Ecore_Window win); -EAPI void e_comp_override_del(E_Comp *c); -EAPI void e_comp_override_add(E_Comp *c); -EAPI void e_comp_block_window_add(void); -EAPI void e_comp_block_window_del(void); -EAPI E_Comp *e_comp_find_by_window(Ecore_Window win); -EAPI void e_comp_override_timed_pop(E_Comp *c); -EAPI unsigned int e_comp_e_object_layer_get(const E_Object *obj); -EAPI void e_comp_layer_name_get(unsigned int layer, char *buff, int buff_size); -EAPI Eina_Bool e_comp_grab_input(E_Comp *c, Eina_Bool mouse, Eina_Bool kbd); -EAPI void e_comp_ungrab_input(E_Comp *c, Eina_Bool mouse, Eina_Bool kbd); -EAPI void e_comp_gl_set(Eina_Bool set); -EAPI Eina_Bool e_comp_gl_get(void); -EAPI E_Comp *e_comp_evas_find(const Evas *e); - -EAPI void e_comp_button_bindings_grab_all(void); -EAPI void e_comp_button_bindings_ungrab_all(void); -EAPI void e_comp_client_redirect_toggle(E_Client *ec); -EAPI Eina_Bool e_comp_util_object_is_above_nocomp(Evas_Object *obj); -======= +E_API void e_comp_deferred_job(void); E_API void e_comp_render_queue(void); E_API void e_comp_shape_queue(void); E_API void e_comp_shape_queue_block(Eina_Bool block); @@ -258,6 +221,7 @@ E_API void e_comp_block_window_del(void); E_API E_Comp *e_comp_find_by_window(Ecore_Window win); E_API void e_comp_override_timed_pop(void); E_API unsigned int e_comp_e_object_layer_get(const E_Object *obj); +E_API void e_comp_layer_name_get(unsigned int layer, char *buff, int buff_size); E_API Eina_Bool e_comp_grab_input(Eina_Bool mouse, Eina_Bool kbd); E_API void e_comp_ungrab_input(Eina_Bool mouse, Eina_Bool kbd); E_API void e_comp_gl_set(Eina_Bool set); @@ -267,7 +231,6 @@ E_API void e_comp_button_bindings_grab_all(void); E_API void e_comp_button_bindings_ungrab_all(void); E_API void e_comp_client_redirect_toggle(E_Client *ec); E_API Eina_Bool e_comp_util_object_is_above_nocomp(Evas_Object *obj); ->>>>>>> upstream EINTERN Evas_Object *e_comp_style_selector_create(Evas *evas, const char **source); E_API E_Config_Dialog *e_int_config_comp(Evas_Object *parent, const char *params); @@ -301,7 +264,7 @@ e_comp_util_has_xwayland(void) return (e_comp->comp_type != E_PIXMAP_TYPE_X) && e_comp_util_has_x(); } -EAPI void e_comp_post_update_add(E_Client *ec); -EAPI void e_comp_post_update_purge(E_Client *ec); +E_API void e_comp_post_update_add(E_Client *ec); +E_API void e_comp_post_update_purge(E_Client *ec); #endif #endif diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index be3619c..0186b2f 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -551,18 +551,8 @@ e_comp_canvas_update(void) if (!changed) return; if (!starting) { -<<<<<<< HEAD - ev = calloc(1, sizeof(E_Event_Compositor_Resize)); - if (ev) - { - ev->comp = e_comp; - e_object_ref(E_OBJECT(e_comp)); - ecore_event_add(E_EVENT_COMPOSITOR_RESIZE, ev, _e_comp_canvas_event_compositor_resize_free, NULL); - } -======= e_object_ref(E_OBJECT(e_comp)); ecore_event_add(E_EVENT_COMPOSITOR_RESIZE, NULL, _e_comp_canvas_event_compositor_resize_free, NULL); ->>>>>>> upstream } EINA_LIST_FOREACH(e_comp->zones, l, zone) @@ -747,7 +737,7 @@ e_comp_canvas_client_layer_map_nearest(int layer) return E_LAYER_CLIENT_ALERT; } -EAPI void +E_API void e_comp_post_update_add(E_Client *ec) { E_Client *ec2; @@ -761,7 +751,7 @@ e_comp_post_update_add(E_Client *ec) e_object_ref(E_OBJECT(ec)); } -EAPI void +E_API void e_comp_post_update_purge(E_Client *ec) { Eina_List *l, *ll; diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 0c5a0d0..fa4f820 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -991,7 +991,6 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) E_Comp_Object *cw = data; int ix, iy, fx, fy; -<<<<<<< HEAD if (!e_util_strcmp("wl_pointer-cursor", cw->ec->icccm.window_role)) { cw->ec->client.x = x, cw->ec->client.y = y; @@ -1000,8 +999,6 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) return; } - if ((cw->x == x) && (cw->y == y)) -======= /* if frame_object does not exist, client_inset indicates CSD. * this means that ec->client matches cw->x/y, the opposite * of SSD. @@ -1009,7 +1006,6 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) fx = (!cw->frame_object) * cw->client_inset.l; fy = (!cw->frame_object) * cw->client_inset.t; if ((cw->x == x + fx) && (cw->y == y + fy)) ->>>>>>> upstream { if ((cw->ec->x != x) || (cw->ec->y != y)) { @@ -1081,7 +1077,6 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) E_Comp_Object *cw = data; int pw = 0, ph = 0, fw, fh, iw, ih, prev_w, prev_h, x, y; -<<<<<<< HEAD if ((!e_util_strcmp("wl_pointer-cursor", cw->ec->icccm.window_role)) || (!e_util_strcmp("input_panel_surface", cw->ec->icccm.window_role))) { @@ -1090,8 +1085,6 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) return; } - if ((cw->w == w) && (cw->h == h)) -======= /* if frame_object does not exist, client_inset indicates CSD. * this means that ec->client matches cw->w/h, the opposite * of SSD. @@ -1099,7 +1092,6 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) fw = (!cw->frame_object) * (-cw->client_inset.l - cw->client_inset.r); fh = (!cw->frame_object) * (-cw->client_inset.t - cw->client_inset.b); if ((cw->w == w + fw) && (cw->h == h + fh)) ->>>>>>> upstream { if (cw->ec->shading || cw->ec->shaded) return; if (((cw->ec->w != w) || (cw->ec->h != h)) || @@ -1183,18 +1175,13 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) if ((!cw->ec->input_only) && cw->redirected && (e_pixmap_dirty_get(cw->ec->pixmap) || (!e_pixmap_size_get(cw->ec->pixmap, &pw, &ph)))) { -<<<<<<< HEAD -#ifndef HAVE_WAYLAND_ONLY -======= if (e_comp->comp_type != E_PIXMAP_TYPE_X) return; ->>>>>>> upstream /* client can't be resized if its pixmap isn't usable, try again */ e_pixmap_dirty(cw->ec->pixmap); e_comp_object_render_update_add(obj); e_comp_render_queue(); cw->ec->changes.size = 1; EC_CHANGED(cw->ec); -#endif return; } prev_w = cw->w, prev_h = cw->h; @@ -1418,11 +1405,7 @@ _e_comp_intercept_stack_helper(E_Comp_Object *cw, Evas_Object *stack, E_Comp_Obj /* reached the top client layer somehow * use top client object */ -<<<<<<< HEAD - o = cw->comp->layers[e_comp_canvas_layer_map(E_LAYER_CLIENT_ALERT)].obj; -======= - o = e_comp->layers[e_comp_canvas_layer_map(E_LAYER_CLIENT_PRIO)].obj; ->>>>>>> upstream + o = e_comp->layers[e_comp_canvas_layer_map(E_LAYER_CLIENT_ALERT)].obj; } if (!o) /* top client layer window hasn't been stacked yet. this probably shouldn't happen? @@ -2347,12 +2330,8 @@ _e_comp_smart_show(Evas_Object *obj) evas_object_show(cw->effect_obj); if (cw->ec->internal_elm_win && (!evas_object_visible_get(cw->ec->internal_elm_win))) evas_object_show(cw->ec->internal_elm_win); -<<<<<<< HEAD if (cw->mask_obj) evas_object_show(cw->mask_obj); - e_comp_render_queue(cw->comp); -======= e_comp_render_queue(); ->>>>>>> upstream if (cw->ec->input_only) { e_comp_shape_queue(); @@ -2383,16 +2362,7 @@ _e_comp_smart_del(Evas_Object *obj) INTERNAL_ENTRY; -<<<<<<< HEAD - if (cw->animating) - { - cw->comp->animating--; - e_object_unref(E_OBJECT(cw->ec)); - } - cw->animating = 0; -======= e_comp_object_render_update_del(cw->smart_obj); ->>>>>>> upstream E_FREE_FUNC(cw->updates, eina_tiler_free); E_FREE_FUNC(cw->pending_updates, eina_tiler_free); free(cw->ns); @@ -2420,12 +2390,8 @@ _e_comp_smart_del(Evas_Object *obj) evas_object_del(cw->zoomobj); evas_object_del(cw->input_obj); evas_object_del(cw->obj); -<<<<<<< HEAD evas_object_del(cw->mask_obj); - e_comp_shape_queue(cw->comp); -======= e_comp_shape_queue(); ->>>>>>> upstream eina_stringshare_del(cw->frame_theme); eina_stringshare_del(cw->frame_name); if (cw->animating) @@ -2492,16 +2458,12 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h) evas_object_resize(cw->effect_obj, w, h); if (cw->zoomobj) e_zoomap_child_resize(cw->zoomobj, pw, ph); if (cw->input_obj) -<<<<<<< HEAD - evas_object_geometry_set(cw->input_obj, cw->x + cw->input_rect.x, cw->y + cw->input_rect.y, cw->input_rect.w, cw->input_rect.h); - if (cw->mask_obj) - evas_object_resize(cw->mask_obj, w, h); -======= evas_object_geometry_set(cw->input_obj, cw->x + cw->input_rect.x + (!!cw->frame_object * cw->client_inset.l), cw->y + cw->input_rect.y + (!!cw->frame_object * cw->client_inset.t), cw->input_rect.w, cw->input_rect.h); ->>>>>>> upstream + if (cw->mask_obj) + evas_object_resize(cw->mask_obj, w, h); /* resize render update tiler */ if (!first) { @@ -2709,9 +2671,8 @@ _e_comp_object_util_moveresize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj e_comp_shape_queue(); } -<<<<<<< HEAD #ifdef _F_E_COMP_OBJECT_INTERCEPT_HOOK_ -EAPI E_Comp_Object_Intercept_Hook * +E_API E_Comp_Object_Intercept_Hook * e_comp_object_intercept_hook_add(E_Comp_Object_Intercept_Hook_Point hookpoint, E_Comp_Object_Intercept_Hook_Cb func, const void *data) { E_Comp_Object_Intercept_Hook *ch; @@ -2726,7 +2687,7 @@ e_comp_object_intercept_hook_add(E_Comp_Object_Intercept_Hook_Point hookpoint, E return ch; } -EAPI void +E_API void e_comp_object_intercept_hook_del(E_Comp_Object_Intercept_Hook *ch) { ch->delete_me = 1; @@ -2740,10 +2701,7 @@ e_comp_object_intercept_hook_del(E_Comp_Object_Intercept_Hook *ch) } #endif -EAPI Evas_Object * -======= E_API Evas_Object * ->>>>>>> upstream e_comp_object_util_add(Evas_Object *obj, E_Comp_Object_Type type) { Evas_Object *o, *z = NULL; @@ -3714,8 +3672,7 @@ e_comp_object_native_surface_set(Evas_Object *obj, Eina_Bool set) ((e_comp->comp_type != E_PIXMAP_TYPE_X) || e_comp_config_get()->texture_from_pixmap) && (!cw->ec->shaped)); if (set) -<<<<<<< HEAD - set = e_pixmap_native_surface_init(cw->ec->pixmap, &ns); + set = (!!cw->ns) || e_pixmap_native_surface_init(cw->ec->pixmap, &ns); /* to show underlay plane on x11, compositor should fill * alpha value of COW with given 24bit window's alpha. @@ -3727,9 +3684,6 @@ e_comp_object_native_surface_set(Evas_Object *obj, Eina_Bool set) if ((type == E_PIXMAP_TYPE_X) && (!cw->ec->argb)) evas_object_render_op_set(cw->obj, EVAS_RENDER_COPY); } -======= - set = (!!cw->ns) || e_pixmap_native_surface_init(cw->ec->pixmap, &ns); ->>>>>>> upstream } cw->native = set; @@ -4062,49 +4016,42 @@ e_comp_object_effect_set(Evas_Object *obj, const char *effect) if (!effect) effect = "none"; snprintf(buf, sizeof(buf), "e/comp/effects/%s", effect); -<<<<<<< HEAD config = e_comp_config_get(); if ((config) && (config->effect_file)) { if (edje_object_file_set(cw->effect_obj, config->effect_file, buf)) - loaded = EINA_TRUE; + { + cw->effect_set = EINA_TRUE; + loaded = EINA_TRUE; + } } if (!loaded) -======= - edje_object_file_get(cw->effect_obj, NULL, &grp); - cw->effect_set = !eina_streq(effect, "none"); - if (!e_util_strcmp(buf, grp)) return cw->effect_set; - if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", buf)) ->>>>>>> upstream { edje_object_file_get(cw->effect_obj, NULL, &grp); - if (!e_util_strcmp(buf, grp)) return; + cw->effect_set = !eina_streq(effect, "none"); + if (!e_util_strcmp(buf, grp)) return cw->effect_set; if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", buf)) -<<<<<<< HEAD { snprintf(buf, sizeof(buf), "e/comp/effects/auto/%s", effect); if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", buf)) - if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none")) return; - } -======= - if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none")) - { - if (cw->effect_running) + if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none")) { - if (!e_comp_object_effect_stop(obj, evas_object_data_get(cw->effect_obj, "_e_comp.end_cb"))) - return EINA_FALSE; + if (cw->effect_running) + { + if (!e_comp_object_effect_stop(obj, evas_object_data_get(cw->effect_obj, "_e_comp.end_cb"))) + return EINA_FALSE; + } + cw->effect_set = EINA_FALSE; + return cw->effect_set; } - cw->effect_set = EINA_FALSE; - return cw->effect_set; - } + } } if (cw->effect_running) { if (!e_comp_object_effect_stop(obj, evas_object_data_get(cw->effect_obj, "_e_comp.end_cb"))) return EINA_FALSE; ->>>>>>> upstream } edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj); if (cw->effect_clip) @@ -4144,14 +4091,9 @@ _e_comp_object_effect_end_cb(void *data, Evas_Object *obj, const char *emission, E_Comp_Object *cw = data; edje_object_signal_callback_del_full(obj, "e,action,done", "e", _e_comp_object_effect_end_cb, NULL); -<<<<<<< HEAD - if (cw->animating) - { - cw->comp->animating--; - cw->animating--; - if (e_object_unref(E_OBJECT(cw->ec))) - e_comp_shape_queue(cw->comp); - } + cw->effect_running = 0; + if (!_e_comp_object_animating_end(cw)) return; + e_comp_shape_queue(); if (evas_object_data_get(cw->smart_obj, "effect_running")) { @@ -4159,11 +4101,6 @@ _e_comp_object_effect_end_cb(void *data, Evas_Object *obj, const char *emission, e_client_visibility_calculate(); } -======= - cw->effect_running = 0; - if (!_e_comp_object_animating_end(cw)) return; - e_comp_shape_queue(); ->>>>>>> upstream end_cb = evas_object_data_get(obj, "_e_comp.end_cb"); if (!end_cb) return; end_data = evas_object_data_get(obj, "_e_comp.end_data"); @@ -4227,23 +4164,15 @@ e_comp_object_effect_stop(Evas_Object *obj, Edje_Signal_Cb end_cb) } edje_object_signal_emit(cw->effect_obj, "e,action,stop", "e"); edje_object_signal_callback_del_full(cw->effect_obj, "e,action,done", "e", _e_comp_object_effect_end_cb, cw); -<<<<<<< HEAD - if (cw->animating) - { - cw->animating--; - cw->comp->animating--; - e_object_unref(E_OBJECT(cw->ec)); - } if (evas_object_data_get(cw->smart_obj, "effect_running")) { evas_object_data_del(cw->smart_obj, "effect_running"); e_client_visibility_calculate(); } -======= + cw->effect_running = 0; return _e_comp_object_animating_end(cw); ->>>>>>> upstream } static int @@ -4390,7 +4319,7 @@ e_comp_object_util_autoclose(Evas_Object *obj, E_Comp_Object_Autoclose_Cb del_cb evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, e_comp); } -EAPI unsigned int +E_API unsigned int e_comp_object_is_animating(Evas_Object *obj) { SOFT_ENTRY(0); @@ -4398,7 +4327,7 @@ e_comp_object_is_animating(Evas_Object *obj) return cw->animating; } -EAPI void +E_API void e_comp_object_alpha_set(Evas_Object *obj, Eina_Bool alpha) { SOFT_ENTRY(); @@ -4411,7 +4340,7 @@ e_comp_object_alpha_set(Evas_Object *obj, Eina_Bool alpha) evas_object_image_data_set(cw->obj, NULL); } -EAPI void +E_API void e_comp_object_mask_set(Evas_Object *obj, Eina_Bool set) { Eina_Bool mask_set = EINA_FALSE; @@ -4426,7 +4355,7 @@ e_comp_object_mask_set(Evas_Object *obj, Eina_Bool set) { if (!cw->mask_obj) { - o = evas_object_rectangle_add(cw->comp->evas); + o = evas_object_rectangle_add(e_comp->evas); evas_object_color_set(o, 0, 0, 0, 0); evas_object_clip_set(cw->input_obj, o); evas_object_smart_member_add(o, obj); @@ -4450,7 +4379,7 @@ e_comp_object_mask_set(Evas_Object *obj, Eina_Bool set) } } -EAPI void +E_API void e_comp_object_size_update(Evas_Object *obj, int w, int h) { API_ENTRY; diff --git a/src/bin/e_comp_object.h b/src/bin/e_comp_object.h index 81b5d65..e45310b 100644 --- a/src/bin/e_comp_object.h +++ b/src/bin/e_comp_object.h @@ -110,13 +110,13 @@ E_API E_Comp_Object_Mover *e_comp_object_effect_mover_add(int pri, const char *s E_API void e_comp_object_effect_mover_del(E_Comp_Object_Mover *prov); #ifdef _F_E_COMP_OBJECT_INTERCEPT_HOOK_ -EAPI E_Comp_Object_Intercept_Hook *e_comp_object_intercept_hook_add(E_Comp_Object_Intercept_Hook_Point hookpoint, E_Comp_Object_Intercept_Hook_Cb func, const void *data); -EAPI void e_comp_object_intercept_hook_del(E_Comp_Object_Intercept_Hook *ch); +E_API E_Comp_Object_Intercept_Hook *e_comp_object_intercept_hook_add(E_Comp_Object_Intercept_Hook_Point hookpoint, E_Comp_Object_Intercept_Hook_Cb func, const void *data); +E_API void e_comp_object_intercept_hook_del(E_Comp_Object_Intercept_Hook *ch); #endif -EAPI unsigned int e_comp_object_is_animating(Evas_Object *obj); -EAPI void e_comp_object_alpha_set(Evas_Object *obj, Eina_Bool alpha); -EAPI void e_comp_object_mask_set(Evas_Object *obj, Eina_Bool set); -EAPI void e_comp_object_size_update(Evas_Object *obj, int w, int h); +E_API unsigned int e_comp_object_is_animating(Evas_Object *obj); +E_API void e_comp_object_alpha_set(Evas_Object *obj, Eina_Bool alpha); +E_API void e_comp_object_mask_set(Evas_Object *obj, Eina_Bool set); +E_API void e_comp_object_size_update(Evas_Object *obj, int w, int h); #endif #endif diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 7c62a75..3a1cf0c 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -49,7 +49,6 @@ static double _last_event_time = 0.0; /* local functions */ static void -<<<<<<< HEAD _e_comp_wl_transform_stay_within_canvas(E_Client *ec, int x, int y, int *new_x, int *new_y) { int new_x_max, new_y_max; @@ -283,7 +282,9 @@ _e_comp_wl_transform_set(E_Client *ec, elm_transit_go(trans); return EINA_TRUE; -======= +} + +static void _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges) { int w, h; @@ -295,7 +296,6 @@ _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges) ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, edges * e_comp_wl->resize.edges, w, h); ->>>>>>> upstream } static void @@ -554,11 +554,7 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN Eina_List *l; if (!(ec = data)) return; -<<<<<<< HEAD - if (e_object_is_del(E_OBJECT(ec))) return; -======= if (e_object_is_del(data)) return; ->>>>>>> upstream if (!ec->override) e_hints_window_visible_set(ec); @@ -603,7 +599,6 @@ _e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) evas_object_hide(tmp->frame); -<<<<<<< HEAD if (ec->comp_data->sub.below_obj) evas_object_hide(ec->comp_data->sub.below_obj); @@ -665,8 +660,6 @@ _e_comp_wl_evas_cb_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN if (parent->comp_data->sub.restacking) return; _e_comp_wl_subsurface_restack(parent); -======= ->>>>>>> upstream } static void @@ -686,27 +679,21 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj if (!ec->comp_data->surface) return; if (ec->comp_data->transform.start) return; - if (e_comp->wl_comp_data->dnd.enabled) - { - e_comp_wl_data_dnd_focus(ec); - return; - } - if (e_config->use_cursor_timer) { - if (ec->comp->wl_comp_data->ptr.hidden == EINA_TRUE) + if (e_comp_wl->ptr.hidden == EINA_TRUE) { Evas_Object *o = NULL; - ecore_evas_cursor_get(ec->comp->pointer->ee, &o, NULL, NULL, NULL); + ecore_evas_cursor_get(e_comp->pointer->ee, &o, NULL, NULL, NULL); if (o) - ec->comp->wl_comp_data->ptr.ec = e_comp_object_client_get(o); + e_comp_wl->ptr.ec = e_comp_object_client_get(o); return; } else { - E_FREE_FUNC(ec->comp->wl_comp_data->ptr.hide_tmr, ecore_timer_del); - ec->comp->wl_comp_data->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec); + E_FREE_FUNC(e_comp_wl->ptr.hide_tmr, ecore_timer_del); + e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec); } } @@ -766,22 +753,14 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data->surface) return; -<<<<<<< HEAD if (ec->comp_data->transform.start) return; - if (e_comp->wl_comp_data->dnd.enabled) - { - if (e_comp->wl_comp_data->dnd.focus == ec->comp_data->surface) - e_comp_wl_data_dnd_focus(NULL); - } -======= if (e_comp_wl->drag) { e_comp_wl_data_device_send_leave(ec); return; } if (!eina_list_count(e_comp_wl->ptr.resources)) return; ->>>>>>> upstream wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp_wl->wl.disp); @@ -794,8 +773,7 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob } static void -<<<<<<< HEAD -_e_comp_wl_evas_handle_mouse_move_to_touch(E_Client *ec, uint32_t timestamp, int canvas_x, int canvas_y) +_e_comp_wl_send_touch_move(E_Client *ec, int canvas_x, int canvas_y, uint32_t timestamp) { Eina_List *l; struct wl_client *wc; @@ -828,21 +806,21 @@ _e_comp_wl_cursor_reload(E_Client *ec) if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data) return; - if ((ec_cursor = ec->comp->wl_comp_data->ptr.ec)) + if ((ec_cursor = e_comp_wl->ptr.ec)) { ec_cursor->visible = 1; - ecore_evas_object_cursor_set(ec->comp->pointer->ee, ec_cursor->frame, EVAS_LAYER_MAX, ec_cursor->x, ec_cursor->y); + ecore_evas_object_cursor_set(e_comp->pointer->ee, ec_cursor->frame, EVAS_LAYER_MAX, ec_cursor->x, ec_cursor->y); } - ec->comp->wl_comp_data->ptr.hidden = EINA_FALSE; + e_comp_wl->ptr.hidden = EINA_FALSE; cx = wl_fixed_to_int(e_comp->wl_comp_data->ptr.x) - ec->client.x; cy = wl_fixed_to_int(e_comp->wl_comp_data->ptr.y) - ec->client.y; if (!ec->comp_data->surface) return; wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); - EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) + serial = wl_display_next_serial(e_comp_wl->wl.disp); + EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res) { if (!e_comp_wl_input_pointer_check(res)) continue; if (wl_resource_get_client(res) != wc) continue; @@ -866,27 +844,27 @@ _e_comp_wl_cursor_timer(void *data) if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE; if (!ec->comp_data) return EINA_FALSE; - ecore_evas_cursor_get(ec->comp->pointer->ee, &o, NULL, NULL, NULL); + ecore_evas_cursor_get(e_comp->pointer->ee, &o, NULL, NULL, NULL); if (o) { - ec_cursor = ec->comp->wl_comp_data->ptr.ec = e_comp_object_client_get(o); + ec_cursor = e_comp_wl->ptr.ec = e_comp_object_client_get(o); if (ec_cursor) { ec_cursor->hidden = 1; - ec_cursor->x = ec->comp->pointer->hot.x; - ec_cursor->y = ec->comp->pointer->hot.y; + ec_cursor->x = e_comp->pointer->hot.x; + ec_cursor->y = e_comp->pointer->hot.y; } } - ecore_evas_cursor_unset(ec->comp->pointer->ee); + ecore_evas_cursor_unset(e_comp->pointer->ee); - ec->comp->wl_comp_data->ptr.hidden = EINA_TRUE; - ec->comp->wl_comp_data->ptr.hide_tmr = NULL; + e_comp_wl->ptr.hidden = EINA_TRUE; + e_comp_wl->ptr.hide_tmr = NULL; if (!ec->comp_data->surface) return EINA_FALSE; wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); - EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) + serial = wl_display_next_serial(e_comp_wl->wl.disp); + EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res) { if (!e_comp_wl_input_pointer_check(res)) continue; if (wl_resource_get_client(res) != wc) continue; @@ -897,60 +875,12 @@ _e_comp_wl_cursor_timer(void *data) } static void -_e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) -======= _e_comp_wl_send_mouse_move(E_Client *ec, int x, int y, unsigned int timestamp) ->>>>>>> upstream { struct wl_resource *res; struct wl_client *wc; Eina_List *l; - Evas_Device *dev = NULL; - -<<<<<<< HEAD - ev = event; - - e_comp->wl_comp_data->ptr.x = wl_fixed_from_int(ev->cur.canvas.x); - e_comp->wl_comp_data->ptr.y = wl_fixed_from_int(ev->cur.canvas.y); - - if (!(ec = data)) return; - - if (ec->cur_mouse_action) return; - if (e_object_is_del(E_OBJECT(ec))) return; - if (e_client_util_ignored_get(ec)) return; - if (!ec->comp_data->surface) return; - - if (e_comp->wl_comp_data->dnd.enabled) - { - e_comp_wl_data_dnd_motion(ec, ev->timestamp, - ev->cur.canvas.x - ec->client.x, - ev->cur.canvas.y - ec->client.y); - return; - } - - dev = ev->dev; - if (dev && evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH) - _e_comp_wl_evas_handle_mouse_move_to_touch(ec, ev->timestamp, ev->cur.canvas.x, ev->cur.canvas.y); - else - { - wc = wl_resource_get_client(ec->comp_data->surface); - EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) - { - if (!e_comp_wl_input_pointer_check(res)) continue; - if (wl_resource_get_client(res) != wc) continue; - wl_pointer_send_motion(res, ev->timestamp, - wl_fixed_from_int(ev->cur.canvas.x - ec->client.x), - wl_fixed_from_int(ev->cur.canvas.y - ec->client.y)); - } - } - if (e_config->use_cursor_timer) - { - if (ec->comp->wl_comp_data->ptr.hidden == EINA_TRUE) - _e_comp_wl_cursor_reload(ec); - E_FREE_FUNC(ec->comp->wl_comp_data->ptr.hide_tmr, ecore_timer_del); - ec->comp->wl_comp_data->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec); -======= wc = wl_resource_get_client(ec->comp_data->surface); EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res) { @@ -959,66 +889,47 @@ _e_comp_wl_send_mouse_move(E_Client *ec, int x, int y, unsigned int timestamp) wl_pointer_send_motion(res, timestamp, wl_fixed_from_int(x - ec->client.x), wl_fixed_from_int(y - ec->client.y)); ->>>>>>> upstream } } static void _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) { -<<<<<<< HEAD - Eina_List *l; - struct wl_client *wc; - uint32_t serial, btn; + E_Client *ec; + Evas_Event_Mouse_Move *ev; struct wl_resource *res; + Eina_List *l; + Evas_Device *dev = NULL; - if (ec->cur_mouse_action || ec->border_menu) return EINA_FALSE; - if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE; - if (e_client_util_ignored_get(ec)) return EINA_FALSE; + ev = event; - switch (button_id) - { - case 1: - btn = BTN_LEFT; - break; - case 2: - btn = BTN_MIDDLE; - break; - case 3: - btn = BTN_RIGHT; - break; - default: - btn = button_id; - break; - } + e_comp->wl_comp_data->ptr.x = wl_fixed_from_int(ev->cur.canvas.x); + e_comp->wl_comp_data->ptr.y = wl_fixed_from_int(ev->cur.canvas.y); - ec->comp->wl_comp_data->ptr.button = btn; + if (!(ec = data)) return; - if (!ec->comp_data->surface) return EINA_FALSE; + if (ec->cur_mouse_action) return; + if (e_object_is_del(E_OBJECT(ec))) return; + if (ec->ignored) return; + if (!ec->comp_data->surface) return; - if ((ec->comp_data->transform.cur_degree != 0) && - (btn == BTN_MIDDLE)) + if ((!e_comp_wl->drag_client) || + (!e_client_has_xwindow(e_comp_wl->drag_client))) { - _e_comp_wl_transform_unset(ec); - return EINA_TRUE; + dev = ev->dev; + if (dev && evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH) + _e_comp_wl_send_touch_move(ec, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp); + else + _e_comp_wl_send_mouse_move(ec, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp); } - - if (e_comp->wl_comp_data->dnd.enabled) + if (e_config->use_cursor_timer) { - e_comp_wl_data_dnd_drop(ec, timestamp, btn, state); - return EINA_FALSE; - } - - wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); + if (e_comp_wl->ptr.hidden == EINA_TRUE) + _e_comp_wl_cursor_reload(ec); - EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) - { - if (wl_resource_get_client(res) != wc) continue; - if (!e_comp_wl_input_pointer_check(res)) continue; - wl_pointer_send_button(res, serial, timestamp, btn, state); + E_FREE_FUNC(e_comp_wl->ptr.hide_tmr, ecore_timer_del); + e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec); } - return EINA_TRUE; } static void @@ -1030,14 +941,10 @@ _e_comp_wl_evas_handle_mouse_button_to_touch(E_Client *ec, uint32_t timestamp, i struct wl_resource *res; wl_fixed_t x, y; + if (ec->cur_mouse_action || ec->border_menu || e_comp_wl->drag) return; if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data->surface) return; - - if (e_comp->wl_comp_data->dnd.enabled) - { - e_comp_wl_data_dnd_drop_touch(ec, timestamp, canvas_x, canvas_y, flag); - return; - } + if (ec->ignored) return; wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); @@ -1054,19 +961,6 @@ _e_comp_wl_evas_handle_mouse_button_to_touch(E_Client *ec, uint32_t timestamp, i else wl_touch_send_up(res, serial, timestamp, 0); } -======= - E_Client *ec = data; - Evas_Event_Mouse_Move *ev = event; - - if (ec->cur_mouse_action) return; - if (e_object_is_del(E_OBJECT(ec))) return; - if (ec->ignored) return; - if (!ec->comp_data->surface) return; - - if ((!e_comp_wl->drag_client) || - (!e_client_has_xwindow(e_comp_wl->drag_client))) - _e_comp_wl_send_mouse_move(ec, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp); ->>>>>>> upstream } static void @@ -1079,26 +973,21 @@ _e_comp_wl_evas_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *o if (!ec) return; if (e_object_is_del(E_OBJECT(ec))) return; -<<<<<<< HEAD dev = ev->dev; if (dev && evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH) _e_comp_wl_evas_handle_mouse_button_to_touch(ec, ev->timestamp, ev->canvas.x, ev->canvas.y, EINA_TRUE); else - _e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, - WL_POINTER_BUTTON_STATE_PRESSED); + e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, + WL_POINTER_BUTTON_STATE_PRESSED); if (e_config->use_cursor_timer) { - if (ec->comp->wl_comp_data->ptr.hidden == EINA_TRUE) + if (e_comp_wl->ptr.hidden == EINA_TRUE) _e_comp_wl_cursor_reload(ec); - E_FREE_FUNC(ec->comp->wl_comp_data->ptr.hide_tmr, ecore_timer_del); - ec->comp->wl_comp_data->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec); + E_FREE_FUNC(e_comp_wl->ptr.hide_tmr, ecore_timer_del); + e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec); } -======= - e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, - WL_POINTER_BUTTON_STATE_PRESSED); ->>>>>>> upstream } static void @@ -1111,17 +1000,12 @@ _e_comp_wl_evas_cb_mouse_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj if (!ec) return; if (e_object_is_del(E_OBJECT(ec))) return; -<<<<<<< HEAD dev = ev->dev; if (dev && evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH) _e_comp_wl_evas_handle_mouse_button_to_touch(ec, ev->timestamp, ev->canvas.x, ev->canvas.y, EINA_FALSE); else - _e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, - WL_POINTER_BUTTON_STATE_RELEASED); -======= - e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, - WL_POINTER_BUTTON_STATE_RELEASED); ->>>>>>> upstream + e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, + WL_POINTER_BUTTON_STATE_RELEASED); } static void @@ -1193,37 +1077,22 @@ _e_comp_wl_evas_cb_multi_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *o Evas_Event_Multi_Down *ev = event; wl_fixed_t x, y; -<<<<<<< HEAD if (!ec) return; if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data->surface) return; wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); -======= - if (!ec->comp_data->surface) return; - - wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp_wl->wl.disp); ->>>>>>> upstream x = wl_fixed_from_int(ev->canvas.x - ec->client.x); y = wl_fixed_from_int(ev->canvas.y - ec->client.y); -<<<<<<< HEAD - EINA_LIST_FOREACH(e_comp->wl_comp_data->touch.resources, l, res) - { - if (wl_resource_get_client(res) != wc) continue; - if (!e_comp_wl_input_touch_check(res)) continue; - wl_touch_send_down(res, serial, ev->timestamp, ec->comp_data->surface, ev->device, x, y); -======= EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res) { if (wl_resource_get_client(res) != wc) continue; if (!e_comp_wl_input_touch_check(res)) continue; wl_touch_send_down(res, serial, ev->timestamp, ec->comp_data->surface, ev->device, x, y); ->>>>>>> upstream } } @@ -1237,23 +1106,14 @@ _e_comp_wl_evas_cb_multi_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj E_Client *ec = data; Evas_Event_Multi_Up *ev = event; -<<<<<<< HEAD if (!ec) return; if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data->surface) return; wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); - - EINA_LIST_FOREACH(e_comp->wl_comp_data->touch.resources, l, res) -======= - if (!ec->comp_data->surface) return; - - wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp_wl->wl.disp); EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res) ->>>>>>> upstream { if (wl_resource_get_client(res) != wc) continue; if (!e_comp_wl_input_touch_check(res)) continue; @@ -1271,11 +1131,8 @@ _e_comp_wl_evas_cb_multi_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o Evas_Event_Multi_Move *ev = event; wl_fixed_t x, y; -<<<<<<< HEAD if (!ec) return; if (e_object_is_del(E_OBJECT(ec))) return; -======= ->>>>>>> upstream if (!ec->comp_data->surface) return; wc = wl_resource_get_client(ec->comp_data->surface); @@ -1283,11 +1140,7 @@ _e_comp_wl_evas_cb_multi_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o x = wl_fixed_from_int(ev->cur.canvas.x - ec->client.x); y = wl_fixed_from_int(ev->cur.canvas.y - ec->client.y); -<<<<<<< HEAD - EINA_LIST_FOREACH(e_comp->wl_comp_data->touch.resources, l, res) -======= EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res) ->>>>>>> upstream { if (wl_resource_get_client(res) != wc) continue; if (!e_comp_wl_input_touch_check(res)) continue; @@ -1295,10 +1148,6 @@ _e_comp_wl_evas_cb_multi_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o } } -<<<<<<< HEAD - -======= ->>>>>>> upstream static void _e_comp_wl_client_priority_adjust(int pid, int set, int adj, Eina_Bool use_adj, Eina_Bool adj_child, Eina_Bool do_child) { @@ -1366,59 +1215,22 @@ _e_comp_wl_client_priority_normal(E_Client *ec) static Eina_Bool _e_comp_wl_evas_cb_focus_in_timer(E_Client *ec) { -<<<<<<< HEAD - struct wl_resource *res; -======= ->>>>>>> upstream uint32_t serial, *k; struct wl_resource *res; Eina_List *l; double t; + if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE; + ec->comp_data->on_focus_timer = NULL; -<<<<<<< HEAD - /* send keyboard_enter to all keyboard resources */ - serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); - EINA_LIST_FOREACH(e_comp->wl_comp_data->kbd.focused, l, res) - { - wl_keyboard_send_enter(res, serial, ec->comp_data->surface, - &e_comp->wl_comp_data->kbd.keys); - ec->comp_data->focus_update = 0; - } -======= if (!e_comp_wl->kbd.focused) return EINA_FALSE; serial = wl_display_next_serial(e_comp_wl->wl.disp); t = ecore_time_unix_get(); EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res) - wl_array_for_each(k, &e_comp_wl->kbd.keys) - wl_keyboard_send_key(res, serial, t, - *k, WL_KEYBOARD_KEY_STATE_PRESSED); - return EINA_FALSE; ->>>>>>> upstream -} - -static Eina_Bool -_e_comp_wl_evas_cb_focus_in_timer(E_Client *ec) -{ - E_Comp_Data *cdata; - uint32_t serial, *k; - struct wl_resource *res; - Eina_List *l; - double t; - - if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE; - - ec->comp_data->on_focus_timer = NULL; - cdata = ec->comp->wl_comp_data; - - if (!cdata->kbd.focused) return EINA_FALSE; - serial = wl_display_next_serial(cdata->wl.disp); - t = ecore_time_unix_get(); - EINA_LIST_FOREACH(cdata->kbd.focused, l, res) - wl_array_for_each(k, &cdata->kbd.keys) - wl_keyboard_send_key(res, serial, t, - *k, WL_KEYBOARD_KEY_STATE_PRESSED); + wl_array_for_each(k, &e_comp_wl->kbd.keys) + wl_keyboard_send_key(res, serial, t, + *k, WL_KEYBOARD_KEY_STATE_PRESSED); return EINA_FALSE; } @@ -1426,10 +1238,6 @@ static void _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { E_Client *ec, *focused; -<<<<<<< HEAD - E_Comp_Data *cdata; -======= ->>>>>>> upstream struct wl_resource *res; struct wl_client *wc; Eina_List *l; @@ -1438,8 +1246,6 @@ _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj if (e_object_is_del(E_OBJECT(ec))) return; if (ec->iconic) return; - cdata = ec->comp->wl_comp_data; - /* block spurious focus events */ focused = e_client_focused_get(); if ((focused) && (ec != focused)) return; @@ -1448,26 +1254,15 @@ _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj _e_comp_wl_client_priority_raise(ec); wc = wl_resource_get_client(ec->comp_data->surface); -<<<<<<< HEAD - EINA_LIST_FOREACH(cdata->kbd.resources, l, res) - if (wl_resource_get_client(res) == wc) - cdata->kbd.focused = eina_list_append(cdata->kbd.focused, res); - - _e_comp_wl_client_focus(ec); - - ec->comp_data->on_focus_timer = - ecore_timer_add(((e_config->xkb.delay_held_key_input_to_focus)/1000.0), - (Ecore_Task_Cb)_e_comp_wl_evas_cb_focus_in_timer, ec); -======= EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res) - if (wl_resource_get_client(res) == wc) - e_comp_wl->kbd.focused = eina_list_append(e_comp_wl->kbd.focused, res); + if (wl_resource_get_client(res) == wc) + e_comp_wl->kbd.focused = eina_list_append(e_comp_wl->kbd.focused, res); if (!e_comp_wl->kbd.focused) return; e_comp_wl_input_keyboard_enter_send(ec); e_comp_wl_data_device_keyboard_focus_set(); ec->comp_data->on_focus_timer = - ecore_timer_add(0.8, (Ecore_Task_Cb)_e_comp_wl_evas_cb_focus_in_timer, ec); ->>>>>>> upstream + ecore_timer_add(((e_config->xkb.delay_held_key_input_to_focus)/1000.0), + (Ecore_Task_Cb)_e_comp_wl_evas_cb_focus_in_timer, ec); } static void @@ -1481,14 +1276,7 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob if (!(ec = data)) return; -<<<<<<< HEAD - E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del); - - /* lower client priority */ - _e_comp_wl_client_priority_normal(ec); -======= if (!ec->comp_data) return; ->>>>>>> upstream E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del); @@ -1496,21 +1284,13 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob if (!e_object_is_del(data)) _e_comp_wl_client_priority_normal(ec); + + /* update keyboard modifier state */ + wl_array_for_each(k, &e_comp_wl->kbd.keys) + e_comp_wl_input_keyboard_state_update(*k, EINA_FALSE); + if (!ec->comp_data->surface) return; -<<<<<<< HEAD - /* send key release and keyboard_leave to all focused resources */ - serial = wl_display_next_serial(cdata->wl.disp); - t = ecore_time_unix_get(); - EINA_LIST_FOREACH_SAFE(cdata->kbd.focused, l, ll, res) - { - wl_array_for_each(k, &cdata->kbd.keys) - wl_keyboard_send_key(res, serial, t, - *k, WL_KEYBOARD_KEY_STATE_RELEASED); - wl_keyboard_send_leave(res, serial, ec->comp_data->surface); - cdata->kbd.focused = - eina_list_remove_list(cdata->kbd.focused, l); -======= if (!eina_list_count(e_comp_wl->kbd.resources)) return; /* send keyboard_leave to all keyboard resources */ @@ -1519,12 +1299,11 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res) { wl_array_for_each(k, &e_comp_wl->kbd.keys) - wl_keyboard_send_key(res, serial, t, - *k, WL_KEYBOARD_KEY_STATE_RELEASED); + wl_keyboard_send_key(res, serial, t, + *k, WL_KEYBOARD_KEY_STATE_RELEASED); wl_keyboard_send_leave(res, serial, ec->comp_data->surface); e_comp_wl->kbd.focused = - eina_list_remove_list(e_comp_wl->kbd.focused, l); ->>>>>>> upstream + eina_list_remove_list(e_comp_wl->kbd.focused, l); } } @@ -1537,13 +1316,9 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event if ((ec->shading) || (ec->shaded)) return; if (!ec->comp_data->shell.configure_send) return; -<<<<<<< HEAD /* TODO: calculate x, y with transfrom object */ - if ((e_client_util_resizing_get(ec)) && (!ec->transformed)) -======= - if (e_client_util_resizing_get(ec) && e_comp_wl->resize.edges) ->>>>>>> upstream + if ((e_client_util_resizing_get(ec)) && (!ec->transformed) && (e_comp_wl->resize.edges)) { int x, y; @@ -1584,29 +1359,18 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event default: break; } -<<<<<<< HEAD - -======= x = E_CLAMP(x, 1, x); y = E_CLAMP(y, 1, y); ->>>>>>> upstream ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, e_comp_wl->resize.edges, x, y); } -<<<<<<< HEAD - else - ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, - ec->comp->wl_comp_data->resize.edges, - ec->client.w, ec->client.h); - - if (ec->comp_data->sub.below_obj) - evas_object_resize(ec->comp_data->sub.below_obj, ec->w, ec->h); -======= else if ((!ec->fullscreen) && (!ec->maximized) && (!ec->comp_data->maximize_pre)) _e_comp_wl_configure_send(ec, 1); ->>>>>>> upstream + + if (ec->comp_data->sub.below_obj) + evas_object_resize(ec->comp_data->sub.below_obj, ec->w, ec->h); } static void @@ -1735,94 +1499,36 @@ static void _e_comp_wl_client_evas_init(E_Client *ec) { if (ec->comp_data->evas_init) return; -<<<<<<< HEAD evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_SHOW, _e_comp_wl_evas_cb_show, ec); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_HIDE, _e_comp_wl_evas_cb_hide, ec); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOVE, _e_comp_wl_evas_cb_move, ec); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESTACK, _e_comp_wl_evas_cb_restack, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_IN, _e_comp_wl_evas_cb_mouse_in, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_OUT, _e_comp_wl_evas_cb_mouse_out, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_MOVE, _e_comp_wl_evas_cb_mouse_move, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_DOWN, _e_comp_wl_evas_cb_mouse_down, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_UP, _e_comp_wl_evas_cb_mouse_up, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_WHEEL, _e_comp_wl_evas_cb_mouse_wheel, ec); + + + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_IN, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_mouse_in, ec); + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_OUT, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_mouse_out, ec); + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_MOVE, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_mouse_move, ec); + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_DOWN, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_mouse_down, ec); + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_UP, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_mouse_up, ec); + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_WHEEL, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_mouse_wheel, ec); evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MULTI_DOWN, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_multi_down, ec); evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MULTI_UP, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_multi_up, ec); evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MULTI_MOVE, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_multi_move, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_FOCUS_IN, _e_comp_wl_evas_cb_focus_in, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_FOCUS_OUT, _e_comp_wl_evas_cb_focus_out, ec); + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_FOCUS_IN, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_focus_in, ec); + evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_FOCUS_OUT, EVAS_CALLBACK_PRIORITY_AFTER, _e_comp_wl_evas_cb_focus_out, ec); if (!ec->override) { evas_object_smart_callback_add(ec->frame, "client_resize", _e_comp_wl_evas_cb_resize, ec); evas_object_smart_callback_add(ec->frame, "maximize_done", _e_comp_wl_evas_cb_state_update, ec); evas_object_smart_callback_add(ec->frame, "unmaximize_done", _e_comp_wl_evas_cb_state_update, ec); + evas_object_smart_callback_add(ec->frame, "maximize_pre", _e_comp_wl_evas_cb_maximize_pre, ec); + evas_object_smart_callback_add(ec->frame, "unmaximize_pre", _e_comp_wl_evas_cb_maximize_pre, ec); evas_object_smart_callback_add(ec->frame, "fullscreen", _e_comp_wl_evas_cb_state_update, ec); evas_object_smart_callback_add(ec->frame, "unfullscreen", _e_comp_wl_evas_cb_state_update, ec); -======= - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_SHOW, - _e_comp_wl_evas_cb_show, ec); - evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_HIDE, - _e_comp_wl_evas_cb_hide, ec); - - /* setup input callbacks */ - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_IN, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_mouse_in, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_OUT, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_mouse_out, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_MOVE, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_mouse_move, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_DOWN, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_mouse_down, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_UP, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_mouse_up, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_WHEEL, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_mouse_wheel, ec); - - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MULTI_DOWN, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_multi_down, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MULTI_UP, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_multi_up, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MULTI_MOVE, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_multi_move, ec); - - - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_FOCUS_IN, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_focus_in, ec); - evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_FOCUS_OUT, - EVAS_CALLBACK_PRIORITY_AFTER, - _e_comp_wl_evas_cb_focus_out, ec); - - if (!ec->override) - { - evas_object_smart_callback_add(ec->frame, "client_resize", - _e_comp_wl_evas_cb_resize, ec); - evas_object_smart_callback_add(ec->frame, "maximize_done", - _e_comp_wl_evas_cb_state_update, ec); - evas_object_smart_callback_add(ec->frame, "unmaximize_done", - _e_comp_wl_evas_cb_state_update, ec); - evas_object_smart_callback_add(ec->frame, "maximize_pre", - _e_comp_wl_evas_cb_maximize_pre, ec); - evas_object_smart_callback_add(ec->frame, "unmaximize_pre", - _e_comp_wl_evas_cb_maximize_pre, ec); - evas_object_smart_callback_add(ec->frame, "fullscreen", - _e_comp_wl_evas_cb_state_update, ec); - evas_object_smart_callback_add(ec->frame, "unfullscreen", - _e_comp_wl_evas_cb_state_update, ec); ->>>>>>> upstream } /* setup delete/kill callbacks */ @@ -1904,118 +1610,6 @@ _e_comp_wl_cb_comp_object_add(void *data EINA_UNUSED, int type EINA_UNUSED, E_Ev return ECORE_CALLBACK_RENEW; } -<<<<<<< HEAD -static void -_e_comp_wl_cb_key_down(void *event) -{ - E_Comp_Data *cdata; - E_Client *ec; - Ecore_Event_Key *ev; - uint32_t serial, *end, *k, keycode; - - ev = event; - keycode = (ev->keycode - 8); - if (!(cdata = e_comp->wl_comp_data)) return; - -#ifdef HAVE_WAYLAND_ONLY - #ifndef E_RELEASE_BUILD - if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) && - ((ev->modifiers & ECORE_EVENT_MODIFIER_ALT) || - (ev->modifiers & ECORE_EVENT_MODIFIER_ALTGR)) && - eina_streq(ev->key, "BackSpace")) - exit(0); - #endif -#endif - - end = (uint32_t *)cdata->kbd.keys.data + (cdata->kbd.keys.size / sizeof(*k)); - - for (k = cdata->kbd.keys.data; k < end; k++) - { - /* ignore server-generated key repeats */ - if (*k == keycode) return; - } - - /* update modifier state */ - e_comp_wl_input_keyboard_state_update(cdata, keycode, EINA_TRUE); - - if ((!e_client_action_get()) && (!e_comp->input_key_grabs) && (!e_menu_grab_window_get())) - { - if ((ec = e_client_focused_get())) - { - if (ec->comp_data->surface) - { - struct wl_resource *res; - Eina_List *l; - - serial = wl_display_next_serial(cdata->wl.disp); - EINA_LIST_FOREACH(cdata->kbd.focused, l, res) - wl_keyboard_send_key(res, serial, ev->timestamp, - keycode, WL_KEYBOARD_KEY_STATE_PRESSED); - - /* A key only sent to clients is added to the list */ - cdata->kbd.keys.size = (const char *)end - (const char *)cdata->kbd.keys.data; - k = wl_array_add(&cdata->kbd.keys, sizeof(*k)); - *k = keycode; - } - } - } - - if (cdata->kbd.mod_changed) - { - e_comp_wl_input_keyboard_modifiers_update(cdata); - cdata->kbd.mod_changed = 0; - } -} - -static void -_e_comp_wl_cb_key_up(void *event) -{ - E_Comp_Data *cdata; - Ecore_Event_Key *ev; - uint32_t serial, *end, *k, keycode; - uint32_t delivered_key; - - ev = event; - keycode = (ev->keycode - 8); - delivered_key = 0; - if (!(cdata = e_comp->wl_comp_data)) return; - - end = (uint32_t *)cdata->kbd.keys.data + (cdata->kbd.keys.size / sizeof(*k)); - for (k = cdata->kbd.keys.data; k < end; k++) - { - if (*k == keycode) - { - *k = *--end; - delivered_key = 1; - } - } - - cdata->kbd.keys.size = (const char *)end - (const char *)cdata->kbd.keys.data; - - /* update modifier state */ - e_comp_wl_input_keyboard_state_update(cdata, keycode, EINA_FALSE); - - /* If a key down event have been sent to clients, send a key up event to client for garantee key event sequence pair. (down/up) */ - if (delivered_key || ((!e_client_action_get()) && (!e_comp->input_key_grabs) && (!e_menu_grab_window_get()))) - { - struct wl_resource *res; - Eina_List *l; - - serial = wl_display_next_serial(cdata->wl.disp); - EINA_LIST_FOREACH(cdata->kbd.focused, l, res) - wl_keyboard_send_key(res, serial, ev->timestamp, - keycode, WL_KEYBOARD_KEY_STATE_RELEASED); - } - - if (cdata->kbd.mod_changed) - { - e_comp_wl_input_keyboard_modifiers_update(cdata); - cdata->kbd.mod_changed = 0; - } -} - -======= ->>>>>>> upstream static Eina_Bool _e_comp_wl_cb_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_Move *ev) { @@ -2219,12 +1813,9 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) if (state->new_attach || state->buffer_viewport.changed) { -<<<<<<< HEAD _e_comp_wl_surface_state_size_update(ec, state); _e_comp_wl_map_size_cal_from_viewport(ec); -======= ->>>>>>> upstream if (ec->changes.pos) e_comp_object_frame_xy_unadjust(ec->frame, ec->x, ec->y, &x, &y); else @@ -2232,13 +1823,12 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) if (ec->new_client) placed = ec->placed; -<<<<<<< HEAD if (!ec->lock_client_size) { ec->w = ec->client.w = state->bw; ec->h = ec->client.h = state->bh; } -======= + if (first && e_client_has_xwindow(ec)) /* use client geometry to avoid race condition from x11 configure request */ x = ec->x, y = ec->y; @@ -2250,7 +1840,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) } w = ec->client.w; h = ec->client.h; ->>>>>>> upstream } else w = state->bw, h = state->bh; @@ -2264,11 +1853,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); -<<<<<<< HEAD - ec->comp_data->mapped = EINA_FALSE; -======= ec->comp_data->mapped = 0; ->>>>>>> upstream } } @@ -2286,11 +1871,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) ec->visible = EINA_TRUE; ec->ignored = 0; evas_object_show(ec->frame); -<<<<<<< HEAD - ec->comp_data->mapped = EINA_TRUE; -======= ec->comp_data->mapped = 1; ->>>>>>> upstream } } @@ -2304,9 +1885,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) ec->comp_data->shell.configure(ec->comp_data->shell.surface, x, y, ec->w, ec->h); else -<<<<<<< HEAD - e_client_util_move_resize_without_frame(ec, x, y, ec->w, ec->h); -======= { if (ec->netwm.sync.wait) { @@ -2344,9 +1922,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) e_drag_resize(e_comp_wl->drag, state->bw, state->bh); } else - e_client_util_move_resize_without_frame(ec, x, y, w, h); + e_client_util_move_resize_without_frame(ec, x, y, ec->w, ec->h); } ->>>>>>> upstream if (ec->new_client) ec->placed = placed; @@ -2385,7 +1962,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) /* FIXME: workaround for bad wayland egl driver which doesn't send damage request */ if (!eina_list_count(state->damages)) { - if (ec->comp_data->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE) + if ((ec->comp_data->buffer_ref.buffer) && + (ec->comp_data->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE)) { e_comp_object_damage(ec->frame, 0, 0, @@ -2398,8 +1976,9 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) EINA_LIST_FREE(state->damages, dmg) { /* not creating damage for ec that shows a underlay video */ - if (ec->comp_data->buffer_ref.buffer->type != E_COMP_WL_BUFFER_TYPE_VIDEO || - !e_comp->wl_comp_data->available_hw_accel.underlay) + if (!ec->comp_data->buffer_ref.buffer || + !e_comp->wl_comp_data->available_hw_accel.underlay || + ec->comp_data->buffer_ref.buffer->type != E_COMP_WL_BUFFER_TYPE_VIDEO) e_comp_object_damage(ec->frame, dmg->x, dmg->y, dmg->w, dmg->h); eina_rectangle_free(dmg); @@ -2460,8 +2039,9 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) eina_tiler_clear(state->input); } - if (ec->comp_data->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO && - e_comp->wl_comp_data->available_hw_accel.underlay) + if (((ec->comp_data->buffer_ref.buffer) && + (ec->comp_data->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO)) && + (e_comp->wl_comp_data->available_hw_accel.underlay)) e_pixmap_image_clear(ec->pixmap, 1); return; @@ -2490,7 +2070,7 @@ _e_comp_wl_surface_cb_attach(struct wl_client *client EINA_UNUSED, struct wl_res if (buffer_resource) { - if (!(buffer = e_comp_wl_buffer_get(buffer_resource, resource))) + if (!(buffer = e_comp_wl_buffer_get(buffer_resource))) { ERR("Could not get buffer from resource"); wl_client_post_no_memory(client); @@ -2591,22 +2171,14 @@ _e_comp_wl_surface_cb_opaque_region_set(struct wl_client *client EINA_UNUSED, st } } } -<<<<<<< HEAD else { - if (ec->comp_data->pending.opaque) - { - eina_tiler_clear(ec->comp_data->pending.opaque); - /* eina_tiler_free(ec->comp_data->pending.opaque); */ - } if (!ec->argb) { ec->argb = EINA_TRUE; e_comp_object_alpha_set(ec->frame, EINA_TRUE); } } -======= ->>>>>>> upstream } static void @@ -2664,11 +2236,9 @@ _e_comp_wl_surface_cb_commit(struct wl_client *client EINA_UNUSED, struct wl_res static void _e_comp_wl_surface_cb_buffer_transform_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t transform) { - E_Pixmap *ep; E_Client *ec; - if (!(ep = wl_resource_get_user_data(resource))) return; - if (!(ec = e_pixmap_client_get(ep))) return; + if (!(ec = wl_resource_get_user_data(resource))) return; if (e_object_is_del(E_OBJECT(ec))) return; if (transform < 0 || transform > WL_OUTPUT_TRANSFORM_FLIPPED_270) @@ -2687,15 +2257,13 @@ _e_comp_wl_surface_cb_buffer_transform_set(struct wl_client *client EINA_UNUSED, static void _e_comp_wl_surface_cb_buffer_scale_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t scale) { - E_Pixmap *ep; E_Client *ec; - if (!(ep = wl_resource_get_user_data(resource))) return; - if (!(ec = e_pixmap_client_get(ep))) return; + if (!(ec = wl_resource_get_user_data(resource))) return; if (e_object_is_del(E_OBJECT(ec))) return; if (scale < 1) -{ + { wl_resource_post_error(resource, WL_SURFACE_ERROR_INVALID_SCALE, "buffer scale must be at least one " @@ -2734,24 +2302,11 @@ _e_comp_wl_surface_destroy(struct wl_resource *resource) { E_Client *ec; -<<<<<<< HEAD - if (!(ep = wl_resource_get_user_data(resource))) return; - - /* try to get the e_client from this pixmap */ - if (!(ec = e_pixmap_client_get(ep))) - { - e_pixmap_free(ep); - return; - } - else - e_pixmap_del(ep); - - evas_object_hide(ec->frame); -======= if (!(ec = wl_resource_get_user_data(resource))) return; + e_pixmap_del(ec->pixmap); + _e_comp_wl_surface_render_stop(ec); ->>>>>>> upstream e_object_del(E_OBJECT(ec)); } @@ -2759,13 +2314,11 @@ static void _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id) { struct wl_resource *res; -<<<<<<< HEAD E_Pixmap *ep = NULL; -======= E_Client *wc, *ec = NULL; Eina_List *l; ->>>>>>> upstream pid_t pid; + int internal = 0; DBG("Compositor Cb Surface Create: %d", id); @@ -2785,11 +2338,11 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso _e_comp_wl_surface_destroy); wl_client_get_credentials(client, &pid, NULL, NULL); -<<<<<<< HEAD if (pid == getpid()) { /* pixmap of internal win was supposed to be created at trap show */ - ep = e_pixmap_find(E_PIXMAP_TYPE_WL, (uintptr_t)id); + internal = 1; + ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, (uintptr_t)id); } else { @@ -2801,15 +2354,8 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso } } - if (!ep) -======= - if (pid == getpid()) //internal! - ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, (uintptr_t)id); if (!ec) ->>>>>>> upstream { - E_Pixmap *ep; - /* try to create new pixmap */ if (!(ep = e_pixmap_new(E_PIXMAP_TYPE_WL, res))) { @@ -2818,21 +2364,14 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso wl_client_post_no_memory(client); return; } -<<<<<<< HEAD - } - DBG("\tUsing Pixmap: %p", ep); - - /* set reference to pixmap so we can fetch it later */ - wl_resource_set_user_data(res, ep); - E_Comp_Wl_Client_Data *cdata = e_pixmap_cdata_get(ep); - if (cdata) - cdata->wl_surface = res; + E_Comp_Wl_Client_Data *cdata = e_pixmap_cdata_get(ep); + if (cdata) + cdata->wl_surface = res; -======= DBG("\tUsing Pixmap: %p", ep); - ec = e_client_new(ep, 0, 0); + ec = e_client_new(ep, 0, internal); } if (ec) { @@ -2857,7 +2396,6 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso break; } #endif ->>>>>>> upstream /* emit surface create signal */ wl_signal_emit(&e_comp_wl->signals.surface.create, res); } @@ -2951,7 +2489,6 @@ static const struct wl_compositor_interface _e_comp_interface = }; static void -<<<<<<< HEAD _e_comp_wl_pname_get(pid_t pid, char *name, int size) { if (!name) return; @@ -3046,10 +2583,7 @@ _e_comp_wl_compositor_cb_unbind(struct wl_resource *res_comp) } static void -_e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) -======= _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t version, uint32_t id) ->>>>>>> upstream { struct wl_resource *res; pid_t pid = 0; @@ -3065,11 +2599,7 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED, return; } -<<<<<<< HEAD - wl_resource_set_implementation(res, - &_e_comp_interface, - comp, - _e_comp_wl_compositor_cb_unbind); + wl_resource_set_implementation(res, &_e_comp_interface, e_comp, NULL); wl_client_get_credentials(client, &pid, &uid, &gid); @@ -3093,11 +2623,8 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED, cinfo->pid = pid; cinfo->uid = uid; cinfo->gid = gid; - comp->connected_clients= eina_list_append(comp->connected_clients, cinfo); + e_comp->connected_clients= eina_list_append(e_comp->connected_clients, cinfo); } -======= - wl_resource_set_implementation(res, &_e_comp_interface, e_comp, NULL); ->>>>>>> upstream } static void @@ -3119,7 +2646,7 @@ _e_comp_wl_compositor_cb_del(void *data EINA_UNUSED) /* delete fd handler */ if (e_comp_wl->fd_hdlr) ecore_main_fd_handler_del(e_comp_wl->fd_hdlr); - E_FREE_FUNC(cdata->ptr.hide_tmr, ecore_timer_del); + E_FREE_FUNC(e_comp_wl->ptr.hide_tmr, ecore_timer_del); /* free allocated data structure */ free(e_comp_wl); @@ -3196,7 +2723,7 @@ _e_comp_wl_subsurface_create_below_bg_rectangle(E_Client *ec) if (ec->comp_data->sub.below_obj) return; - ec->comp_data->sub.below_obj = evas_object_rectangle_add(ec->comp->evas); + ec->comp_data->sub.below_obj = evas_object_rectangle_add(e_comp->evas); EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->sub.below_obj); layer = evas_object_layer_get(ec->frame); @@ -3288,15 +2815,8 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec) _e_comp_wl_surface_state_commit(ec, &sdata->cached); e_comp_wl_buffer_reference(&sdata->cached_buffer_ref, NULL); -<<<<<<< HEAD _e_comp_wl_surface_subsurface_order_commit(ec); - - /* schedule repaint */ - if (e_pixmap_refresh(ec->pixmap)) - e_comp_post_update_add(ec); -======= ->>>>>>> upstream } static void @@ -3534,7 +3054,6 @@ _e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl ec->comp_data->surface = surface_resource; ec->comp_data->sub.data = sdata; -<<<<<<< HEAD ec->lock_user_location = 0; ec->lock_client_location = 0; ec->lock_user_size = 0; @@ -3549,8 +3068,6 @@ _e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl EC_CHANGED(ec); return EINA_TRUE; -======= - return EINA_TRUE; res_err: free(sdata); @@ -3624,7 +3141,6 @@ _e_comp_wl_subcompositor_cb_bind(struct wl_client *client, void *data EINA_UNUSE /* TODO: add handlers for client iconify/uniconify */ } ->>>>>>> upstream static void _e_comp_wl_sr_cb_provide_uuid(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, const char *uuid) @@ -3799,12 +3315,9 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec) /* add this client to the hash */ /* eina_hash_add(clients_win_hash, &win, ec); */ -<<<<<<< HEAD e_hints_client_list_set(); e_pixmap_cdata_set(ec->pixmap, ec->comp_data); -======= ->>>>>>> upstream } static void @@ -3827,7 +3340,6 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) e_pixmap_parent_window_set(ec->pixmap, 0); } -<<<<<<< HEAD if (ec->comp_data->sub.data) { E_Comp_Wl_Subsurf_Data *sdata = ec->comp_data->sub.data; @@ -3854,11 +3366,6 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) if (subc->comp_data && subc->comp_data->sub.data) subc->comp_data->sub.data->parent = NULL; EINA_LIST_FREE(ec->comp_data->sub.below_list_pending, subc) if (subc->comp_data && subc->comp_data->sub.data) subc->comp_data->sub.data->parent = NULL; -======= - /* remove sub list */ - EINA_LIST_FREE(ec->comp_data->sub.list, subc) - subc->comp_data->sub.data->parent = NULL; ->>>>>>> upstream if ((ec->parent) && (ec->parent->modal == ec)) { @@ -3876,7 +3383,10 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) if (ec->comp_data->surface) wl_resource_set_user_data(ec->comp_data->surface, NULL); -<<<<<<< HEAD + if (ec->internal_elm_win) + _e_comp_wl_surface_render_stop(ec); + _e_comp_wl_focus_check(); + if (ec->comp_data->aux_hint.hints) { E_Comp_Wl_Aux_Hint *hint; @@ -3892,7 +3402,7 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) E_FREE(ec->comp_data); - _e_comp_wl_focus_check(ec->comp); + _e_comp_wl_focus_check(); } static void @@ -3906,17 +3416,12 @@ _e_comp_wl_client_cb_post_new(void *data EINA_UNUSED, E_Client *ec) if (ec->need_shape_export) { // ec->shape_changed = EINA_TRUE; - e_comp_shape_queue(ec->comp); + e_comp_shape_queue(); ec->need_shape_export = EINA_FALSE; } if (ec->argb && ec->frame && !e_util_strcmp("video", ec->icccm.window_role)) _e_comp_wl_subsurface_create_below_bg_rectangle(ec); -======= - if (ec->internal_elm_win) - _e_comp_wl_surface_render_stop(ec); - _e_comp_wl_focus_check(); ->>>>>>> upstream } #if 0 @@ -4190,7 +3695,7 @@ _e_comp_wl_cb_output_bind(struct wl_client *client, void *data, uint32_t version } static void -_e_comp_wl_gl_init(E_Comp_Data *cdata) +_e_comp_wl_gl_init(void) { Evas_GL *evasgl = NULL; Evas_GL_API *glapi = NULL; @@ -4226,15 +3731,15 @@ _e_comp_wl_gl_init(E_Comp_Data *cdata) res = evas_gl_make_current(evasgl, sfc, ctx); EINA_SAFETY_ON_FALSE_GOTO(res, err); - res = glapi->evasglBindWaylandDisplay(evasgl, cdata->wl.disp); + res = glapi->evasglBindWaylandDisplay(evasgl, e_comp_wl->wl.disp); EINA_SAFETY_ON_FALSE_GOTO(res, err); evas_gl_config_free(cfg); - cdata->gl.evasgl = evasgl; - cdata->gl.api = glapi; - cdata->gl.sfc = sfc; - cdata->gl.ctx = ctx; + e_comp_wl->gl.evasgl = evasgl; + e_comp_wl->gl.api = glapi; + e_comp_wl->gl.sfc = sfc; + e_comp_wl->gl.ctx = ctx; /* for native surface */ e_comp->gl = 1; @@ -4250,24 +3755,6 @@ err: } static void -_e_comp_wl_gl_shutdown(E_Comp_Data *cdata) -{ - if (!cdata->gl.evasgl) return; - - cdata->gl.api->evasglUnbindWaylandDisplay(cdata->gl.evasgl, cdata->wl.disp); - - evas_gl_make_current(cdata->gl.evasgl, NULL, NULL); - evas_gl_context_destroy(cdata->gl.evasgl, cdata->gl.ctx); - evas_gl_surface_destroy(cdata->gl.evasgl, cdata->gl.sfc); - evas_gl_free(cdata->gl.evasgl); - - cdata->gl.sfc = NULL; - cdata->gl.ctx = NULL; - cdata->gl.api = NULL; - cdata->gl.evasgl = NULL; -} - -static void _e_comp_wl_gl_popup_cb_close(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) @@ -4393,14 +3880,6 @@ _e_comp_wl_compositor_create(void) goto comp_global_err; } -<<<<<<< HEAD - /* initialize shm mechanism */ - wl_display_init_shm(cdata->wl.disp); - -#ifndef HAVE_WAYLAND_ONLY - _e_comp_wl_cb_randr_change(NULL, 0, NULL); -#endif -======= /* try to add session_recovery to wayland globals */ if (!wl_global_create(cdata->wl.disp, &session_recovery_interface, 1, e_comp, _e_comp_wl_session_recovery_cb_bind)) @@ -4422,7 +3901,6 @@ _e_comp_wl_compositor_create(void) } /* _e_comp_wl_cb_randr_change(NULL, 0, NULL); */ ->>>>>>> upstream /* try to init data manager */ if (!e_comp_wl_data_manager_init()) @@ -4438,7 +3916,7 @@ _e_comp_wl_compositor_create(void) goto input_err; } - _e_comp_wl_gl_init(cdata); + _e_comp_wl_gl_init(); #ifndef HAVE_WAYLAND_ONLY if (e_comp_util_has_x()) @@ -4495,16 +3973,12 @@ _e_comp_wl_compositor_create(void) /* setup module idler to load shell mmodule */ ecore_idler_add(_e_comp_wl_cb_module_idle, cdata); -<<<<<<< HEAD #ifndef ENABLE_QUICK_INIT /* check if gl init succeded */ ecore_idler_add(_e_comp_wl_gl_idle, cdata); #endif - if (comp->comp_type == E_PIXMAP_TYPE_X) -======= if (e_comp->comp_type == E_PIXMAP_TYPE_X) ->>>>>>> upstream { e_comp_wl_input_pointer_enabled_set(EINA_TRUE); e_comp_wl_input_keyboard_enabled_set(EINA_TRUE); @@ -4540,29 +4014,19 @@ _e_comp_wl_desklock_hide(void) static void _e_comp_wl_gl_shutdown(void) { - if (!e_comp->gl) return; - if (e_comp_wl->wl.glapi->evasglUnbindWaylandDisplay) - e_comp_wl->wl.glapi->evasglUnbindWaylandDisplay(e_comp_wl->wl.gl, e_comp_wl->wl.disp); - evas_gl_surface_destroy(e_comp_wl->wl.gl, e_comp_wl->wl.glsfc); - evas_gl_context_destroy(e_comp_wl->wl.gl, e_comp_wl->wl.glctx); - evas_gl_free(e_comp_wl->wl.gl); - evas_gl_config_free(e_comp_wl->wl.glcfg); -} + if (!e_comp_wl->gl.evasgl) return; -static void -_e_comp_wl_gl_init(void *d EINA_UNUSED) -{ - e_comp_wl->wl.gl = evas_gl_new(e_comp->evas); - if (!e_comp_wl->wl.gl) return; - e_comp_wl->wl.glctx = evas_gl_context_create(e_comp_wl->wl.gl, NULL); - e_comp_wl->wl.glcfg = evas_gl_config_new(); - e_comp_wl->wl.glsfc = evas_gl_surface_create(e_comp_wl->wl.gl, e_comp_wl->wl.glcfg, 1, 1); - evas_gl_make_current(e_comp_wl->wl.gl, e_comp_wl->wl.glsfc, e_comp_wl->wl.glctx); - e_comp_wl->wl.glapi = evas_gl_context_api_get(e_comp_wl->wl.gl, e_comp_wl->wl.glctx); - if (e_comp_wl->wl.glapi->evasglBindWaylandDisplay) - e_comp->gl = e_comp_wl->wl.glapi->evasglBindWaylandDisplay(e_comp_wl->wl.gl, e_comp_wl->wl.disp); - else - _e_comp_wl_gl_shutdown(); + e_comp_wl->gl.api->evasglUnbindWaylandDisplay(e_comp_wl->gl.evasgl, e_comp_wl->wl.disp); + + evas_gl_make_current(e_comp_wl->gl.evasgl, NULL, NULL); + evas_gl_context_destroy(e_comp_wl->gl.evasgl, e_comp_wl->gl.ctx); + evas_gl_surface_destroy(e_comp_wl->gl.evasgl, e_comp_wl->gl.sfc); + evas_gl_free(e_comp_wl->gl.evasgl); + + e_comp_wl->gl.sfc = NULL; + e_comp_wl->gl.ctx = NULL; + e_comp_wl->gl.api = NULL; + e_comp_wl->gl.evasgl = NULL; } /* public functions */ @@ -4618,30 +4082,6 @@ e_comp_wl_init(void) #endif /* add event handlers to catch E events */ -<<<<<<< HEAD -#ifndef HAVE_WAYLAND_ONLY - E_LIST_HANDLER_APPEND(handlers, E_EVENT_RANDR_CHANGE, _e_comp_wl_cb_randr_change, NULL); -#endif - E_LIST_HANDLER_APPEND(handlers, E_EVENT_COMP_OBJECT_ADD, _e_comp_wl_cb_comp_object_add, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_DOWN, _e_comp_wl_cb_input_event, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_UP, _e_comp_wl_cb_input_event, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_comp_wl_cb_input_event, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_UP, _e_comp_wl_cb_input_event, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_MOVE, _e_comp_wl_cb_input_event, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_WHEEL, _e_comp_wl_cb_input_event, NULL); - - /* add hooks to catch e_client events */ - e_client_hook_add(E_CLIENT_HOOK_NEW_CLIENT, _e_comp_wl_client_cb_new, NULL); - e_client_hook_add(E_CLIENT_HOOK_DEL, _e_comp_wl_client_cb_del, NULL); - e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_NEW_CLIENT, _e_comp_wl_client_cb_post_new, NULL); - e_client_hook_add(E_CLIENT_HOOK_FOCUS_SET, _e_comp_wl_client_cb_focus_set, NULL); - e_client_hook_add(E_CLIENT_HOOK_FOCUS_UNSET, _e_comp_wl_client_cb_focus_unset, NULL); - e_client_hook_add(E_CLIENT_HOOK_RESIZE_BEGIN, _e_comp_wl_client_cb_resize_begin, NULL); - e_client_hook_add(E_CLIENT_HOOK_RESIZE_END, _e_comp_wl_client_cb_resize_end, NULL); - e_client_hook_add(E_CLIENT_HOOK_MOVE_END, _e_comp_wl_client_cb_move_end, NULL); - e_client_hook_add(E_CLIENT_HOOK_ICONIFY, _e_comp_wl_client_cb_iconify, NULL); - e_client_hook_add(E_CLIENT_HOOK_UNICONIFY, _e_comp_wl_client_cb_uniconify, NULL); -======= if (e_comp->comp_type != E_PIXMAP_TYPE_X) { if (e_randr2_init()) @@ -4677,7 +4117,10 @@ e_comp_wl_init(void) _e_comp_wl_client_cb_resize_begin, NULL); e_client_hook_add(E_CLIENT_HOOK_RESIZE_END, _e_comp_wl_client_cb_resize_end, NULL); ->>>>>>> upstream + + e_client_hook_add(E_CLIENT_HOOK_MOVE_END, _e_comp_wl_client_cb_move_end, NULL); + e_client_hook_add(E_CLIENT_HOOK_ICONIFY, _e_comp_wl_client_cb_iconify, NULL); + e_client_hook_add(E_CLIENT_HOOK_UNICONIFY, _e_comp_wl_client_cb_uniconify, NULL); e_desklock_show_hook_add(_e_comp_wl_desklock_show); e_desklock_hide_hook_add(_e_comp_wl_desklock_hide); @@ -4689,7 +4132,7 @@ e_comp_wl_init(void) return EINA_TRUE; } -EAPI void +E_API void e_comp_wl_deferred_job(void) { ecore_idle_enterer_add(_e_comp_wl_gl_idle, NULL); @@ -4710,28 +4153,12 @@ e_comp_wl_surface_create_signal_get(void) EINTERN void e_comp_wl_shutdown(void) { -<<<<<<< HEAD - /* free evas gl */ - E_Comp_Data *cdata; - if ((cdata = e_comp->wl_comp_data)) - _e_comp_wl_gl_shutdown(cdata); - -#ifndef HAVE_WAYLAND_ONLY - _e_comp_wl_compositor_cb_del(e_comp); -#endif /* free buffer hash */ E_FREE_FUNC(clients_buffer_hash, eina_hash_free); /* free handlers */ E_FREE_LIST(handlers, ecore_event_handler_del); -#ifdef HAVE_WAYLAND_TBM - e_comp_wl_tbm_shutdown(); -#endif -======= - /* free handlers */ - E_FREE_LIST(handlers, ecore_event_handler_del); - while (e_comp_wl->wl.globals) { Ecore_Wl_Global *global; @@ -4747,10 +4174,13 @@ e_comp_wl_shutdown(void) } if (e_comp_wl->wl.shm) wl_shm_destroy(e_comp_wl->wl.shm); _e_comp_wl_gl_shutdown(); ->>>>>>> upstream /* shutdown ecore_wayland */ ecore_wl_shutdown(); + +#ifdef HAVE_WAYLAND_TBM + e_comp_wl_tbm_shutdown(); +#endif } EINTERN struct wl_resource * @@ -4774,15 +4204,10 @@ e_comp_wl_surface_event_simple_free(void *d EINA_UNUSED, E_Event_Client *ev) EINTERN void e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer) { -<<<<<<< HEAD E_Event_Client *ev; ev = E_NEW(E_Event_Client, 1); if (!ev) return; - e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, buffer); - -======= ->>>>>>> upstream /* set usable early because shell module checks this */ e_pixmap_usable_set(ec->pixmap, (buffer != NULL)); e_pixmap_resource_set(ec->pixmap, buffer); @@ -4807,22 +4232,15 @@ e_comp_wl_surface_commit(E_Client *ec) if (!e_comp_object_damage_exists(ec->frame)) e_pixmap_image_clear(ec->pixmap, 1); -<<<<<<< HEAD if (ec->comp_data->sub.below_list || ec->comp_data->sub.below_list_pending) { if (!ec->comp_data->sub.below_obj) _e_comp_wl_subsurface_create_below_bg_rectangle(ec); } -======= ignored = ec->ignored; ->>>>>>> upstream _e_comp_wl_surface_subsurface_order_commit(ec); - /* schedule repaint */ - if (e_pixmap_refresh(ec->pixmap)) - e_comp_post_update_add(ec); - if (!e_pixmap_usable_get(ec->pixmap)) { if (ec->comp_data->mapped) @@ -4833,11 +4251,7 @@ e_comp_wl_surface_commit(E_Client *ec) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); -<<<<<<< HEAD - ec->comp_data->mapped = EINA_FALSE; -======= ec->comp_data->mapped = 0; ->>>>>>> upstream } } @@ -4855,11 +4269,7 @@ e_comp_wl_surface_commit(E_Client *ec) ec->visible = EINA_TRUE; ec->ignored = 0; evas_object_show(ec->frame); -<<<<<<< HEAD - ec->comp_data->mapped = EINA_TRUE; -======= ec->comp_data->mapped = 1; ->>>>>>> upstream } } @@ -4908,7 +4318,7 @@ e_comp_wl_subsurface_commit(E_Client *ec) return EINA_TRUE; } -EAPI void +E_API void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer) { if ((ref->buffer) && (buffer != ref->buffer)) @@ -4942,18 +4352,12 @@ e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer) * @param resource that owns the desired buffer * @returns a new E_Comp_Wl_Buffer object */ -<<<<<<< HEAD -EAPI E_Comp_Wl_Buffer * -e_comp_wl_buffer_get(struct wl_resource *resource, struct wl_resource *surface) -======= E_API E_Comp_Wl_Buffer * e_comp_wl_buffer_get(struct wl_resource *resource) ->>>>>>> upstream { E_Comp_Wl_Buffer *buffer = NULL; struct wl_listener *listener; struct wl_shm_buffer *shmbuff; - E_Comp_Data *cdata; Eina_Bool res; tbm_surface_h tbm_surf; @@ -4963,7 +4367,6 @@ e_comp_wl_buffer_get(struct wl_resource *resource) return container_of(listener, E_Comp_Wl_Buffer, destroy_listener); if (!(buffer = E_NEW(E_Comp_Wl_Buffer, 1))) return NULL; -<<<<<<< HEAD shmbuff = wl_shm_buffer_get(resource); @@ -4976,28 +4379,26 @@ e_comp_wl_buffer_get(struct wl_resource *resource) } else { - E_Pixmap *ep = wl_resource_get_user_data(surface); - E_Comp_Wl_Client_Data *p_cdata = e_pixmap_cdata_get(ep); + E_Client *ec = eina_hash_find(clients_buffer_hash, &resource); - cdata = e_comp->wl_comp_data; - if (p_cdata && p_cdata->video_client) + if ((ec) && (ec->e.state.video)) { - tbm_surf = wayland_tbm_server_get_surface(cdata->tbm.server, resource); + tbm_surf = wayland_tbm_server_get_surface(e_comp_wl->tbm.server, resource); buffer->type = E_COMP_WL_BUFFER_TYPE_VIDEO; buffer->w = tbm_surface_get_width(tbm_surf); buffer->h = tbm_surface_get_height(tbm_surf); } - else if (cdata->gl.api) + else if (e_comp->gl) { buffer->type = E_COMP_WL_BUFFER_TYPE_NATIVE; - res = cdata->gl.api->evasglQueryWaylandBuffer(cdata->gl.evasgl, + res = e_comp_wl->gl.api->evasglQueryWaylandBuffer(e_comp_wl->wl.gl, resource, EVAS_GL_WIDTH, &buffer->w); EINA_SAFETY_ON_FALSE_GOTO(res, err); - res = cdata->gl.api->evasglQueryWaylandBuffer(cdata->gl.evasgl, + res = e_comp_wl->gl.api->evasglQueryWaylandBuffer(e_comp_wl->wl.gl, resource, EVAS_GL_HEIGHT, &buffer->h); @@ -5006,20 +4407,7 @@ e_comp_wl_buffer_get(struct wl_resource *resource) else goto err; } -======= - shmbuff = wl_shm_buffer_get(resource); - if (shmbuff) - { - buffer->w = wl_shm_buffer_get_width(shmbuff); - buffer->h = wl_shm_buffer_get_height(shmbuff); - } - else if (e_comp->gl) - { - e_comp_wl->wl.glapi->evasglQueryWaylandBuffer(e_comp_wl->wl.gl, resource, EGL_WIDTH, &buffer->w); - e_comp_wl->wl.glapi->evasglQueryWaylandBuffer(e_comp_wl->wl.gl, resource, EGL_HEIGHT, &buffer->h); - } buffer->shm_buffer = shmbuff; ->>>>>>> upstream buffer->resource = resource; wl_signal_init(&buffer->destroy_signal); @@ -5095,12 +4483,8 @@ e_comp_wl_output_init(const char *id, const char *make, const char *model, output = _e_comp_wl_output_get(e_comp_wl->outputs, id); if (!output) { -<<<<<<< HEAD - if (!(output = E_NEW(E_Comp_Wl_Output, 1))) return; -======= if (!(output = E_NEW(E_Comp_Wl_Output, 1))) return EINA_FALSE; ->>>>>>> upstream if (id) output->id = eina_stringshare_add(id); if (make) output->make = eina_stringshare_add(make); @@ -5311,6 +4695,13 @@ e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t bu if (!ec->comp_data->surface) return EINA_FALSE; + if ((ec->comp_data->transform.cur_degree != 0) && + (btn == BTN_MIDDLE)) + { + _e_comp_wl_transform_unset(ec); + return EINA_TRUE; + } + if (!eina_list_count(e_comp_wl->ptr.resources)) return EINA_TRUE; diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 2473615..a4b71c2 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -207,15 +207,11 @@ struct _E_Comp_Wl_Data wl_fixed_t x, y; wl_fixed_t grab_x, grab_y; uint32_t button; -<<<<<<< HEAD Ecore_Timer *hide_tmr; E_Client *ec; Eina_Bool hidden :1; - unsigned int num_devices; -======= - E_Client *ec; Eina_Bool enabled : 1; ->>>>>>> upstream + unsigned int num_devices; } ptr; struct @@ -292,7 +288,6 @@ struct _E_Comp_Wl_Data struct { -<<<<<<< HEAD Evas_GL *evasgl; Evas_GL_API *api; Evas_GL_Surface *sfc; @@ -309,12 +304,13 @@ struct _E_Comp_Wl_Data { void *server; } tbm; -======= + + struct + { struct wl_global *global; struct wl_client *client; void (*read_pixels)(E_Comp_Wl_Output *output, void *pixels); } screenshooter; ->>>>>>> upstream Eina_List *outputs; @@ -331,11 +327,8 @@ struct _E_Comp_Wl_Data struct _E_Comp_Wl_Client_Data { -<<<<<<< HEAD struct wl_resource *wl_surface; -======= ->>>>>>> upstream Ecore_Timer *on_focus_timer; struct @@ -384,7 +377,6 @@ struct _E_Comp_Wl_Client_Data E_Comp_X_Client_Data *xwayland_data; #endif -<<<<<<< HEAD struct { struct wl_resource *viewport; @@ -414,8 +406,6 @@ struct _E_Comp_Wl_Client_Data int width_from_viewport; int height_from_viewport; -======= ->>>>>>> upstream Eina_Bool keep_buffer : 1; Eina_Bool mapped : 1; Eina_Bool change_icon : 1; @@ -425,7 +415,7 @@ struct _E_Comp_Wl_Client_Data Eina_Bool first_damage : 1; Eina_Bool set_win_type : 1; Eina_Bool frame_update : 1; -<<<<<<< HEAD + Eina_Bool maximize_pre : 1; Eina_Bool focus_update : 1; Eina_Bool opaque_state : 1; Eina_Bool video_client : 1; @@ -439,9 +429,6 @@ struct _E_Comp_Wl_Client_Data unsigned char win_type : 1; unsigned char layer : 1; } fetch; -======= - Eina_Bool maximize_pre : 1; ->>>>>>> upstream }; struct _E_Comp_Wl_Output @@ -465,28 +452,21 @@ struct _E_Comp_Wl_Output E_API Eina_Bool e_comp_wl_init(void); EINTERN void e_comp_wl_shutdown(void); -EAPI void e_comp_wl_deferred_job(void); +E_API void e_comp_wl_deferred_job(void); EINTERN struct wl_resource *e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id); EINTERN void e_comp_wl_surface_destroy(struct wl_resource *resource); EINTERN void e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer); EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec); EINTERN Eina_Bool e_comp_wl_subsurface_commit(E_Client *ec); -<<<<<<< HEAD -EAPI void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer); -EAPI E_Comp_Wl_Buffer *e_comp_wl_buffer_get(struct wl_resource *resource, struct wl_resource *surface); -======= -EINTERN void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer); +E_API void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer); E_API E_Comp_Wl_Buffer *e_comp_wl_buffer_get(struct wl_resource *resource); ->>>>>>> upstream E_API struct wl_signal e_comp_wl_surface_create_signal_get(void); E_API double e_comp_wl_idle_time_get(void); E_API Eina_Bool e_comp_wl_output_init(const char *id, const char *make, const char *model, int x, int y, int w, int h, int pw, int ph, unsigned int refresh, unsigned int subpixel, unsigned int transform); E_API void e_comp_wl_output_remove(const char *id); -<<<<<<< HEAD -======= EINTERN Eina_Bool e_comp_wl_key_down(Ecore_Event_Key *ev); EINTERN Eina_Bool e_comp_wl_key_up(Ecore_Event_Key *ev); E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state); @@ -519,6 +499,5 @@ e_comp_wl_client_xwayland_setup(E_Client *ec, E_Comp_X_Client_Data *cd, E_Pixmap e_comp_wl->xwl_pending = eina_list_remove(e_comp_wl->xwl_pending, ec); } # endif ->>>>>>> upstream # endif #endif diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index 1935b95..f2f2f34 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -176,38 +176,6 @@ _e_comp_wl_data_device_destroy_selection_data_source(struct wl_listener *listene wl_signal_emit(&e_comp_wl->selection.signal, e_comp->wl_comp_data); } -static void -_e_comp_wl_data_device_destroy_dnd_data_source(struct wl_listener *listener EINA_UNUSED, void *data) -{ - E_Comp_Data *cdata; - E_Comp_Wl_Data_Source *source; - struct wl_resource *data_device_res, *focus = NULL; - - if (!(source = (E_Comp_Wl_Data_Source*)data)) - return; - - if (!(cdata = container_of(listener, E_Comp_Data, - selection.data_source_listener))) - return; - - cdata->selection.data_source = NULL; - - if (cdata->kbd.enabled) - focus = cdata->kbd.focus; - - if (focus) - { - data_device_res = - _e_comp_wl_data_find_for_client(cdata->mgr.data_resources, - wl_resource_get_client(source->resource)); - - if (data_device_res) - wl_data_device_send_selection(data_device_res, NULL); - } - - wl_signal_emit(&cdata->selection.signal, cdata); -} - static struct wl_resource* _e_comp_wl_data_device_data_offer_create(E_Comp_Wl_Data_Source *source, struct wl_resource *data_device_res) { @@ -312,32 +280,6 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour } static void -<<<<<<< HEAD -_e_comp_wl_drag_icon_map(struct wl_resource *resource) -{ - E_Pixmap *ep; - E_Client *ec; - - if (!(ep = wl_resource_get_user_data(resource))) return; - if (!(ec = e_pixmap_client_get(ep))) return; - if (e_object_is_del(E_OBJECT(ec))) return; - - evas_object_show(ec->frame); - ec->comp_data->mapped = EINA_TRUE; -} - -static void -_e_comp_wl_drag_icon_confiugre(struct wl_resource *resource, - Evas_Coord x, Evas_Coord y, - Evas_Coord w, Evas_Coord h) -{ - /* do nothing */ -} - - -static void -_e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resource *resource, struct wl_resource *source_resource, struct wl_resource *origin_resource, struct wl_resource *icon_resource, uint32_t serial) -======= _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped) { Evas_Object *o; @@ -388,17 +330,12 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped) static void _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, struct wl_resource *source_resource, struct wl_resource *origin_resource, struct wl_resource *icon_resource, uint32_t serial) ->>>>>>> upstream { E_Comp_Wl_Data_Source *source; Eina_List *l; struct wl_resource *res; -<<<<<<< HEAD - E_Client *focused = NULL; -======= E_Client *ec = NULL; int x, y; ->>>>>>> upstream DBG("Data Device Drag Start"); @@ -409,37 +346,6 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc if (icon_resource) { -<<<<<<< HEAD - E_Pixmap *cp; - E_Client *ec; - - DBG("\tHave Icon Resource: %p", icon_resource); - cp = wl_resource_get_user_data(icon_resource); - - if ((cp) && !(ec = e_pixmap_client_get(cp))) - { - int x, y; - - ec = e_client_new(NULL, cp, 1, 0); - ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1; - ec->new_client = 0; - e_comp->new_clients--; - ec->icccm.title = eina_stringshare_add("drag-win"); - evas_object_pass_events_set(ec->frame, 1); - ec->client.w = ec->client.h = 1; - l = e_client_focus_stack_get(); - e_client_focus_stack_set(eina_list_remove(l, ec)); - - ecore_evas_pointer_xy_get(e_comp->ee, &x, &y); - evas_object_move(ec->frame, x, y); - evas_object_show(ec->frame); - - ec->comp_data->shell.surface = icon_resource; - ec->comp_data->shell.configure = _e_comp_wl_drag_icon_confiugre; - ec->comp_data->shell.map = _e_comp_wl_drag_icon_map; - - cdata->dnd.icon = ec; -======= DBG("\tHave Icon Resource: %p", icon_resource); ec = wl_resource_get_user_data(icon_resource); if (!ec->re_manage) @@ -453,7 +359,6 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); EC_CHANGED(ec); e_comp_wl->drag_client = ec; ->>>>>>> upstream } } @@ -464,24 +369,6 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc wl_pointer_send_leave(res, serial, e_comp_wl->kbd.focus); } -<<<<<<< HEAD - cdata->dnd.enabled = EINA_TRUE; - cdata->dnd.data_source = source; - cdata->dnd.client = client; - - if (source) - { - cdata->dnd.data_source_listener.notify = - _e_comp_wl_data_device_destroy_dnd_data_source; - wl_signal_add(&source->destroy_signal, - &cdata->dnd.data_source_listener); - } - - focused = e_client_focused_get(); - if (!focused) return; - - e_comp_wl_data_dnd_focus(focused); -======= evas_pointer_canvas_xy_get(e_comp->evas, &x, &y); e_comp_wl->drag = e_drag_new(x, y, NULL, 0, NULL, 0, NULL, _e_comp_wl_data_device_drag_finished); @@ -500,7 +387,6 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc e_comp_wl_data_device_send_enter(e_comp_wl->ptr.ec); e_screensaver_inhibit_toggle(1); e_comp_canvas_feed_mouse_up(0); ->>>>>>> upstream } static void @@ -590,45 +476,8 @@ _e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data EINA_UNUSED return; } -<<<<<<< HEAD - wl_resource_set_implementation(res, &_e_manager_interface, cdata, NULL); -} - -static int -_e_comp_wl_clipboard_source_ref(E_Comp_Wl_Clipboard_Source *source) -{ - source->ref ++; - return source->ref; -} - -static int -_e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source) -{ - char* t; - - source->ref --; - if (source->ref > 0) - return source->ref; - - if (source->fd_handler) - { - ecore_main_fd_handler_del(source->fd_handler); - close(source->fd[0]); - close(source->fd[1]); - } - - EINA_LIST_FREE(source->data_source.mime_types, t) - eina_stringshare_del(t); - - wl_signal_emit(&source->data_source.destroy_signal, &source->data_source); - wl_array_release(&source->contents); - free(source); - - return 0; -======= wl_resource_set_implementation(res, &_e_manager_interface, e_comp->wl_comp_data, NULL); ->>>>>>> upstream } static Eina_Bool @@ -672,7 +521,7 @@ _e_comp_wl_clipboard_offer_create(E_Comp_Wl_Clipboard_Source* source, int fd) offer->offset = 0; offer->source = source; - _e_comp_wl_clipboard_source_ref(source); + e_comp_wl_clipboard_source_ref(source); offer->fd_handler = ecore_main_fd_handler_add(fd, ECORE_FD_WRITE, @@ -711,13 +560,8 @@ _e_comp_wl_clipboard_source_save(void *data EINA_UNUSED, Ecore_Fd_Handler *handl } else if (len < 0) { -<<<<<<< HEAD - if (!(_e_comp_wl_clipboard_source_unref(source))) - cdata->clipboard.source = NULL; -======= - e_comp_wl_clipboard_source_unref(source); - e_comp_wl->clipboard.source = NULL; ->>>>>>> upstream + if (!(e_comp_wl_clipboard_source_unref(source))) + e_comp_wl->clipboard.source = NULL; } else { @@ -753,48 +597,6 @@ _e_comp_wl_clipboard_source_cancelled_send(E_Comp_Wl_Data_Source *source EINA_UN { } -<<<<<<< HEAD -static E_Comp_Wl_Clipboard_Source* -_e_comp_wl_clipboard_source_create(E_Comp_Data *cdata, const char *mime_type, uint32_t serial, int* fd) -{ - E_Comp_Wl_Clipboard_Source *source; - - source = E_NEW(E_Comp_Wl_Clipboard_Source, 1); - if (!source) return NULL; - - source->data_source.resource = NULL; - source->data_source.target = _e_comp_wl_clipboard_source_target_send; - source->data_source.send = _e_comp_wl_clipboard_source_send_send; - source->data_source.cancelled = _e_comp_wl_clipboard_source_cancelled_send; - - wl_array_init(&source->contents); - wl_signal_init(&source->data_source.destroy_signal); - - source->ref = 1; - source->serial = serial; - - source->data_source.mime_types = - eina_list_append(source->data_source.mime_types, - eina_stringshare_add(mime_type)); - - source->fd_handler = - ecore_main_fd_handler_add(fd[0], ECORE_FD_READ, - _e_comp_wl_clipboard_source_save, - cdata, NULL, NULL); - if (!source->fd_handler) - { - E_FREE(source); - return NULL; - } - - source->fd[0] = fd[0]; - source->fd[1] = fd[1]; - - return source; -} - -======= ->>>>>>> upstream static void _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, void *data EINA_UNUSED) { @@ -817,15 +619,7 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi else if (sel_source->target == _e_comp_wl_clipboard_source_target_send) return; -<<<<<<< HEAD - mime_type = eina_list_nth(sel_source->mime_types, 0); -======= - if (clip_source) - e_comp_wl_clipboard_source_unref(clip_source); - - e_comp_wl->clipboard.source = NULL; mime_type = eina_array_data_get(sel_source->mime_types, 0); ->>>>>>> upstream if (!clip_source) { @@ -834,11 +628,10 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi sel_source->send(sel_source, mime_type, p[1]); -<<<<<<< HEAD - cdata->clipboard.source = - _e_comp_wl_clipboard_source_create(cdata, mime_type, - cdata->selection.serial, p); - if (!cdata->clipboard.source) + e_comp_wl->clipboard.source = + e_comp_wl_clipboard_source_create(mime_type, + e_comp_wl->selection.serial, p); + if (!e_comp_wl->clipboard.source) { close(p[0]); close(p[1]); @@ -847,16 +640,7 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi else { sel_source->send(sel_source, mime_type, clip_source->fd[1]); - } -======= - e_comp_wl->clipboard.source = - e_comp_wl_clipboard_source_create(mime_type, - e_comp_wl->selection.serial, p[0]); - - if (!e_comp_wl->clipboard.source) - close(p[0]); ->>>>>>> upstream } static void @@ -982,8 +766,6 @@ e_comp_wl_data_device_keyboard_focus_set(void) { struct wl_resource *data_device_res, *offer_res = NULL, *focus; E_Comp_Wl_Data_Source *source; - E_Pixmap *ep; - E_Client *ec; if (!e_comp_wl->kbd.enabled) { @@ -998,12 +780,6 @@ e_comp_wl_data_device_keyboard_focus_set(void) } source = (E_Comp_Wl_Data_Source*)e_comp_wl->selection.data_source; -<<<<<<< HEAD - if (!(ep = wl_resource_get_user_data(focus))) return; - if (!(ec = e_pixmap_client_get(ep))) return; - if (e_object_is_del(E_OBJECT(ec))) return; - -======= #ifndef HAVE_WAYLAND_ONLY do { @@ -1021,33 +797,16 @@ e_comp_wl_data_device_keyboard_focus_set(void) } } while (0); #endif ->>>>>>> upstream data_device_res = e_comp_wl_data_find_for_client(wl_resource_get_client(focus)); if (!data_device_res) return; if (source) -<<<<<<< HEAD { - uint32_t serial; - int cx, cy; - - serial = wl_display_next_serial(cdata->wl.disp); - - offer_res = _e_comp_wl_data_device_data_offer_create(source, - data_device_res); - - cx = wl_fixed_to_int(cdata->ptr.x) - ec->client.x; - cy = wl_fixed_to_int(cdata->ptr.y) - ec->client.y; - - wl_data_device_send_enter(data_device_res, serial, focus, - wl_fixed_from_int(cx), wl_fixed_from_int(cy), offer_res); - wl_data_device_send_selection(data_device_res, offer_res); + offer_res = + _e_comp_wl_data_device_data_offer_create(source, data_device_res); } -======= - offer_res = _e_comp_wl_data_device_data_offer_create(source, data_device_res); wl_data_device_send_selection(data_device_res, offer_res); ->>>>>>> upstream } EINTERN Eina_Bool @@ -1124,7 +883,7 @@ e_comp_wl_data_manager_source_create(struct wl_client *client, struct wl_resourc } E_API E_Comp_Wl_Clipboard_Source * -e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd) +e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int *fd) { E_Comp_Wl_Clipboard_Source *source; @@ -1152,28 +911,38 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd if (fd > 0) { source->fd_handler = - ecore_main_fd_handler_add(fd, ECORE_FD_READ, + ecore_main_fd_handler_add(fd[0], ECORE_FD_READ, _e_comp_wl_clipboard_source_save, e_comp->wl_comp_data, NULL, NULL); if (!source->fd_handler) return NULL; } - source->fd = fd; + source->fd[0] = fd[0]; + source->fd[1] = fd[1]; return source; } -E_API void +E_API int +e_comp_wl_clipboard_source_ref(E_Comp_Wl_Clipboard_Source *source) +{ + source->ref ++; + return source->ref; +} + +E_API int e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source) { - EINA_SAFETY_ON_NULL_RETURN(source); + EINA_SAFETY_ON_NULL_RETURN_VAL(source, 0); source->ref--; - if (source->ref > 0) return; + if (source->ref > 0) + return source->ref; if (source->fd_handler) { ecore_main_fd_handler_del(source->fd_handler); - close(source->fd); + close(source->fd[0]); + close(source->fd[1]); } _mime_types_free(&source->data_source); @@ -1181,164 +950,7 @@ e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source) wl_signal_emit(&source->data_source.destroy_signal, &source->data_source); wl_array_release(&source->contents); free(source); -} - -EINTERN Eina_Bool -e_comp_wl_data_dnd_focus(E_Client *ec) -{ - E_Comp_Data *cdata; - struct wl_resource *data_device_res = NULL, *surface = NULL; - struct wl_resource *offer; - uint32_t serial; - - cdata = e_comp->wl_comp_data; - - if (ec && cdata->dnd.focus == ec->comp_data->surface) return EINA_TRUE; - - surface = cdata->dnd.focus?:ec->comp_data->surface; - if (surface) - data_device_res = - _e_comp_wl_data_find_for_client(cdata->mgr.data_resources, - wl_resource_get_client(surface)); - - if (!data_device_res) return EINA_FALSE; - - if (cdata->dnd.focus) - { - wl_data_device_send_leave(data_device_res); - cdata->dnd.focus = NULL; - } - - if (!ec) return EINA_FALSE; - - if (!cdata->dnd.data_source && - wl_resource_get_client(ec->comp_data->surface) != cdata->dnd.client) - return EINA_FALSE; - - serial = wl_display_next_serial(cdata->wl.disp); - - if (cdata->dnd.data_source) - { - offer = _e_comp_wl_data_device_data_offer_create(cdata->dnd.data_source, - data_device_res); - } - wl_data_device_send_enter(data_device_res, serial, - ec->comp_data->surface, - ec->x, ec->y, - offer); - - cdata->dnd.focus = ec->comp_data->surface; - - return EINA_TRUE; -} - -EINTERN void -e_comp_wl_data_dnd_motion(E_Client *ec, unsigned int time, int x, int y) -{ - struct wl_resource *data_device_res; - E_Comp_Data *cdata; - - cdata = e_comp->wl_comp_data; - if (!cdata->dnd.focus) return; - - if (cdata->dnd.icon) - evas_object_move(cdata->dnd.icon->frame, x, y); - - data_device_res = _e_comp_wl_data_find_for_client(cdata->mgr.data_resources, - wl_resource_get_client(cdata->dnd.focus)); - if (!data_device_res) return; - - wl_data_device_send_motion(data_device_res, - time, - wl_fixed_from_int(x), wl_fixed_from_int(y)); -} - -EINTERN void -e_comp_wl_data_dnd_drop(E_Client *ec, unsigned int time, uint32_t btn, uint32_t state) -{ - E_Comp_Data *cdata; - struct wl_resource *data_device_res, *res; - struct wl_client *wc; - uint32_t serial; - Eina_List *l; - - cdata = e_comp->wl_comp_data; - if (!cdata->dnd.focus) return; - - data_device_res = _e_comp_wl_data_find_for_client(cdata->mgr.data_resources, - wl_resource_get_client(cdata->dnd.focus)); - if (!data_device_res) return; - - if (state == WL_POINTER_BUTTON_STATE_RELEASED) - { - wl_data_device_send_drop(data_device_res); - e_comp_wl_data_dnd_focus(NULL); - if (cdata->dnd.data_source) - wl_list_remove(&cdata->dnd.data_source_listener.link); - cdata->dnd.enabled = 0; - - wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); - EINA_LIST_FOREACH(e_comp->wl_comp_data->ptr.resources, l, res) - { - if (!e_comp_wl_input_pointer_check(res)) continue; - if (wl_resource_get_client(res) != wc) continue; - wl_pointer_send_button(res, serial, time, btn, state); - wl_pointer_send_enter(res, serial, ec->comp_data->surface, - wl_fixed_from_int(ec->client.x), - wl_fixed_from_int(ec->client.y)); - } - } + return 0; } -EINTERN void -e_comp_wl_data_dnd_drop_touch(E_Client *ec, - unsigned int time, - int x, int y, - Eina_Bool flag) -{ - E_Comp_Data *cdata; - struct wl_resource *data_device_res, *res; - struct wl_client *wc; - uint32_t serial; - Eina_List *l; - wl_fixed_t fx, fy; - - cdata = e_comp->wl_comp_data; - if (!cdata->dnd.focus) return; - - data_device_res = _e_comp_wl_data_find_for_client(cdata->mgr.data_resources, - wl_resource_get_client(cdata->dnd.focus)); - if (!data_device_res) return; - - - if (!flag) - { - wl_data_device_send_drop(data_device_res); - e_comp_wl_data_dnd_focus(NULL); - if (cdata->dnd.data_source) - wl_list_remove(&cdata->dnd.data_source_listener.link); - cdata->dnd.enabled = 0; - - wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); - - fx = wl_fixed_from_int(x - ec->client.x); - fy = wl_fixed_from_int(y - ec->client.y); - - EINA_LIST_FOREACH(e_comp->wl_comp_data->ptr.resources, l, res) - { - if (!e_comp_wl_input_pointer_check(res)) continue; - if (wl_resource_get_client(res) != wc) continue; - wl_pointer_send_enter(res, serial, ec->comp_data->surface, fx, fy); - } - - EINA_LIST_FOREACH(e_comp->wl_comp_data->touch.resources, l, res) - { - if (wl_resource_get_client(res) != wc) continue; - if (!e_comp_wl_input_touch_check(res)) continue; - wl_touch_send_up(res, serial, time, 0); - } - } -} diff --git a/src/bin/e_comp_wl_data.h b/src/bin/e_comp_wl_data.h index 4e7a78a..1572271 100644 --- a/src/bin/e_comp_wl_data.h +++ b/src/bin/e_comp_wl_data.h @@ -50,16 +50,6 @@ struct _E_Comp_Wl_Clipboard_Offer size_t offset; }; -<<<<<<< HEAD -EINTERN void e_comp_wl_data_device_keyboard_focus_set(E_Comp_Data *cdata); -EINTERN Eina_Bool e_comp_wl_data_manager_init(E_Comp_Data *cdata); -EINTERN void e_comp_wl_data_manager_shutdown(E_Comp_Data *cdata); -EINTERN Eina_Bool e_comp_wl_data_dnd_focus(E_Client *ec); -EINTERN void e_comp_wl_data_dnd_motion(E_Client *ec, unsigned int time, int x, int y); -EINTERN void e_comp_wl_data_dnd_drop(E_Client *ec, unsigned int time, uint32_t btn, uint32_t state); -EINTERN void e_comp_wl_data_dnd_drop_touch(E_Client *ec, unsigned int time, int x, int y, Eina_Bool flag); - -======= E_API void e_comp_wl_data_device_send_enter(E_Client *ec); E_API void e_comp_wl_data_device_send_leave(E_Client *ec); EINTERN void *e_comp_wl_data_device_send_offer(E_Client *ec); @@ -68,8 +58,8 @@ EINTERN Eina_Bool e_comp_wl_data_manager_init(void); EINTERN void e_comp_wl_data_manager_shutdown(void); E_API struct wl_resource *e_comp_wl_data_find_for_client(struct wl_client *client); E_API E_Comp_Wl_Data_Source *e_comp_wl_data_manager_source_create(struct wl_client *client, struct wl_resource *resource, uint32_t id); -E_API void e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source); -E_API E_Comp_Wl_Clipboard_Source *e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd); ->>>>>>> upstream +E_API int e_comp_wl_clipboard_source_ref(E_Comp_Wl_Clipboard_Source *source); +E_API int e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source); +E_API E_Comp_Wl_Clipboard_Source *e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int *fd); # endif #endif diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index ae8a35f..2cbcc3d 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -3,15 +3,10 @@ #include "e.h" #include -<<<<<<< HEAD -static void -_e_comp_wl_input_update_seat_caps(E_Comp_Data *cdata) -======= E_API int E_EVENT_TEXT_INPUT_PANEL_VISIBILITY_CHANGE = -1; static void _e_comp_wl_input_update_seat_caps(void) ->>>>>>> upstream { Eina_List *l; struct wl_resource *res; @@ -29,14 +24,11 @@ _e_comp_wl_input_update_seat_caps(void) } static void -<<<<<<< HEAD _e_comp_wl_input_pointer_map(struct wl_resource *resource) { - E_Pixmap *ep; E_Client *ec; - if (!(ep = wl_resource_get_user_data(resource))) return; - if (!(ec = e_pixmap_client_get(ep))) return; + if (!(ec = wl_resource_get_user_data(resource))) return; if (e_object_is_del(E_OBJECT(ec))) return; e_pointer_object_set(e_comp->pointer, ec->frame, ec->x, ec->y); @@ -48,19 +40,15 @@ _e_comp_wl_input_pointer_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { - E_Pixmap *ep; E_Client *ec; - if (!(ep = wl_resource_get_user_data(resource))) return; - if (!(ec = e_pixmap_client_get(ep))) return; + if (!(ec = wl_resource_get_user_data(resource))) return; if (e_object_is_del(E_OBJECT(ec))) return; e_client_util_resize_without_frame(ec, w, h); } static void -======= ->>>>>>> upstream _e_comp_wl_input_cb_resource_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { wl_resource_destroy(resource); @@ -69,10 +57,6 @@ _e_comp_wl_input_cb_resource_destroy(struct wl_client *client EINA_UNUSED, struc static void _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *surface_resource, int32_t x, int32_t y) { -<<<<<<< HEAD - E_Comp_Data *cdata; -======= ->>>>>>> upstream E_Client *ec; Eina_Bool got_mouse = EINA_FALSE; int cursor_w = 0, cursor_h = 0; @@ -91,22 +75,6 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou e_pointer_object_set(e_comp->pointer, NULL, x, y); return; } -<<<<<<< HEAD - if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, (uintptr_t)surface_resource))) - { - Eina_List *l; - E_Pixmap *ep = NULL; - - ep = e_pixmap_find(E_PIXMAP_TYPE_WL, surface_resource); - if (!ep) ep = e_pixmap_new(E_PIXMAP_TYPE_WL, surface_resource); - EINA_SAFETY_ON_NULL_RETURN(ep); - - ec = e_client_new(NULL, ep, 1, 0); - if (!ec) return; - ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1; - ec->new_client = 0; - e_comp->new_clients--; -======= ec = wl_resource_get_user_data(surface_resource); if (!ec->re_manage) { @@ -114,23 +82,16 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou ec->ignored = 0; ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1; ->>>>>>> upstream ec->icccm.title = eina_stringshare_add("noshadow"); ec->icccm.window_role = eina_stringshare_add("wl_pointer-cursor"); evas_object_pass_events_set(ec->frame, 1); -<<<<<<< HEAD - ec->client.w = ec->client.h = 1; - l = e_client_focus_stack_get(); - e_client_focus_stack_set(eina_list_remove(l, ec)); + e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); + EC_CHANGED(ec); /* Set fuctions to prevent unwanted handling by shell */ ec->comp_data->shell.surface = surface_resource; ec->comp_data->shell.configure = _e_comp_wl_input_pointer_configure; ec->comp_data->shell.map = _e_comp_wl_input_pointer_map; -======= - e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); - EC_CHANGED(ec); ->>>>>>> upstream } /* ignore cursor changes during resize/move I guess */ @@ -150,30 +111,15 @@ static const struct wl_pointer_interface _e_pointer_interface = }; static const struct wl_keyboard_interface _e_keyboard_interface = -<<<<<<< HEAD -{ - _e_comp_wl_input_cb_resource_destroy -}; - -static const struct wl_touch_interface _e_touch_interface = -======= ->>>>>>> upstream { _e_comp_wl_input_cb_resource_destroy }; -<<<<<<< HEAD - -static void -_e_comp_wl_input_cb_pointer_unbind(struct wl_resource *resource) -======= static const struct wl_touch_interface _e_touch_interface = ->>>>>>> upstream { _e_comp_wl_input_cb_resource_destroy }; - static void _e_comp_wl_input_cb_pointer_unbind(struct wl_resource *resource) { @@ -200,25 +146,16 @@ _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *re return; } -<<<<<<< HEAD - cdata->ptr.resources = eina_list_append(cdata->ptr.resources, res); - wl_resource_set_implementation(res, &_e_pointer_interface, cdata, -======= e_comp_wl->ptr.resources = eina_list_append(e_comp_wl->ptr.resources, res); wl_resource_set_implementation(res, &_e_pointer_interface, e_comp->wl_comp_data, ->>>>>>> upstream _e_comp_wl_input_cb_pointer_unbind); } static void _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource) { -<<<<<<< HEAD - E_Comp_Data *cdata; -======= ->>>>>>> upstream Eina_List *l, *ll; struct wl_resource *res; @@ -230,12 +167,6 @@ _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource) eina_list_remove_list(e_comp_wl->kbd.focused, l); } -<<<<<<< HEAD - cdata->kbd.resources = eina_list_remove(cdata->kbd.resources, resource); - EINA_LIST_FOREACH_SAFE(cdata->kbd.focused, l, ll, res) - if (res == resource) - cdata->kbd.focused = eina_list_remove_list(cdata->kbd.focused, l); -======= void e_comp_wl_input_keyboard_enter_send(E_Client *ec) { @@ -261,7 +192,6 @@ e_comp_wl_input_keyboard_enter_send(E_Client *ec) e_comp_wl->kbd.mod_locked, e_comp_wl->kbd.mod_group); } ->>>>>>> upstream } static void @@ -285,63 +215,14 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r return; } -<<<<<<< HEAD - cdata->kbd.resources = eina_list_append(cdata->kbd.resources, res); - wl_resource_set_implementation(res, &_e_keyboard_interface, cdata, -======= e_comp_wl->kbd.resources = eina_list_append(e_comp_wl->kbd.resources, res); wl_resource_set_implementation(res, &_e_keyboard_interface, e_comp->wl_comp_data, ->>>>>>> upstream _e_comp_wl_input_cb_keyboard_unbind); /* send current repeat_info */ if (wl_resource_get_version(res) >= WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION) -<<<<<<< HEAD - wl_keyboard_send_repeat_info(res, cdata->kbd.repeat_rate, cdata->kbd.repeat_delay); - - /* send current keymap */ - wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, - cdata->xkb.fd, cdata->xkb.size); - - /* if client has focus, send keyboard enter */ - E_CLIENT_FOREACH(e_comp, ec) - { - if (!ec->comp_data->surface) continue; - if (client != wl_resource_get_client(ec->comp_data->surface)) continue; - - { - /* update keyboard modifier state */ - wl_array_for_each(k, &e_comp->wl_comp_data->kbd.keys) - e_comp_wl_input_keyboard_state_update(e_comp->wl_comp_data, *k, EINA_TRUE); - ec->comp_data->focus_update = 1; - if (!ec->comp_data->surface) return; - - /* send keyboard_enter to all keyboard resources */ - wc = wl_resource_get_client(ec->comp_data->surface); - serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp); - EINA_LIST_FOREACH(e_comp->wl_comp_data->kbd.resources, l, res) - { - if (wl_resource_get_client(res) != wc) continue; - wl_keyboard_send_enter(res, serial, ec->comp_data->surface, - &e_comp->wl_comp_data->kbd.keys); - ec->comp_data->focus_update = 0; - } - } - } -} - -static void -_e_comp_wl_input_cb_touch_unbind(struct wl_resource *resource) -{ - E_Comp_Data *cdata; - - /* get compositor data */ - if (!(cdata = wl_resource_get_user_data(resource))) return; - - cdata->touch.resources = eina_list_remove(cdata->touch.resources, resource); -======= wl_keyboard_send_repeat_info(res, e_config->keyboard.repeat_rate, e_config->keyboard.repeat_delay); /* send current keymap */ @@ -364,47 +245,28 @@ _e_comp_wl_input_cb_touch_unbind(struct wl_resource *resource) { e_comp_wl->touch.resources = eina_list_remove(e_comp_wl->touch.resources, resource); ->>>>>>> upstream } static void _e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id EINA_UNUSED) { -<<<<<<< HEAD - E_Comp_Data *cdata; - struct wl_resource *res; - - /* get compositor data */ - if (!(cdata = wl_resource_get_user_data(resource))) return; - -======= struct wl_resource *res; ->>>>>>> upstream /* try to create pointer resource */ res = wl_resource_create(client, &wl_touch_interface, wl_resource_get_version(resource), id); if (!res) { -<<<<<<< HEAD - ERR("Could not create touch on seat %s: %m", cdata->seat.name); -======= ERR("Could not create touch on seat %s: %m", e_comp_wl->seat.name); ->>>>>>> upstream wl_client_post_no_memory(client); return; } -<<<<<<< HEAD - cdata->touch.resources = eina_list_append(cdata->touch.resources, res); - wl_resource_set_implementation(res, &_e_touch_interface, cdata, -======= e_comp_wl->touch.resources = eina_list_append(e_comp_wl->touch.resources, res); wl_resource_set_implementation(res, &_e_touch_interface, e_comp->wl_comp_data, ->>>>>>> upstream _e_comp_wl_input_cb_touch_unbind); } @@ -423,21 +285,11 @@ _e_comp_wl_input_cb_unbind_seat(struct wl_resource *resource) } static void -<<<<<<< HEAD -_e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id) -======= _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data EINA_UNUSED, uint32_t version, uint32_t id) ->>>>>>> upstream { struct wl_resource *res; -<<<<<<< HEAD - /* try to create the seat resource */ - cdata = data; - res = wl_resource_create(client, &wl_seat_interface, MIN(version, 4), id); -======= res = wl_resource_create(client, &wl_seat_interface, version, id); ->>>>>>> upstream if (!res) { ERR("Could not create seat resource: %m"); @@ -449,13 +301,13 @@ _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data EINA_UNUSED, e_comp_wl->seat.resources = eina_list_append(e_comp_wl->seat.resources, res); -<<<<<<< HEAD - wl_resource_set_implementation(res, &_e_seat_interface, cdata, + wl_resource_set_implementation(res, &_e_seat_interface, + e_comp->wl_comp_data, _e_comp_wl_input_cb_unbind_seat); - _e_comp_wl_input_update_seat_caps(cdata); - if (cdata->seat.version >= WL_SEAT_NAME_SINCE_VERSION) - wl_seat_send_name(res, cdata->seat.name); + _e_comp_wl_input_update_seat_caps(); + if (e_comp_wl->seat.version >= WL_SEAT_NAME_SINCE_VERSION) + wl_seat_send_name(res, e_comp_wl->seat.name); } static void @@ -484,17 +336,6 @@ _e_comp_wl_input_keymap_cache_create(const char *keymap_path, char *keymap_data) } } -======= - wl_resource_set_implementation(res, &_e_seat_interface, - e_comp->wl_comp_data, - _e_comp_wl_input_cb_unbind_seat); - - _e_comp_wl_input_update_seat_caps(); - if (e_comp_wl->seat.version >= WL_SEAT_NAME_SINCE_VERSION) - wl_seat_send_name(res, e_comp_wl->seat.name); -} - ->>>>>>> upstream static int _e_comp_wl_input_keymap_fd_get(off_t size) { @@ -543,11 +384,7 @@ _e_comp_wl_input_keymap_fd_get(off_t size) } static void -<<<<<<< HEAD -_e_comp_wl_input_keymap_update(E_Comp_Data *cdata, struct xkb_keymap *keymap, const char *keymap_path) -======= -_e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) ->>>>>>> upstream +_e_comp_wl_input_keymap_update(struct xkb_keymap *keymap, const char *keymap_path) { char *tmp; xkb_mod_mask_t latched = 0, locked = 0, group = 0; @@ -564,16 +401,6 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) if (e_comp_wl->xkb.fd >= 0) close(e_comp_wl->xkb.fd); /* unreference any existing keyboard state */ -<<<<<<< HEAD - if (cdata->xkb.state) - { - latched = - xkb_state_serialize_mods(cdata->xkb.state, XKB_STATE_MODS_LATCHED); - locked = - xkb_state_serialize_mods(cdata->xkb.state, XKB_STATE_MODS_LOCKED); - group = - xkb_state_serialize_layout(cdata->xkb.state, -======= if (e_comp_wl->xkb.state) { latched = @@ -584,7 +411,6 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) XKB_STATE_MODS_LOCKED); group = xkb_state_serialize_layout(e_comp_wl->xkb.state, ->>>>>>> upstream XKB_STATE_LAYOUT_EFFECTIVE); xkb_state_unref(e_comp_wl->xkb.state); } @@ -627,19 +453,12 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) return; } -<<<<<<< HEAD _e_comp_wl_input_keymap_cache_create(keymap_path, tmp); - cdata->xkb.area = - mmap(NULL, cdata->xkb.size, (PROT_READ | PROT_WRITE), - MAP_SHARED, cdata->xkb.fd, 0); - if (cdata->xkb.area == MAP_FAILED) -======= e_comp_wl->xkb.area = mmap(NULL, e_comp_wl->xkb.size, (PROT_READ | PROT_WRITE), MAP_SHARED, e_comp_wl->xkb.fd, 0); if (e_comp_wl->xkb.area == MAP_FAILED) ->>>>>>> upstream { ERR("Failed to mmap keymap area: %m"); free(tmp); @@ -650,35 +469,6 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) free(tmp); /* send updated keymap */ -<<<<<<< HEAD - EINA_LIST_FOREACH(cdata->kbd.resources, l, res) - wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, - cdata->xkb.fd, cdata->xkb.size); - - /* update modifiers */ - e_comp_wl_input_keyboard_modifiers_update(cdata); - - if ((!latched) && (!locked)) return; - - /* send modifiers */ - serial = wl_display_get_serial(cdata->wl.disp); - EINA_LIST_FOREACH(cdata->kbd.resources, l, res) - wl_keyboard_send_modifiers(res, serial, cdata->kbd.mod_depressed, - cdata->kbd.mod_latched, cdata->kbd.mod_locked, - cdata->kbd.mod_group); -} - -EINTERN Eina_Bool -e_comp_wl_input_init(E_Comp_Data *cdata) -{ - /* check for valid compositor data */ - if (!cdata) - { - ERR("No compositor data"); - return EINA_FALSE; - } - -======= EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res) wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, e_comp_wl->xkb.fd, @@ -691,7 +481,6 @@ e_comp_wl_input_init(E_Comp_Data *cdata) EINTERN Eina_Bool e_comp_wl_input_init(void) { ->>>>>>> upstream /* set default seat name */ if (!e_comp_wl->seat.name) e_comp_wl->seat.name = "default"; @@ -699,26 +488,19 @@ e_comp_wl_input_init(void) e_comp_wl->xkb.fd = -1; /* get default keyboard repeat rate/delay from configuration */ - cdata->kbd.repeat_delay = e_config->keyboard.repeat_delay; - cdata->kbd.repeat_rate = e_config->keyboard.repeat_rate; + e_comp_wl->kbd.repeat_delay = e_config->keyboard.repeat_delay; + e_comp_wl->kbd.repeat_rate = e_config->keyboard.repeat_rate; /* check for valid repeat_delay and repeat_rate value */ /* if invalid, set the default value of repeat delay and rate value */ - if (cdata->kbd.repeat_delay < 0) cdata->kbd.repeat_delay = 400; - if (cdata->kbd.repeat_delay < 0) cdata->kbd.repeat_rate = 25; + if (e_comp_wl->kbd.repeat_delay < 0) e_comp_wl->kbd.repeat_delay = 400; + if (e_comp_wl->kbd.repeat_delay < 0) e_comp_wl->kbd.repeat_rate = 25; /* create the global resource for input seat */ -<<<<<<< HEAD - cdata->seat.global = - wl_global_create(cdata->wl.disp, &wl_seat_interface, 4, - cdata, _e_comp_wl_input_cb_bind_seat); - if (!cdata->seat.global) -======= e_comp_wl->seat.global = wl_global_create(e_comp_wl->wl.disp, &wl_seat_interface, 4, e_comp->wl_comp_data, _e_comp_wl_input_cb_bind_seat); if (!e_comp_wl->seat.global) ->>>>>>> upstream { ERR("Could not create global for seat: %m"); return EINA_FALSE; @@ -732,24 +514,10 @@ e_comp_wl_input_init(void) } EINTERN void -<<<<<<< HEAD -e_comp_wl_input_shutdown(E_Comp_Data *cdata) -{ - struct wl_resource *res; - - /* check for valid compositor data */ - if (!cdata) - { - ERR("No compositor data"); - return; - } - -======= e_comp_wl_input_shutdown(void) { struct wl_resource *res; ->>>>>>> upstream /* destroy pointer resources */ EINA_LIST_FREE(e_comp_wl->ptr.resources, res) wl_resource_destroy(res); @@ -803,10 +571,6 @@ e_comp_wl_input_keyboard_check(struct wl_resource *res) &_e_keyboard_interface); } -<<<<<<< HEAD -EINTERN void -e_comp_wl_input_keyboard_modifiers_update(E_Comp_Data *cdata) -======= EINTERN Eina_Bool e_comp_wl_input_keyboard_modifiers_serialize(void) { @@ -838,34 +602,11 @@ e_comp_wl_input_keyboard_modifiers_serialize(void) EINTERN void e_comp_wl_input_keyboard_modifiers_update(void) ->>>>>>> upstream { uint32_t serial; struct wl_resource *res; Eina_List *l; -<<<<<<< HEAD - cdata->kbd.mod_depressed = - xkb_state_serialize_mods(cdata->xkb.state, XKB_STATE_DEPRESSED); - cdata->kbd.mod_latched = - xkb_state_serialize_mods(cdata->xkb.state, XKB_STATE_MODS_LATCHED); - cdata->kbd.mod_locked = - xkb_state_serialize_mods(cdata->xkb.state, XKB_STATE_MODS_LOCKED); - cdata->kbd.mod_group = - xkb_state_serialize_layout(cdata->xkb.state, XKB_STATE_LAYOUT_EFFECTIVE); - - serial = wl_display_next_serial(cdata->wl.disp); - EINA_LIST_FOREACH(cdata->kbd.resources, l, res) - wl_keyboard_send_modifiers(res, serial, - cdata->kbd.mod_depressed, - cdata->kbd.mod_latched, - cdata->kbd.mod_locked, - cdata->kbd.mod_group); -} - -EINTERN void -e_comp_wl_input_keyboard_state_update(E_Comp_Data *cdata, uint32_t keycode, Eina_Bool pressed) -======= if (!e_comp_wl_input_keyboard_modifiers_serialize()) return; if (!e_comp_wl->kbd.focused) return; @@ -881,7 +622,6 @@ e_comp_wl_input_keyboard_state_update(E_Comp_Data *cdata, uint32_t keycode, Eina EINTERN void e_comp_wl_input_keyboard_state_update(uint32_t keycode, Eina_Bool pressed) ->>>>>>> upstream { enum xkb_key_direction dir; @@ -890,13 +630,6 @@ e_comp_wl_input_keyboard_state_update(uint32_t keycode, Eina_Bool pressed) if (pressed) dir = XKB_KEY_DOWN; else dir = XKB_KEY_UP; -<<<<<<< HEAD - cdata->kbd.mod_changed = - xkb_state_update_key(cdata->xkb.state, keycode + 8, dir); -} - -EAPI void -======= e_comp_wl->kbd.mod_changed = xkb_state_update_key(e_comp_wl->xkb.state, keycode + 8, dir); @@ -904,7 +637,6 @@ EAPI void } E_API void ->>>>>>> upstream e_comp_wl_input_pointer_enabled_set(Eina_Bool enabled) { /* check for valid compositor data */ @@ -914,19 +646,11 @@ e_comp_wl_input_pointer_enabled_set(Eina_Bool enabled) return; } -<<<<<<< HEAD - e_comp->wl_comp_data->ptr.enabled = !!enabled; - _e_comp_wl_input_update_seat_caps(e_comp->wl_comp_data); -} - -EAPI void -======= e_comp_wl->ptr.enabled = !!enabled; _e_comp_wl_input_update_seat_caps(); } E_API void ->>>>>>> upstream e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled) { /* check for valid compositor data */ @@ -936,37 +660,18 @@ e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled) return; } -<<<<<<< HEAD - e_comp->wl_comp_data->kbd.enabled = !!enabled; - _e_comp_wl_input_update_seat_caps(e_comp->wl_comp_data); -} - -EAPI void -e_comp_wl_input_keymap_set(E_Comp_Data *cdata, const char *rules, const char *model, const char *layout) -======= e_comp_wl->kbd.enabled = !!enabled; _e_comp_wl_input_update_seat_caps(); } E_API void e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *layout) ->>>>>>> upstream { struct xkb_keymap *keymap; struct xkb_rule_names names; FILE *file = NULL; const char *keymap_path = NULL; -<<<<<<< HEAD - /* check for valid compositor data */ - if (!cdata) - { - ERR("No compositor data"); - return; - } - -======= ->>>>>>> upstream /* DBG("COMP_WL: Keymap Set: %s %s %s", rules, model, layout); */ /* assemble xkb_rule_names so we can fetch keymap */ @@ -983,9 +688,9 @@ e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *lay xkb_context_unref(e_comp_wl->xkb.context); /* create a new xkb context */ -<<<<<<< HEAD - cdata->xkb.context = xkb_context_new(0); - if (!cdata->xkb.context) + e_comp_wl->xkb.context = xkb_context_new(0); + + if (!e_comp_wl->xkb.context) return; if (e_config->xkb.use_cache) @@ -1004,29 +709,18 @@ e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *lay { INF("There is a no keymap file (%s). Generate keymap using rmlvo\n", keymap_path); /* fetch new keymap based on names */ - keymap = xkb_map_new_from_names(cdata->xkb.context, &names, 0); + keymap = xkb_map_new_from_names(e_comp_wl->xkb.context, &names, 0); } else { INF("Keymap file (%s) has been found. xkb_keymap is going to be generated with it.\n", keymap_path); - keymap = xkb_map_new_from_file(cdata->xkb.context, file, XKB_KEYMAP_FORMAT_TEXT_V1, 0); + keymap = xkb_map_new_from_file(e_comp_wl->xkb.context, file, XKB_KEYMAP_FORMAT_TEXT_V1, 0); eina_stringshare_del(keymap_path); keymap_path = NULL; } /* update compositor keymap */ - _e_comp_wl_input_keymap_update(cdata, keymap, keymap_path); -======= - e_comp_wl->xkb.context = xkb_context_new(0); - - /* fetch new keymap based on names */ - keymap = xkb_map_new_from_names(e_comp_wl->xkb.context, &names, 0); - if (keymap) - { - /* update compositor keymap */ - _e_comp_wl_input_keymap_update(keymap); - } ->>>>>>> upstream + _e_comp_wl_input_keymap_update(keymap, keymap_path); /* cleanup */ if (keymap_path) eina_stringshare_del(keymap_path); @@ -1035,11 +729,7 @@ e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *lay free((char *)names.layout); } -<<<<<<< HEAD -EAPI void -======= E_API void ->>>>>>> upstream e_comp_wl_input_touch_enabled_set(Eina_Bool enabled) { /* check for valid compositor data */ @@ -1049,13 +739,8 @@ e_comp_wl_input_touch_enabled_set(Eina_Bool enabled) return; } -<<<<<<< HEAD - e_comp->wl_comp_data->touch.enabled = !!enabled; - _e_comp_wl_input_update_seat_caps(e_comp->wl_comp_data); -======= e_comp_wl->touch.enabled = !!enabled; _e_comp_wl_input_update_seat_caps(); ->>>>>>> upstream } EINTERN Eina_Bool diff --git a/src/bin/e_comp_wl_input.h b/src/bin/e_comp_wl_input.h index 0a6a25c..b3300c8 100644 --- a/src/bin/e_comp_wl_input.h +++ b/src/bin/e_comp_wl_input.h @@ -23,15 +23,9 @@ EINTERN void e_comp_wl_input_keyboard_modifiers_update(void); EINTERN void e_comp_wl_input_keyboard_state_update(uint32_t keycode, Eina_Bool pressed); EINTERN void e_comp_wl_input_keyboard_enter_send(E_Client *client); -<<<<<<< HEAD -EAPI void e_comp_wl_input_pointer_enabled_set(Eina_Bool enabled); -EAPI void e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled); -EAPI void e_comp_wl_input_touch_enabled_set(Eina_Bool enabled); -======= E_API void e_comp_wl_input_pointer_enabled_set(Eina_Bool enabled); E_API void e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled); E_API void e_comp_wl_input_touch_enabled_set(Eina_Bool enabled); ->>>>>>> upstream E_API void e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *layout); diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 09d51d1..b9eee91 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -64,8 +64,6 @@ static int screen_size_index = -1; static Ecore_X_Atom backlight_atom = 0; extern double e_bl_val; -<<<<<<< HEAD -======= static void _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec); static inline E_Comp_X_Client_Data * @@ -78,7 +76,6 @@ _e_comp_x_client_data_get(const E_Client *ec) return ec->comp_data; } ->>>>>>> upstream static Eina_Bool _e_comp_x_flusher(void *data EINA_UNUSED) { @@ -1561,11 +1558,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore return ECORE_CALLBACK_PASS_ON; } /* pass through requests for windows we haven't/won't reparent yet */ -<<<<<<< HEAD - if ((ec) && (!ec->comp_data->need_reparent) && (!ec->comp_data->reparented)) -======= if (ec && (!_e_comp_x_client_data_get(ec)->need_reparent) && (!_e_comp_x_client_data_get(ec)->reparented)) ->>>>>>> upstream { _e_comp_x_client_data_get(ec)->initial_attributes.x = ev->x; _e_comp_x_client_data_get(ec)->initial_attributes.y = ev->y; @@ -2905,26 +2898,8 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam } //WRN("DAMAGE %p: %dx%d", ec, ev->area.width, ev->area.height); -<<<<<<< HEAD ec->comp_data->damage_count++; - if (ec->comp->nocomp) - e_pixmap_dirty(ec->pixmap); - /* discard unwanted xy position of first damage - * to avoid wrong composition for override redirect window */ - else if ((ec->override) && (!ec->comp_data->first_damage)) - e_comp_object_damage(ec->frame, 0, 0, ev->area.width, ev->area.height); - else - e_comp_object_damage(ec->frame, ev->area.x, ev->area.y, ev->area.width, ev->area.height); - - if ((e_comp_config_get()->skip_first_damage) && - (!ec->re_manage) && (!ec->override) && (!ec->comp_data->first_damage)) - e_comp_object_render_update_del(ec->frame); - else - E_FREE_FUNC(ec->comp_data->first_draw_delay, ecore_timer_del); - ec->comp_data->first_damage = 1; - -======= if (e_comp->nocomp) e_pixmap_dirty(ec->pixmap); else if (skip) @@ -2937,12 +2912,12 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam e_comp_object_damage(ec->frame, rects[i].x, rects[i].y, rects[i].width, rects[i].height); } free(rects); - if ((!ec->re_manage) && (!ec->override) && (!_e_comp_x_client_data_get(ec)->first_damage)) + if ((e_comp_config_get()->skip_first_damage) && + (!ec->re_manage) && (!ec->override) && (!_e_comp_x_client_data_get(ec)->first_damage)) e_comp_object_render_update_del(ec->frame); else E_FREE_FUNC(_e_comp_x_client_data_get(ec)->first_draw_delay, ecore_timer_del); _e_comp_x_client_data_get(ec)->first_damage = 1; ->>>>>>> upstream return ECORE_CALLBACK_RENEW; } @@ -5373,42 +5348,20 @@ _e_comp_x_screens_setup(void) root = ecore_x_window_root_first_get(); if (!root) { -<<<<<<< HEAD - int rw, rh; - Ecore_X_Window root = roots[i]; - E_Comp *c; - - ecore_x_window_size_get(root, &rw, &rh); - if (n == 1) - { - /* more than 1 root window - xinerama wont be active */ - success = _e_comp_x_xinerama_setup(rw, rh); - if (!success) break; - } - if (!success) break; - c = e_comp_new(); - c->comp_type = E_PIXMAP_TYPE_X; - success = _e_comp_x_setup(c, root, rw, rh); - if (!success) break; -#ifdef _F_ZONE_WINDOW_ROTATION_ - if (e_config->wm_win_rotation) - { - ecore_x_e_window_rotation_supported_set(roots[i], - e_config->wm_win_rotation); - } -#endif - } - free(roots); - return success; -======= e_error_message_show("X reports there are no root windows!\n"); return 0; } ecore_x_window_size_get(root, &rw, &rh); if (e_comp->comp_type == E_PIXMAP_TYPE_NONE) e_randr2_screens_setup(rw, rh); +#ifdef _F_ZONE_WINDOW_ROTATION_ + if (e_config->wm_win_rotation) + { + ecore_x_e_window_rotation_supported_set(roots[i], + e_config->wm_win_rotation); + } +#endif return _e_comp_x_setup(root, rw, rh); ->>>>>>> upstream } E_API Eina_Bool @@ -5550,8 +5503,6 @@ e_comp_x_init(void) ecore_x_sync(); _x_idle_flush = ecore_idle_enterer_add(_e_comp_x_flusher, NULL); -<<<<<<< HEAD -======= if (e_comp->comp_type != E_PIXMAP_TYPE_WL) { @@ -5567,7 +5518,6 @@ e_comp_x_init(void) } else e_dnd_init(); ->>>>>>> upstream return EINA_TRUE; } diff --git a/src/bin/e_config.h b/src/bin/e_config.h index b097530..e1293c9 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -434,11 +434,7 @@ struct _E_Config const char *selected_layout; // whatever teh current layout that the user has selected is const char *desklock_layout; } xkb; -<<<<<<< HEAD - -======= ->>>>>>> upstream struct { int repeat_delay;//delay in milliseconds since key down until repeating starts diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index d663d6c..f75636f 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -216,12 +216,8 @@ e_desk_show(E_Desk *desk) Edje_Message_Float_Set *msg; Eina_List *l; E_Shelf *es; -<<<<<<< HEAD - int x, y, dx = 0, dy = 0; -======= E_Desk *desk2; - int was_zone = 0, dx = 0, dy = 0; ->>>>>>> upstream + int x, y, dx = 0, dy = 0; E_OBJECT_CHECK(desk); E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE); diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c index 5f34881..3a88d2a 100644 --- a/src/bin/e_dnd.c +++ b/src/bin/e_dnd.c @@ -3,26 +3,16 @@ /* local subsystem functions */ static void _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy); -<<<<<<< HEAD -static Ecore_X_Window _e_drag_win_get(const E_Drop_Handler *h, int xdnd); -static int _e_drag_win_matches(E_Drop_Handler *h, Ecore_X_Window win, int xdnd); +static Ecore_Window _e_drag_win_get(const E_Drop_Handler *h, int xdnd); +static int _e_drag_win_matches(E_Drop_Handler *h, Ecore_Window win, int xdnd); static void _e_drag_win_hide(E_Drop_Handler *h); #ifndef HAVE_WAYLAND_ONLY static void _e_drag_win_show(E_Drop_Handler *h); static void _e_drag_move(E_Drag *drag, int x, int y); -static int _e_drag_update(Ecore_X_Window root, int x, int y, Ecore_X_Atom action); -static void _e_drag_xdnd_end(Ecore_X_Window root, int x, int y); -#endif -static void _e_drag_end(int x, int y); -======= -static Ecore_Window _e_drag_win_get(const E_Drop_Handler *h, int xdnd); -static int _e_drag_win_matches(E_Drop_Handler *h, Ecore_Window win, int xdnd); -static void _e_drag_win_show(E_Drop_Handler *h); -static void _e_drag_win_hide(E_Drop_Handler *h); static int _e_drag_update(Ecore_Window root, int x, int y, Ecore_X_Atom action); -static void _e_drag_end(int x, int y); static void _e_drag_xdnd_end(Ecore_Window root, int x, int y); ->>>>>>> upstream +#endif +static void _e_drag_end(int x, int y); static void _e_drag_free(E_Drag *drag); static Eina_Bool _e_dnd_cb_key_down(void *data, int type, void *event); diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index fd390f6..7ee53c4 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -1606,8 +1606,7 @@ e_hints_window_e_state_set(E_Client *ec EINA_UNUSED) /* TODO */ } -<<<<<<< HEAD -EAPI void +E_API void e_hints_window_e_opaque_get(E_Client *ec) { #ifdef HAVE_WAYLAND_ONLY @@ -1628,10 +1627,7 @@ e_hints_window_e_opaque_get(E_Client *ec) #endif } -EAPI void -======= E_API void ->>>>>>> upstream e_hints_window_qtopia_soft_menu_get(E_Client *ec) { #ifdef HAVE_WAYLAND_ONLY @@ -1737,7 +1733,7 @@ e_hints_scale_update(void) #endif } -EAPI const Eina_List * +E_API const Eina_List * e_hints_aux_hint_supported_add(const char *hint) { Eina_List *l; @@ -1754,7 +1750,7 @@ e_hints_aux_hint_supported_add(const char *hint) return aux_hints_supported; } -EAPI const Eina_List * +E_API const Eina_List * e_hints_aux_hint_supported_del(const char *hint) { Eina_List *l; @@ -1772,7 +1768,7 @@ e_hints_aux_hint_supported_del(const char *hint) return aux_hints_supported; } -EAPI const Eina_List * +E_API const Eina_List * e_hints_aux_hint_supported_get(void) { return aux_hints_supported; diff --git a/src/bin/e_hints.h b/src/bin/e_hints.h index 6231309..ffc672b 100644 --- a/src/bin/e_hints.h +++ b/src/bin/e_hints.h @@ -37,29 +37,18 @@ E_API void e_hints_window_desktop_set(E_Client *ec); E_API void e_hints_window_e_state_set(E_Client *ec); E_API void e_hints_window_e_state_get(E_Client *ec); -<<<<<<< HEAD -EAPI void e_hints_window_e_opaque_get(E_Client *ec); +E_API void e_hints_window_e_opaque_get(E_Client *ec); -EAPI void e_hints_window_qtopia_soft_menu_get(E_Client *ec); -EAPI void e_hints_window_qtopia_soft_menus_get(E_Client *ec); -======= E_API void e_hints_window_qtopia_soft_menu_get(E_Client *ec); E_API void e_hints_window_qtopia_soft_menus_get(E_Client *ec); ->>>>>>> upstream E_API void e_hints_window_virtual_keyboard_state_get(E_Client *ec); E_API void e_hints_window_virtual_keyboard_get(E_Client *ec); -<<<<<<< HEAD -EAPI void e_hints_scale_update(void); -EAPI const Eina_List * e_hints_aux_hint_supported_add(const char *hint); -EAPI const Eina_List * e_hints_aux_hint_supported_del(const char *hint); -EAPI const Eina_List * e_hints_aux_hint_supported_get(void); -======= - E_API void e_hints_scale_update(void); - ->>>>>>> upstream +E_API const Eina_List * e_hints_aux_hint_supported_add(const char *hint); +E_API const Eina_List * e_hints_aux_hint_supported_del(const char *hint); +E_API const Eina_List * e_hints_aux_hint_supported_get(void); #ifdef E_COMP_X_H E_API void e_hints_window_state_update(E_Client *ec, int state, int action); diff --git a/src/bin/e_info_server.c b/src/bin/e_info_server.c index dbe51b0..5ba2e01 100644 --- a/src/bin/e_info_server.c +++ b/src/bin/e_info_server.c @@ -5,7 +5,7 @@ #define PATH "/org/enlightenment/wm" #define IFACE "org.enlightenment.wm.info" -EAPI int E_EVENT_INFO_ROTATION_MESSAGE = -1; +E_API int E_EVENT_INFO_ROTATION_MESSAGE = -1; typedef struct _E_Info_Server { @@ -604,7 +604,7 @@ _e_info_server_cb_rotation_message(const Eldbus_Service_Interface *iface EINA_UN } if (zone_num == -1) - ev->zone = e_zone_current_get(e_comp); + ev->zone = e_zone_current_get(); else { EINA_LIST_FOREACH(e_comp->zones, l, z) diff --git a/src/bin/e_info_server.h b/src/bin/e_info_server.h index 84d20bc..77ea89c 100644 --- a/src/bin/e_info_server.h +++ b/src/bin/e_info_server.h @@ -14,7 +14,7 @@ struct E_Event_Info_Rotation_Message int rotation; }; -EAPI extern int E_EVENT_INFO_ROTATION_MESSAGE; +E_API extern int E_EVENT_INFO_ROTATION_MESSAGE; EINTERN int e_info_server_init(void); EINTERN int e_info_server_shutdown(void); diff --git a/src/bin/e_log.h b/src/bin/e_log.h index 01df431..5d47348 100644 --- a/src/bin/e_log.h +++ b/src/bin/e_log.h @@ -47,7 +47,7 @@ while (0) -extern EAPI int e_log_dom; +extern E_API int e_log_dom; EINTERN int e_log_init(void); EINTERN int e_log_shutdown(void); @@ -57,23 +57,15 @@ EINTERN int e_log_shutdown(void); #undef WRN #undef ERR #undef CRI -<<<<<<< HEAD #undef ELOG #undef ELOGF -#define DBG(...) printf(__VA_ARGS__); putc('\n', stdout) -#define INF(...) printf(__VA_ARGS__); putc('\n', stdout) -#define WRN(...) printf(__VA_ARGS__); putc('\n', stdout) -#define ERR(...) printf(__VA_ARGS__); putc('\n', stdout) -#define CRI(...) printf(__VA_ARGS__); putc('\n', stdout) -#define ELOG(...) ; -#define ELOGF(...) ; -======= #define DBG(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) #define INF(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) #define WRN(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) #define ERR(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) #define CRI(...) do { printf(__VA_ARGS__); putc('\n', stdout); } while(0) ->>>>>>> upstream +#define ELOG(...) ; +#define ELOGF(...) ; #endif #endif diff --git a/src/bin/e_main.c b/src/bin/e_main.c index cc74554..ddd8783 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -86,15 +86,9 @@ static void _e_main_desk_save(void); static void _e_main_desk_restore(void); static void _e_main_efreet_paths_init(void); static void _e_main_modules_load(Eina_Bool safe_mode); -<<<<<<< HEAD -static Eina_Bool _e_main_cb_idle_before(void *data __UNUSED__); -static Eina_Bool _e_main_cb_idle_after(void *data __UNUSED__); -static Eina_Bool _e_main_cb_startup_fake_end(void *data __UNUSED__); -======= static Eina_Bool _e_main_cb_idle_before(void *data EINA_UNUSED); static Eina_Bool _e_main_cb_idle_after(void *data EINA_UNUSED); static Eina_Bool _e_main_cb_startup_fake_end(void *data EINA_UNUSED); ->>>>>>> upstream /* local variables */ static Eina_Bool really_know = EINA_FALSE; @@ -1112,15 +1106,9 @@ main(int argc, char **argv) TS("E_Order Init Done"); _e_main_shutdown_push(e_order_shutdown); -<<<<<<< HEAD - TS("E_Manager Keys Grab"); - e_managers_keys_grab(); - TS("E_Manager Keys Grab Done"); -======= TS("E_Comp_Canvas Keys Grab"); e_comp_canvas_keys_grab(); TS("E_Comp_Canvas Keys Grab Done"); ->>>>>>> upstream if (e_config->show_splash) e_init_status_set(_("Load Modules")); @@ -1344,7 +1332,6 @@ main(int argc, char **argv) } TS("Screens Init Done"); _e_main_shutdown_push(_e_main_screens_shutdown); - e_screensaver_force_update(); if (e_config->show_splash) e_init_status_set(_("Setup System Controls")); @@ -1426,10 +1413,6 @@ main(int argc, char **argv) TS("E_Icon Init Done"); _e_main_shutdown_push(e_icon_shutdown); - TS("E_Manager Keys Grab"); - e_managers_keys_grab(); - TS("E_Manager Keys Grab Done"); - if (e_config->show_splash) e_init_status_set(_("Load Modules")); TS("Load Modules"); @@ -2062,12 +2045,8 @@ _e_main_desk_restore(void) { const Eina_List *l; E_Zone *zone; -<<<<<<< HEAD - const char *env; -======= E_Client *ec; char *env; ->>>>>>> upstream char name[1024]; EINA_LIST_FOREACH(e_comp->zones, l, zone) @@ -2207,11 +2186,7 @@ _e_main_cb_idle_after(void *data EINA_UNUSED) } static Eina_Bool -<<<<<<< HEAD -_e_main_cb_startup_fake_end(void *data __UNUSED__) -======= _e_main_cb_startup_fake_end(void *data EINA_UNUSED) ->>>>>>> upstream { e_init_hide(); return ECORE_CALLBACK_CANCEL; diff --git a/src/bin/e_module.c b/src/bin/e_module.c index aedb79d..2762168 100644 --- a/src/bin/e_module.c +++ b/src/bin/e_module.c @@ -9,12 +9,8 @@ /* local subsystem functions */ static void _e_module_free(E_Module *m); -<<<<<<< HEAD static void _e_module_dialog_disable_defer(const char *title, const char *body, E_Module *m); -static void _e_module_dialog_disable_show(const char *title, const char *body, E_Module *m); -======= static void _e_module_dialog_disable_create(const char *title, const char *body, E_Module *m); ->>>>>>> upstream static void _e_module_cb_dialog_disable(void *data, E_Dialog *dia); static void _e_module_event_update_free(void *data, void *event); static Eina_Bool _e_module_cb_idler(void *data); @@ -751,8 +747,30 @@ e_module_desktop_list(void) return l; } -<<<<<<< HEAD -EAPI void +static void +_e_module_dialog_disable_show(const char *title, const char *body, E_Module *m) +{ + E_Dialog *dia; + char buf[4096]; + + printf("MODULE ERR:\n%s\n", body); + + dia = e_dialog_new(NULL, "E", "_module_unload_dialog"); + + snprintf(buf, sizeof(buf), "%s
%s", body, + _("What action should be taken with this module?
")); + + e_dialog_title_set(dia, title); + e_dialog_icon_set(dia, "enlightenment", 64); + e_dialog_text_set(dia, buf); + e_dialog_button_add(dia, _("Unload"), NULL, _e_module_cb_dialog_disable, m); + e_dialog_button_add(dia, _("Keep"), NULL, NULL, NULL); + elm_win_center(dia->win, 1, 1); + e_win_no_remember_set(dia->win, 1); + e_dialog_show(dia); +} + +E_API void e_module_deferred_job(void) { Defer_Dialog *dd; @@ -767,10 +785,7 @@ e_module_deferred_job(void) } } -EAPI void -======= E_API void ->>>>>>> upstream e_module_desktop_free(E_Module_Desktop *md) { if (!md) return; @@ -862,37 +877,6 @@ _e_module_dialog_disable_defer(const char *title, const char *body, E_Module *m) deferred_dialogs = eina_list_append(deferred_dialogs, dd); } -static void -_e_module_dialog_disable_show(const char *title, const char *body, E_Module *m) -{ - E_Dialog *dia; - char buf[4096]; - -#ifdef ENABLE_QUICK_INIT - if (!_e_modules_init_end) - { - _e_module_dialog_disable_defer(title, body, m); - return; - } -#endif - - printf("MODULE ERR:\n%s\n", body); - - dia = e_dialog_new(NULL, "E", "_module_unload_dialog"); - - snprintf(buf, sizeof(buf), "%s
%s", body, - _("What action should be taken with this module?
")); - - e_dialog_title_set(dia, title); - e_dialog_icon_set(dia, "enlightenment", 64); - e_dialog_text_set(dia, buf); - e_dialog_button_add(dia, _("Unload"), NULL, _e_module_cb_dialog_disable, m); - e_dialog_button_add(dia, _("Keep"), NULL, NULL, NULL); - elm_win_center(dia->win, 1, 1); - e_win_no_remember_set(dia->win, 1); - e_dialog_show(dia); -} - static Eina_Bool _e_module_dialog_disable_timer(Disable_Dialog *dd) { @@ -908,6 +892,14 @@ _e_module_dialog_disable_create(const char *title, const char *body, E_Module *m { Disable_Dialog *dd; +#ifdef ENABLE_QUICK_INIT + if (!_e_modules_init_end) + { + _e_module_dialog_disable_defer(title, body, m); + return; + } +#endif + dd = E_NEW(Disable_Dialog, 1); dd->title = strdup(title); dd->body = strdup(body); diff --git a/src/bin/e_module.h b/src/bin/e_module.h index f5e6ad7..6c07373 100644 --- a/src/bin/e_module.h +++ b/src/bin/e_module.h @@ -62,25 +62,7 @@ struct _E_Module_Api EINTERN int e_module_init(void); EINTERN int e_module_shutdown(void); -<<<<<<< HEAD -EAPI void e_module_deferred_job(void); -EAPI void e_module_all_load(void); -EAPI E_Module *e_module_new(const char *name); -EAPI int e_module_save(E_Module *m); -EAPI const char *e_module_dir_get(E_Module *m); -EAPI int e_module_enable(E_Module *m); -EAPI int e_module_disable(E_Module *m); -EAPI int e_module_enabled_get(E_Module *m); -EAPI int e_module_save_all(void); -EAPI E_Module *e_module_find(const char *name); -EAPI Eina_List *e_module_list(void); -EAPI Eina_List *e_module_desktop_list(void); -EAPI void e_module_desktop_free(E_Module_Desktop *md); -EAPI void e_module_dialog_show(E_Module *m, const char *title, const char *body); -EAPI void e_module_delayed_set(E_Module *m, int delayed); -EAPI void e_module_priority_set(E_Module *m, int priority); -EAPI Eina_Bool e_module_loading_get(void); -======= +E_API void e_module_deferred_job(void); E_API void e_module_all_load(void); E_API E_Module *e_module_new(const char *name); E_API int e_module_save(E_Module *m); @@ -97,6 +79,5 @@ E_API void e_module_dialog_show(E_Module *m, const char *title, const ch E_API void e_module_delayed_set(E_Module *m, int delayed); E_API void e_module_priority_set(E_Module *m, int priority); E_API Eina_Bool e_module_loading_get(void); ->>>>>>> upstream #endif #endif diff --git a/src/bin/e_object.c b/src/bin/e_object.c index 8090258..9dd1bec 100644 --- a/src/bin/e_object.c +++ b/src/bin/e_object.c @@ -12,8 +12,8 @@ static sigjmp_buf _e_object_segv_buf; #endif #ifdef OBJECT_HASH_CHECK -EAPI Eina_Bool e_obj_hash_check = EINA_FALSE; -EAPI Eina_Hash *e_obj_hash = NULL; +E_API Eina_Bool e_obj_hash_check = EINA_FALSE; +E_API Eina_Hash *e_obj_hash = NULL; #endif /* externally accessible functions */ @@ -438,7 +438,7 @@ e_object_delfn_del(E_Object *obj, E_Object_Delfn *dfn) */ #ifdef OBJECT_HASH_CHECK -EAPI void +E_API void e_object_hash_init(void) { char *val; @@ -453,7 +453,7 @@ e_object_hash_init(void) } } -EAPI void +E_API void e_object_hash_shutdown(void) { E_FREE_FUNC(e_obj_hash, eina_hash_free); diff --git a/src/bin/e_object.h b/src/bin/e_object.h index f2a9597..30d3093 100644 --- a/src/bin/e_object.h +++ b/src/bin/e_object.h @@ -123,11 +123,11 @@ E_API void e_object_delfn_clear(E_Object *obj); E_API void e_object_ref_debug_set(E_Object *obj, Eina_Bool set); #ifdef OBJECT_HASH_CHECK -extern EAPI Eina_Bool e_obj_hash_check; -extern EAPI Eina_Hash *e_obj_hash; +extern E_API Eina_Bool e_obj_hash_check; +extern E_API Eina_Hash *e_obj_hash; -EAPI void e_object_hash_init (void); -EAPI void e_object_hash_shutdown (void); +E_API void e_object_hash_init (void); +E_API void e_object_hash_shutdown (void); static inline E_Object * e_object_hash_find(E_Object *obj) diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index b87b425..b19b72f 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -2,17 +2,14 @@ #ifdef HAVE_WAYLAND # include "e_comp_wl.h" -<<<<<<< HEAD # include #include -======= # ifndef EGL_TEXTURE_FORMAT # define EGL_TEXTURE_FORMAT 0x3080 # endif # ifndef EGL_TEXTURE_RGBA # define EGL_TEXTURE_RGBA 0x305E # endif ->>>>>>> upstream #endif #ifndef HAVE_WAYLAND_ONLY # include "e_comp_x.h" @@ -21,13 +18,10 @@ #include static Eina_Hash *pixmaps[2] = {NULL}; -<<<<<<< HEAD static Eina_Hash *deleted[2] = {NULL}; static Eina_Hash *res_ids = NULL; static uint32_t res_id = 0; -======= static Eina_Hash *aliases[2] = {NULL}; ->>>>>>> upstream struct _E_Pixmap { @@ -58,13 +52,10 @@ struct _E_Pixmap struct wl_listener buffer_destroy_listener; void *data; Eina_Rectangle opaque; -<<<<<<< HEAD + uuid_t uuid; E_Comp_Wl_Client_Data *cdata; Eina_Bool own_cdata : 1; -======= - uuid_t uuid; ->>>>>>> upstream #endif Eina_Bool usable : 1; @@ -72,7 +63,6 @@ struct _E_Pixmap Eina_Bool image_argb : 1; }; -<<<<<<< HEAD static int _e_pixmap_hooks_delete = 0; static int _e_pixmap_hooks_walking = 0; @@ -115,10 +105,7 @@ _e_pixmap_hook_call(E_Pixmap_Hook_Point hookpoint, E_Pixmap *cp) _e_pixmap_hooks_clean(); } -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) -======= #ifdef HAVE_WAYLAND ->>>>>>> upstream static void _e_pixmap_cb_buffer_destroy(struct wl_listener *listener, void *data EINA_UNUSED) { @@ -149,22 +136,9 @@ _e_pixmap_clear(E_Pixmap *cp, Eina_Bool cache) #endif break; case E_PIXMAP_TYPE_WL: -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - if (cp->buffer_destroy_listener.notify) - { - wl_list_remove(&cp->buffer_destroy_listener.link); - cp->buffer_destroy_listener.notify = NULL; - } - - e_comp_wl_buffer_reference(&cp->buffer_ref, NULL); - ELOG("PIXMAP CLEAR", cp, cp->client); - - (void)cache; -======= #ifdef HAVE_WAYLAND e_pixmap_image_clear(cp, cache); ->>>>>>> upstream + ELOG("PIXMAP CLEAR", cp, cp->client); #endif break; default: @@ -253,11 +227,7 @@ _e_pixmap_find(E_Pixmap_Type type, va_list *l) #ifndef HAVE_WAYLAND_ONLY Ecore_X_Window xwin; #endif -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) -======= #ifdef HAVE_WAYLAND ->>>>>>> upstream uintptr_t id; #endif E_Pixmap *cp; @@ -274,17 +244,11 @@ _e_pixmap_find(E_Pixmap_Type type, va_list *l) #endif break; case E_PIXMAP_TYPE_WL: -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - id = va_arg(*l, uintptr_t); - return eina_hash_find(pixmaps[type], &id); -======= #ifdef HAVE_WAYLAND id = va_arg(*l, uintptr_t); cp = eina_hash_find(aliases[type], &id); if (!cp) cp = eina_hash_find(pixmaps[type], &id); return cp; ->>>>>>> upstream #endif break; default: break; @@ -300,12 +264,8 @@ e_pixmap_free(E_Pixmap *cp) ELOG("PIXMAP DEL", cp, cp->client); _e_pixmap_hook_call(E_PIXMAP_HOOK_DEL, cp); e_pixmap_image_clear(cp, EINA_FALSE); -<<<<<<< HEAD - if (cp->parent) eina_hash_set(pixmaps[cp->type], &cp->parent, NULL); - eina_hash_del_by_key(res_ids, &cp->res_id); -======= ->>>>>>> upstream eina_hash_del_by_key(pixmaps[cp->type], &cp->win); + eina_hash_del_by_key(res_ids, &cp->res_id); if (e_pixmap_is_del(cp)) eina_hash_del_by_key(deleted[cp->type], &cp->win); @@ -315,8 +275,7 @@ e_pixmap_free(E_Pixmap *cp) return 0; } -<<<<<<< HEAD -EAPI void +E_API void e_pixmap_del(E_Pixmap *cp) { #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) @@ -330,7 +289,7 @@ e_pixmap_del(E_Pixmap *cp) #endif } -EAPI Eina_Bool +E_API Eina_Bool e_pixmap_is_del(E_Pixmap *cp) { #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) @@ -340,10 +299,7 @@ e_pixmap_is_del(E_Pixmap *cp) #endif } -EAPI E_Pixmap * -======= E_API E_Pixmap * ->>>>>>> upstream e_pixmap_ref(E_Pixmap *cp) { EINA_SAFETY_ON_NULL_RETURN_VAL(cp, NULL); @@ -359,11 +315,7 @@ e_pixmap_new(E_Pixmap_Type type, ...) #ifndef HAVE_WAYLAND_ONLY Ecore_X_Window xwin; #endif -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) -======= #ifdef HAVE_WAYLAND ->>>>>>> upstream uintptr_t id; #endif @@ -391,11 +343,7 @@ e_pixmap_new(E_Pixmap_Type type, ...) #endif break; case E_PIXMAP_TYPE_WL: -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) -======= #ifdef HAVE_WAYLAND ->>>>>>> upstream id = va_arg(l, uintptr_t); if (pixmaps[type]) { @@ -407,27 +355,22 @@ e_pixmap_new(E_Pixmap_Type type, ...) } } else -<<<<<<< HEAD { pixmaps[type] = eina_hash_pointer_new(NULL); deleted[type] = eina_hash_pointer_new((Eina_Free_Cb)_e_pixmap_free); } + cp = _e_pixmap_new(type); cp->win = id; eina_hash_add(pixmaps[type], &id, cp); + uuid_generate(cp->uuid); + if (!res_ids) res_ids = eina_hash_int32_new(NULL); cp->res_id = res_id; eina_hash_add(res_ids, &res_id, cp); res_id++; ELOG("PIXMAP NEW", cp, cp->client); -======= - pixmaps[type] = eina_hash_pointer_new((Eina_Free_Cb)_e_pixmap_free); - cp = _e_pixmap_new(type); - cp->win = id; - eina_hash_add(pixmaps[type], &id, cp); - uuid_generate(cp->uuid); ->>>>>>> upstream #endif break; default: break; @@ -710,8 +653,7 @@ e_pixmap_find_client(E_Pixmap_Type type, ...) return (!cp) ? NULL : cp->client; } -<<<<<<< HEAD -EAPI E_Client * +E_API E_Client * e_pixmap_find_client_by_res_id(uint32_t res_id) { E_Pixmap *cp; @@ -722,17 +664,14 @@ e_pixmap_find_client_by_res_id(uint32_t res_id) return (!cp) ? NULL : cp->client; } -EAPI uint32_t +E_API uint32_t e_pixmap_res_id_get(E_Pixmap *cp) { EINA_SAFETY_ON_NULL_RETURN_VAL(cp, 0); return cp->res_id; } -EAPI Ecore_Window -======= E_API uint64_t ->>>>>>> upstream e_pixmap_window_get(E_Pixmap *cp) { EINA_SAFETY_ON_NULL_RETURN_VAL(cp, 0); @@ -758,117 +697,8 @@ E_API void e_pixmap_resource_set(E_Pixmap *cp, void *resource) { if ((!cp) || (cp->type != E_PIXMAP_TYPE_WL)) return; -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - { - E_Comp_Wl_Buffer *buffer; - struct wl_shm_buffer *shm_buffer; - - buffer = (E_Comp_Wl_Buffer *)resource; - e_comp_wl_buffer_reference(&cp->buffer_ref, buffer); - - if (cp->buffer_destroy_listener.notify) - { - wl_list_remove(&cp->buffer_destroy_listener.link); - cp->buffer_destroy_listener.notify = NULL; - } - - cp->w = cp->h = 0; - cp->image_argb = EINA_FALSE; - - if (!buffer) return; - - if (buffer->type == E_COMP_WL_BUFFER_TYPE_SHM) - { - shm_buffer = wl_shm_buffer_get(buffer->resource); - if (!shm_buffer) - { - ERR("No shm_buffer resource:%u", wl_resource_get_id(buffer->resource)); - e_comp_wl_buffer_reference(&cp->buffer_ref, NULL); - return; - } - - buffer->shm_buffer = shm_buffer; - cp->w = buffer->w; - cp->h = buffer->h; - - switch (wl_shm_buffer_get_format(shm_buffer)) - { - case WL_SHM_FORMAT_ARGB8888: - cp->image_argb = EINA_TRUE; - break; - default: - cp->image_argb = EINA_FALSE; - break; - } - - cp->data = wl_shm_buffer_get_data(shm_buffer); - } - else if (buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE) - { - if (e_comp->gl) - { - buffer->shm_buffer = NULL; - cp->w = buffer->w; - cp->h = buffer->h; - cp->image_argb = EINA_FALSE; /* TODO: format */ - cp->data = NULL; - - /* TODO: Current buffer management process doesn't ensure - * to render all committed buffer, it means there are buffers - * never rendered. New attached buffer resources should be - * managed and be pending if previous buffer is not rendered yet. */ - /* set size of image object to new buffer size */ - e_comp_object_size_update(cp->client->frame, - buffer->w, buffer->h); - } - else - { - ERR("Invalid native buffer resource:%u", wl_resource_get_id(buffer->resource)); - e_comp_wl_buffer_reference(&cp->buffer_ref, NULL); - return; - } - - } - else if (buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO) - { - E_Comp_Wl_Data *wl_comp_data = (E_Comp_Wl_Data *)e_comp->wl_comp_data; - tbm_surface_h tbm_surf = wayland_tbm_server_get_surface(wl_comp_data->tbm.server, buffer->resource); - - buffer->shm_buffer = NULL; - cp->w = buffer->w; - cp->h = buffer->h; - switch (tbm_surface_get_format(tbm_surf)) - { - case TBM_FORMAT_ARGB8888: - cp->image_argb = EINA_TRUE; - break; - default: - cp->image_argb = EINA_FALSE; - break; - } - cp->data = NULL; - - if (wl_comp_data->available_hw_accel.underlay) - { - cp->client->argb = EINA_FALSE; - e_comp_object_mask_set(cp->client->frame, EINA_TRUE); - } - } - else - { - ERR("Invalid resource:%u", wl_resource_get_id(buffer->resource)); - e_comp_wl_buffer_reference(&cp->buffer_ref, NULL); - return; - } - - cp->buffer_destroy_listener.notify = _e_pixmap_cb_buffer_destroy; - wl_signal_add(&buffer->destroy_signal, &cp->buffer_destroy_listener); - } -======= #ifdef HAVE_WAYLAND cp->buffer = resource; ->>>>>>> upstream #else (void)resource; #endif @@ -901,24 +731,14 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns) #endif break; case E_PIXMAP_TYPE_WL: -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - if (cp->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE) +#ifdef HAVE_WAYLAND + if (cp->buffer) { ns->type = EVAS_NATIVE_SURFACE_WL; ns->version = EVAS_NATIVE_SURFACE_VERSION; - ns->data.wl.legacy_buffer = cp->buffer_ref.buffer->resource; - ret = EINA_TRUE; + ns->data.wl.legacy_buffer = cp->buffer->resource; + ret = !cp->buffer->shm_buffer; } - else - ret = EINA_FALSE; -======= -#ifdef HAVE_WAYLAND - ns->type = EVAS_NATIVE_SURFACE_WL; - ns->version = EVAS_NATIVE_SURFACE_VERSION; - ns->data.wl.legacy_buffer = cp->buffer->resource; - ret = !cp->buffer->shm_buffer; ->>>>>>> upstream #endif break; default: @@ -1041,10 +861,97 @@ e_pixmap_image_refresh(E_Pixmap *cp) cp->buffer_destroy_listener.notify = NULL; } + cp->w = cp->h = 0; + cp->image_argb = EINA_FALSE; + + if (!buffer) return; + + if (buffer->type == E_COMP_WL_BUFFER_TYPE_SHM) + { + shm_buffer = wl_shm_buffer_get(buffer->resource); + if (!shm_buffer) + { + ERR("No shm_buffer resource:%u", wl_resource_get_id(buffer->resource)); + e_comp_wl_buffer_reference(&cp->buffer_ref, NULL); + return; + } + + buffer->shm_buffer = shm_buffer; + cp->w = buffer->w; + cp->h = buffer->h; + + switch (wl_shm_buffer_get_format(shm_buffer)) + { + case WL_SHM_FORMAT_ARGB8888: + cp->image_argb = EINA_TRUE; + break; + default: + cp->image_argb = EINA_FALSE; + break; + } + + cp->data = wl_shm_buffer_get_data(shm_buffer); + } + else if (buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE) + { + if (e_comp->gl) + { + buffer->shm_buffer = NULL; + cp->w = buffer->w; + cp->h = buffer->h; + cp->image_argb = EINA_FALSE; /* TODO: format */ + cp->data = NULL; + + /* TODO: Current buffer management process doesn't ensure + * to render all committed buffer, it means there are buffers + * never rendered. New attached buffer resources should be + * managed and be pending if previous buffer is not rendered yet. */ + /* set size of image object to new buffer size */ + e_comp_object_size_update(cp->client->frame, + buffer->w, buffer->h); + } + else + { + ERR("Invalid native buffer resource:%u", wl_resource_get_id(buffer->resource)); + e_comp_wl_buffer_reference(&cp->buffer_ref, NULL); + return; + } + + } + else if (buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO) + { + E_Comp_Wl_Data *wl_comp_data = (E_Comp_Wl_Data *)e_comp->wl_comp_data; + tbm_surface_h tbm_surf = wayland_tbm_server_get_surface(wl_comp_data->tbm.server, buffer->resource); + + buffer->shm_buffer = NULL; + cp->w = buffer->w; + cp->h = buffer->h; + switch (tbm_surface_get_format(tbm_surf)) + { + case TBM_FORMAT_ARGB8888: + cp->image_argb = EINA_TRUE; + break; + default: + cp->image_argb = EINA_FALSE; + break; + } + cp->data = NULL; + + if (wl_comp_data->available_hw_accel.underlay) + { + cp->client->argb = EINA_FALSE; + e_comp_object_mask_set(cp->client->frame, EINA_TRUE); + } + } + else + { + ERR("Invalid resource:%u", wl_resource_get_id(buffer->resource)); + e_comp_wl_buffer_reference(&cp->buffer_ref, NULL); + return; + } + cp->buffer_destroy_listener.notify = _e_pixmap_cb_buffer_destroy; wl_signal_add(&buffer->destroy_signal, &cp->buffer_destroy_listener); - if (shm_buffer) - cp->data = wl_shm_buffer_get_data(shm_buffer); return EINA_TRUE; } #endif @@ -1196,8 +1103,7 @@ e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r) return EINA_FALSE; } -<<<<<<< HEAD -EAPI Eina_Bool +E_API Eina_Bool e_pixmap_validate_check(const E_Pixmap *cp) { Eina_Bool success = EINA_FALSE; @@ -1229,7 +1135,7 @@ e_pixmap_validate_check(const E_Pixmap *cp) return success; } -EAPI void +E_API void e_pixmap_image_draw_done(E_Pixmap *cp) { EINA_SAFETY_ON_NULL_RETURN(cp); @@ -1237,6 +1143,9 @@ e_pixmap_image_draw_done(E_Pixmap *cp) #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) struct wl_shm_buffer *shm_buffer; + if (!cp->buffer_ref.buffer) + return; + shm_buffer = wl_shm_buffer_get(cp->buffer_ref.buffer->resource); if (!shm_buffer) return; @@ -1244,10 +1153,7 @@ e_pixmap_image_draw_done(E_Pixmap *cp) #endif } -EAPI void -======= E_API void ->>>>>>> upstream e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h) { EINA_SAFETY_ON_NULL_RETURN(cp); @@ -1278,8 +1184,7 @@ e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h) #endif } -<<<<<<< HEAD -EAPI E_Comp_Client_Data * +E_API E_Comp_Client_Data * e_pixmap_cdata_get(E_Pixmap *cp) { EINA_SAFETY_ON_NULL_RETURN_VAL(cp, NULL); @@ -1291,7 +1196,7 @@ e_pixmap_cdata_get(E_Pixmap *cp) #endif } -EAPI void +E_API void e_pixmap_cdata_set(E_Pixmap *cp, E_Comp_Client_Data *cdata) { #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) @@ -1320,7 +1225,7 @@ e_pixmap_cdata_set(E_Pixmap *cp, E_Comp_Client_Data *cdata) #endif } -EAPI E_Pixmap_Hook * +E_API E_Pixmap_Hook * e_pixmap_hook_add(E_Pixmap_Hook_Point hookpoint, E_Pixmap_Hook_Cb func, const void *data) { E_Pixmap_Hook *ph; @@ -1336,7 +1241,7 @@ e_pixmap_hook_add(E_Pixmap_Hook_Point hookpoint, E_Pixmap_Hook_Cb func, const vo return ph; } -EAPI void +E_API void e_pixmap_hook_del(E_Pixmap_Hook *ph) { ph->delete_me = 1; @@ -1348,7 +1253,8 @@ e_pixmap_hook_del(E_Pixmap_Hook *ph) } else _e_pixmap_hooks_delete++; -======= +} + E_API void e_pixmap_alias(E_Pixmap *cp, E_Pixmap_Type type, ...) { @@ -1382,5 +1288,4 @@ e_pixmap_alias(E_Pixmap *cp, E_Pixmap_Type type, ...) default: break; } va_end(l); ->>>>>>> upstream } diff --git a/src/bin/e_pixmap.h b/src/bin/e_pixmap.h index 1589d92..77b0471 100644 --- a/src/bin/e_pixmap.h +++ b/src/bin/e_pixmap.h @@ -13,7 +13,6 @@ typedef enum # ifndef E_PIXMAP_H # define E_PIXMAP_H -<<<<<<< HEAD typedef struct _E_Pixmap_Hook E_Pixmap_Hook; typedef enum _E_Pixmap_Hook_Point @@ -34,56 +33,15 @@ struct _E_Pixmap_Hook unsigned char delete_me : 1; }; -EAPI int e_pixmap_free(E_Pixmap *cp); -EAPI void e_pixmap_del(E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_is_del(E_Pixmap *cp); -EAPI E_Pixmap *e_pixmap_ref(E_Pixmap *cp); -EAPI E_Pixmap *e_pixmap_new(E_Pixmap_Type type, ...); -EAPI E_Pixmap_Type e_pixmap_type_get(const E_Pixmap *cp); -EAPI void *e_pixmap_resource_get(E_Pixmap *cp); -EAPI E_Comp_Client_Data *e_pixmap_cdata_get(E_Pixmap *cp); -EAPI void e_pixmap_cdata_set(E_Pixmap *cp, E_Comp_Client_Data *cdata); -EAPI void e_pixmap_resource_set(E_Pixmap *cp, void *resource); -EAPI void e_pixmap_parent_window_set(E_Pixmap *cp, Ecore_Window win); -EAPI void e_pixmap_visual_cmap_set(E_Pixmap *cp, void *visual, unsigned int cmap); -EAPI unsigned int e_pixmap_failures_get(const E_Pixmap *cp); -EAPI void *e_pixmap_visual_get(const E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_dirty_get(E_Pixmap *cp); -EAPI void e_pixmap_clear(E_Pixmap *cp); -EAPI void e_pixmap_usable_set(E_Pixmap *cp, Eina_Bool set); -EAPI Eina_Bool e_pixmap_usable_get(const E_Pixmap *cp); -EAPI void e_pixmap_dirty(E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_refresh(E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_size_changed(E_Pixmap *cp, int w, int h); -EAPI Eina_Bool e_pixmap_size_get(E_Pixmap *cp, int *w, int *h); -EAPI void e_pixmap_client_set(E_Pixmap *cp, E_Client *ec); -EAPI E_Client *e_pixmap_client_get(E_Pixmap *cp); -EAPI E_Pixmap *e_pixmap_find(E_Pixmap_Type type, ...); -EAPI E_Client *e_pixmap_find_client(E_Pixmap_Type type, ...); -EAPI E_Client *e_pixmap_find_client_by_res_id(uint32_t res_id); -EAPI uint32_t e_pixmap_res_id_get(E_Pixmap *cp); -EAPI Ecore_Window e_pixmap_window_get(E_Pixmap *cp); -EAPI Ecore_Window e_pixmap_parent_window_get(E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns); -EAPI void e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache); -EAPI Eina_Bool e_pixmap_image_refresh(E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_image_exists(const E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_image_is_argb(const E_Pixmap *cp); -EAPI void *e_pixmap_image_data_get(E_Pixmap *cp); -EAPI Eina_Bool e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Rectangle *r, int stride); -EAPI Eina_Bool e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r); -EAPI Eina_Bool e_pixmap_validate_check(const E_Pixmap *cp); - -EAPI void e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h); -EAPI void e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h); -EAPI E_Pixmap_Hook *e_pixmap_hook_add(E_Pixmap_Hook_Point hookpoint, E_Pixmap_Hook_Cb func, const void *data); -EAPI void e_pixmap_hook_del(E_Pixmap_Hook *ph); -======= E_API int e_pixmap_free(E_Pixmap *cp); +E_API void e_pixmap_del(E_Pixmap *cp); +E_API Eina_Bool e_pixmap_is_del(E_Pixmap *cp); E_API E_Pixmap *e_pixmap_ref(E_Pixmap *cp); E_API E_Pixmap *e_pixmap_new(E_Pixmap_Type type, ...); E_API E_Pixmap_Type e_pixmap_type_get(const E_Pixmap *cp); E_API void *e_pixmap_resource_get(E_Pixmap *cp); +E_API E_Comp_Client_Data *e_pixmap_cdata_get(E_Pixmap *cp); +E_API void e_pixmap_cdata_set(E_Pixmap *cp, E_Comp_Client_Data *cdata); E_API void e_pixmap_resource_set(E_Pixmap *cp, void *resource); E_API void e_pixmap_parent_window_set(E_Pixmap *cp, Ecore_Window win); E_API void e_pixmap_visual_cmap_set(E_Pixmap *cp, void *visual, unsigned int cmap); @@ -102,6 +60,8 @@ E_API void e_pixmap_client_set(E_Pixmap *cp, E_Client *ec); E_API E_Client *e_pixmap_client_get(E_Pixmap *cp); E_API E_Pixmap *e_pixmap_find(E_Pixmap_Type type, ...); E_API E_Client *e_pixmap_find_client(E_Pixmap_Type type, ...); +E_API E_Client *e_pixmap_find_client_by_res_id(uint32_t res_id); +E_API uint32_t e_pixmap_res_id_get(E_Pixmap *cp); E_API uint64_t e_pixmap_window_get(E_Pixmap *cp); E_API Ecore_Window e_pixmap_parent_window_get(E_Pixmap *cp); E_API Eina_Bool e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns); @@ -112,12 +72,15 @@ E_API Eina_Bool e_pixmap_image_is_argb(const E_Pixmap *cp); E_API void *e_pixmap_image_data_get(E_Pixmap *cp); E_API Eina_Bool e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Rectangle *r, int stride); E_API Eina_Bool e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r); +E_API Eina_Bool e_pixmap_validate_check(const E_Pixmap *cp); E_API void e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h); E_API void e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h); E_API void e_pixmap_alias(E_Pixmap *cp, E_Pixmap_Type type, ...); ->>>>>>> upstream + +E_API E_Pixmap_Hook *e_pixmap_hook_add(E_Pixmap_Hook_Point hookpoint, E_Pixmap_Hook_Cb func, const void *data); +E_API void e_pixmap_hook_del(E_Pixmap_Hook *ph); static inline Eina_Bool e_pixmap_is_x(const E_Pixmap *cp) diff --git a/src/bin/e_pointer.c b/src/bin/e_pointer.c index 397e888..67be490 100644 --- a/src/bin/e_pointer.c +++ b/src/bin/e_pointer.c @@ -583,13 +583,9 @@ e_pointers_size_set(int size) E_API void e_pointer_hide(E_Pointer *ptr) { -<<<<<<< HEAD EINA_SAFETY_ON_NULL_RETURN(ptr); - if ((ptr->evas) && (!ptr->canvas)) -======= if (ptr->buffer_evas) ->>>>>>> upstream _e_pointer_canvas_del(ptr); if (ptr->canvas) evas_object_hide(ptr->o_ptr); @@ -803,11 +799,7 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y) { if (o == obj) { -<<<<<<< HEAD - ecore_evas_object_cursor_set(ptr->ee, obj, EVAS_LAYER_MAX, x, y); -======= ecore_evas_object_cursor_set(ptr->ee, obj, E_LAYER_MAX - 1, x, y); ->>>>>>> upstream return; } ec = e_comp_object_client_get(o); @@ -823,13 +815,7 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y) ec->hidden = 1; ecore_evas_object_cursor_set(ptr->ee, obj, E_LAYER_MAX - 1, x, y); } -<<<<<<< HEAD else if (ptr->o_ptr) - { - ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, EVAS_LAYER_MAX, ptr->hot.x, ptr->hot.y); - } -======= - else ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, E_LAYER_MAX - 1, ptr->hot.x, ptr->hot.y); } @@ -841,5 +827,4 @@ e_pointer_window_add(E_Pointer *ptr, Ecore_Window win) ptr->win = win; _e_pointer_theme_buf(ptr, buf); _e_pointer_x11_setup(ptr, buf); ->>>>>>> upstream } diff --git a/src/bin/e_scale.c b/src/bin/e_scale.c index 761f144..8d6526b 100644 --- a/src/bin/e_scale.c +++ b/src/bin/e_scale.c @@ -1,12 +1,8 @@ #include "e.h" -<<<<<<< HEAD -EAPI double e_scale = 1.0; +E_API double e_scale = 1.0; static Eina_Bool _initted = EINA_FALSE; static int _dpi = -1; -======= -E_API double e_scale = 1.0; ->>>>>>> upstream EINTERN int e_scale_init(void) @@ -61,7 +57,7 @@ e_scale_update(void) e_hints_scale_update(); } -EAPI void +E_API void e_scale_manual_update(int dpi) { char buf[128]; diff --git a/src/bin/e_scale.h b/src/bin/e_scale.h index 3682d07..ae5e637 100644 --- a/src/bin/e_scale.h +++ b/src/bin/e_scale.h @@ -5,12 +5,8 @@ EINTERN int e_scale_init(void); EINTERN int e_scale_shutdown(void); -<<<<<<< HEAD -EAPI void e_scale_update(void); -EAPI void e_scale_manual_update(int dpi); -======= E_API void e_scale_update(void); ->>>>>>> upstream +E_API void e_scale_manual_update(int dpi); extern E_API double e_scale; diff --git a/src/bin/e_signals.c b/src/bin/e_signals.c index 4ace7f7..9f1668d 100644 --- a/src/bin/e_signals.c +++ b/src/bin/e_signals.c @@ -5,15 +5,10 @@ */ #include "e.h" -<<<<<<< HEAD -#ifdef HAVE_WAYLAND_ONLY -#include -======= #ifdef HAVE_WAYLAND # ifdef HAVE_WL_DRM #include # endif ->>>>>>> upstream #endif #ifdef HAVE_EXECINFO_H @@ -73,24 +68,6 @@ _e_write_safe_int(int fd, const char *buf, size_t size) static void _e_crash(void) { -<<<<<<< HEAD -#ifdef HAVE_WAYLAND_ONLY - Eina_List *list, *l, *ll; - Ecore_Drm_Device *dev; - - list = ecore_drm_devices_get(); - EINA_LIST_FOREACH_SAFE(list, l, ll, dev) - { - ecore_drm_inputs_destroy(dev); - ecore_drm_sprites_destroy(dev); - ecore_drm_device_close(dev); - ecore_drm_launcher_disconnect(dev); - ecore_drm_device_free(dev); - } - - ecore_drm_shutdown(); -#else -======= #ifdef HAVE_WAYLAND if (e_comp->comp_type == E_PIXMAP_TYPE_WL) { @@ -115,7 +92,6 @@ _e_crash(void) } #endif #ifndef HAVE_WAYLAND_ONLY ->>>>>>> upstream _e_x_composite_shutdown(); ecore_x_pointer_ungrab(); ecore_x_keyboard_ungrab(); @@ -155,95 +131,17 @@ e_sigill_act(int x EINA_UNUSED, siginfo_t *info EINA_UNUSED, void *data EINA_UNU E_API void e_sigfpe_act(int x EINA_UNUSED, siginfo_t *info EINA_UNUSED, void *data EINA_UNUSED) { -<<<<<<< HEAD -#ifdef HAVE_WAYLAND_ONLY - Eina_List *list, *l, *ll; - Ecore_Drm_Device *dev; - - list = ecore_drm_devices_get(); - EINA_LIST_FOREACH_SAFE(list, l, ll, dev) - { - ecore_drm_inputs_destroy(dev); - ecore_drm_sprites_destroy(dev); - ecore_drm_device_close(dev); - ecore_drm_launcher_disconnect(dev); - ecore_drm_device_free(dev); - } - - ecore_drm_shutdown(); -#else - _e_x_composite_shutdown(); - ecore_x_pointer_ungrab(); - ecore_x_keyboard_ungrab(); - ecore_x_ungrab(); - ecore_x_sync(); - e_alert_show(); -#endif -======= _e_crash(); ->>>>>>> upstream } E_API void e_sigbus_act(int x EINA_UNUSED, siginfo_t *info EINA_UNUSED, void *data EINA_UNUSED) { -<<<<<<< HEAD -#ifdef HAVE_WAYLAND_ONLY - Eina_List *list, *l, *ll; - Ecore_Drm_Device *dev; - - list = ecore_drm_devices_get(); - EINA_LIST_FOREACH_SAFE(list, l, ll, dev) - { - ecore_drm_inputs_destroy(dev); - ecore_drm_sprites_destroy(dev); - ecore_drm_device_close(dev); - ecore_drm_launcher_disconnect(dev); - ecore_drm_device_free(dev); - } - - ecore_drm_shutdown(); -#else - _e_x_composite_shutdown(); - ecore_x_pointer_ungrab(); - ecore_x_keyboard_ungrab(); - ecore_x_ungrab(); - ecore_x_sync(); - e_alert_show(); -#endif -======= _e_crash(); ->>>>>>> upstream } E_API void e_sigabrt_act(int x EINA_UNUSED, siginfo_t *info EINA_UNUSED, void *data EINA_UNUSED) { -<<<<<<< HEAD -#ifdef HAVE_WAYLAND_ONLY - Eina_List *list, *l, *ll; - Ecore_Drm_Device *dev; - - list = ecore_drm_devices_get(); - EINA_LIST_FOREACH_SAFE(list, l, ll, dev) - { - ecore_drm_inputs_destroy(dev); - ecore_drm_sprites_destroy(dev); - ecore_drm_device_close(dev); - ecore_drm_launcher_disconnect(dev); - ecore_drm_device_free(dev); - } - - ecore_drm_shutdown(); -#else - _e_x_composite_shutdown(); - ecore_x_pointer_ungrab(); - ecore_x_keyboard_ungrab(); - ecore_x_ungrab(); - ecore_x_sync(); - e_alert_show(); -#endif -======= _e_crash(); ->>>>>>> upstream } diff --git a/src/bin/e_win.c b/src/bin/e_win.c index 1ab9b8a..896d39b 100644 --- a/src/bin/e_win.c +++ b/src/bin/e_win.c @@ -70,22 +70,13 @@ _e_elm_win_trap_show(void *data, Evas_Object *o) { E_Client *ec; Ecore_Window win; -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - uintptr_t wl_win_id = NULL; -======= #ifdef HAVE_WAYLAND - uintptr_t wl_win_id; ->>>>>>> upstream + uintptr_t wl_win_id = NULL; #endif E_Pixmap_Type type = E_PIXMAP_TYPE_X; win = elm_win_window_id_get(o); -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) -======= #ifdef HAVE_WAYLAND ->>>>>>> upstream if (!strncmp(ecore_evas_engine_name_get(ee), "wayland", 7)) { type = E_PIXMAP_TYPE_WL; @@ -102,18 +93,10 @@ _e_elm_win_trap_show(void *data, Evas_Object *o) } #ifdef HAVE_WAYLAND - if (type == E_PIXMAP_TYPE_WL) - ec = e_pixmap_find_client(type, wl_win_id); - else -#endif -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) if ((type == E_PIXMAP_TYPE_WL) && (wl_win_id)) ec = e_pixmap_find_client(type, wl_win_id); else #endif -======= ->>>>>>> upstream ec = e_pixmap_find_client(type, win); if (ec) ctx->client = ec; @@ -130,8 +113,7 @@ _e_elm_win_trap_show(void *data, Evas_Object *o) if ((!title) || (!title[0])) title = "E"; ecore_evas_title_set(ee, title); -<<<<<<< HEAD -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) +#ifdef HAVE_WAYLAND if (type == E_PIXMAP_TYPE_WL) { if ((cp = e_pixmap_find(type, wl_win_id))) @@ -144,12 +126,6 @@ _e_elm_win_trap_show(void *data, Evas_Object *o) if (!cp) cp = e_pixmap_new(type, wl_win_id); } -======= - -#ifdef HAVE_WAYLAND - if (type == E_PIXMAP_TYPE_WL) - cp = e_pixmap_new(type, wl_win_id); ->>>>>>> upstream else #endif cp = e_pixmap_new(type, win); diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index 5286054..d73681e 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -19,24 +19,6 @@ static void _e_zone_object_del_attach(void *o); static E_Zone_Edge _e_zone_detect_edge(E_Zone *zone, Evas_Object *obj); static void _e_zone_edge_move_resize(E_Zone *zone); -<<<<<<< HEAD -EAPI int E_EVENT_ZONE_DESK_COUNT_SET = 0; -EAPI int E_EVENT_POINTER_WARP = 0; -EAPI int E_EVENT_ZONE_MOVE_RESIZE = 0; -EAPI int E_EVENT_ZONE_ADD = 0; -EAPI int E_EVENT_ZONE_DEL = 0; -EAPI int E_EVENT_ZONE_EDGE_IN = 0; -EAPI int E_EVENT_ZONE_EDGE_OUT = 0; -EAPI int E_EVENT_ZONE_EDGE_MOVE = 0; -EAPI int E_EVENT_ZONE_STOW = 0; -EAPI int E_EVENT_ZONE_UNSTOW = 0; -#ifdef _F_ZONE_WINDOW_ROTATION_ -EAPI int E_EVENT_ZONE_ROTATION_CHANGE_BEGIN = 0; -EAPI int E_EVENT_ZONE_ROTATION_CHANGE_CANCEL = 0; -EAPI int E_EVENT_ZONE_ROTATION_CHANGE_END = 0; -#endif -EAPI int E_EVENT_ZONE_DISPLAY_STATE_CHANGE = 0; -======= E_API int E_EVENT_ZONE_DESK_COUNT_SET = 0; E_API int E_EVENT_POINTER_WARP = 0; E_API int E_EVENT_ZONE_MOVE_RESIZE = 0; @@ -47,7 +29,12 @@ E_API int E_EVENT_ZONE_EDGE_OUT = 0; E_API int E_EVENT_ZONE_EDGE_MOVE = 0; E_API int E_EVENT_ZONE_STOW = 0; E_API int E_EVENT_ZONE_UNSTOW = 0; ->>>>>>> upstream +#ifdef _F_ZONE_WINDOW_ROTATION_ +E_API int E_EVENT_ZONE_ROTATION_CHANGE_BEGIN = 0; +E_API int E_EVENT_ZONE_ROTATION_CHANGE_CANCEL = 0; +E_API int E_EVENT_ZONE_ROTATION_CHANGE_END = 0; +#endif +E_API int E_EVENT_ZONE_DISPLAY_STATE_CHANGE = 0; #define E_ZONE_FLIP_LEFT(zone) (((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || ((zone)->desk_x_current > 0)) && (zone)->edge.left) #define E_ZONE_FLIP_RIGHT(zone) (((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || (((zone)->desk_x_current + 1) < (zone)->desk_x_count)) && (zone)->edge.right) @@ -1459,7 +1446,7 @@ e_zone_unstow(E_Zone *zone) zone->stowed = EINA_FALSE; } -EAPI void +E_API void e_zone_display_state_set(E_Zone *zone, E_Zone_Display_State state) { E_Event_Zone_Display_State_Change *ev; @@ -1476,7 +1463,7 @@ e_zone_display_state_set(E_Zone *zone, E_Zone_Display_State state) ecore_event_add(E_EVENT_ZONE_DISPLAY_STATE_CHANGE, ev, _e_zone_event_generic_free, NULL); } -EAPI E_Zone_Display_State +E_API E_Zone_Display_State e_zone_display_state_get(E_Zone *zone) { E_OBJECT_CHECK_RETURN(zone, E_ZONE_DISPLAY_STATE_OFF); diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h index 43d5249..e0804cf 100644 --- a/src/bin/e_zone.h +++ b/src/bin/e_zone.h @@ -101,7 +101,6 @@ struct _E_Zone Eina_Bool dirty : 1; } useful_geometry; Eina_Bool stowed : 1; -<<<<<<< HEAD #ifdef _F_ZONE_WINDOW_ROTATION_ struct { @@ -115,9 +114,7 @@ struct _E_Zone #endif E_Zone_Display_State display_state; -======= char *randr2_id; // same id we get from randr2 so look it up there ->>>>>>> upstream }; struct _E_Event_Zone_Generic @@ -171,52 +168,6 @@ struct _E_Event_Zone_Display_State_Change EINTERN int e_zone_init(void); EINTERN int e_zone_shutdown(void); -<<<<<<< HEAD -EAPI E_Zone *e_zone_new(E_Comp *con, int num, int id, int x, int y, int w, int h); -EAPI void e_zone_name_set(E_Zone *zone, const char *name); -EAPI void e_zone_move(E_Zone *zone, int x, int y); -EAPI void e_zone_resize(E_Zone *zone, int w, int h); -EAPI Eina_Bool e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h); -EAPI E_Zone *e_zone_current_get(E_Comp *c); -EAPI void e_zone_bg_reconfigure(E_Zone *zone); -EAPI void e_zone_flip_coords_handle(E_Zone *zone, int x, int y); -EAPI void e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count); -EAPI void e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count); -EAPI void e_zone_desk_flip_by(E_Zone *zone, int dx, int dy); -EAPI void e_zone_desk_flip_to(E_Zone *zone, int x, int y); -EAPI void e_zone_desk_linear_flip_by(E_Zone *zone, int dx); -EAPI void e_zone_desk_linear_flip_to(E_Zone *zone, int x); -EAPI void e_zone_edge_flip_eval(E_Zone *zone); -EAPI void e_zone_edge_new(E_Zone_Edge edge); -EAPI void e_zone_edge_free(E_Zone_Edge edge); -EAPI void e_zone_edge_enable(void); -EAPI void e_zone_edge_disable(void); -EAPI void e_zone_edges_desk_flip_capable(E_Zone *zone, Eina_Bool l, Eina_Bool r, Eina_Bool t, Eina_Bool b); -EAPI Eina_Bool e_zone_exists_direction(E_Zone *zone, E_Zone_Edge edge); -EAPI void e_zone_edge_win_layer_set(E_Zone *zone, E_Layer layer); - -EAPI void e_zone_useful_geometry_dirty(E_Zone *zone); -EAPI void e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h); -EAPI void e_zone_desk_useful_geometry_get(const E_Zone *zone, const E_Desk *desk, int *x, int *y, int *w, int *h); -EAPI void e_zone_stow(E_Zone *zone); -EAPI void e_zone_unstow(E_Zone *zone); - -EAPI void e_zone_fade_handle(E_Zone *zone, int out, double tim); - -EAPI void e_zone_display_state_set(E_Zone *zone, E_Zone_Display_State state); -EAPI E_Zone_Display_State e_zone_display_state_get(E_Zone *zone); - -extern EAPI int E_EVENT_ZONE_DESK_COUNT_SET; -extern EAPI int E_EVENT_ZONE_MOVE_RESIZE; -extern EAPI int E_EVENT_ZONE_ADD; -extern EAPI int E_EVENT_ZONE_DEL; -extern EAPI int E_EVENT_POINTER_WARP; -extern EAPI int E_EVENT_ZONE_EDGE_IN; -extern EAPI int E_EVENT_ZONE_EDGE_OUT; -extern EAPI int E_EVENT_ZONE_EDGE_MOVE; -extern EAPI int E_EVENT_ZONE_STOW; -extern EAPI int E_EVENT_ZONE_UNSTOW; -======= E_API E_Zone *e_zone_new(int num, int id, int x, int y, int w, int h); E_API void e_zone_name_set(E_Zone *zone, const char *name); E_API void e_zone_move(E_Zone *zone, int x, int y); @@ -248,6 +199,9 @@ E_API void e_zone_unstow(E_Zone *zone); E_API void e_zone_fade_handle(E_Zone *zone, int out, double tim); +E_API void e_zone_display_state_set(E_Zone *zone, E_Zone_Display_State state); +E_API E_Zone_Display_State e_zone_display_state_get(E_Zone *zone); + extern E_API int E_EVENT_ZONE_DESK_COUNT_SET; extern E_API int E_EVENT_ZONE_MOVE_RESIZE; extern E_API int E_EVENT_ZONE_ADD; @@ -258,15 +212,14 @@ extern E_API int E_EVENT_ZONE_EDGE_OUT; extern E_API int E_EVENT_ZONE_EDGE_MOVE; extern E_API int E_EVENT_ZONE_STOW; extern E_API int E_EVENT_ZONE_UNSTOW; ->>>>>>> upstream #ifdef _F_ZONE_WINDOW_ROTATION_ -extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_BEGIN; -extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_CANCEL; -extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_END; +extern E_API int E_EVENT_ZONE_ROTATION_CHANGE_BEGIN; +extern E_API int E_EVENT_ZONE_ROTATION_CHANGE_CANCEL; +extern E_API int E_EVENT_ZONE_ROTATION_CHANGE_END; #endif -extern EAPI int E_EVENT_ZONE_DISPLAY_STATE_CHANGE; +extern E_API int E_EVENT_ZONE_DISPLAY_STATE_CHANGE; #endif #endif diff --git a/src/modules/Makefile.mk b/src/modules/Makefile.mk index b93c934..b9ddfdf 100644 --- a/src/modules/Makefile.mk +++ b/src/modules/Makefile.mk @@ -117,13 +117,6 @@ include src/modules/Makefile_wl_x11.mk #include src/modules/Makefile_wl_fb.mk -<<<<<<< HEAD -include src/modules/Makefile_wl_screenshot.mk - -include src/modules/Makefile_policy_mobile.mk - -include src/modules/Makefile_bufferqueue.mk -======= include src/modules/Makefile_xwayland.mk include src/modules/Makefile_wl_text_input.mk @@ -133,4 +126,5 @@ include src/modules/Makefile_wl_weekeyboard.mk include src/modules/Makefile_policy_mobile.mk include src/modules/Makefile_geolocation.mk ->>>>>>> upstream + +include src/modules/Makefile_bufferqueue.mk diff --git a/src/modules/Makefile_music_control.mk b/src/modules/Makefile_music_control.mk index f06e514..bac89ab 100644 --- a/src/modules/Makefile_music_control.mk +++ b/src/modules/Makefile_music_control.mk @@ -1,11 +1,7 @@ EXTRA_DIST += src/modules/music-control/module.desktop.in \ -<<<<<<< HEAD -src/modules/music-control/e-module-music-control.edj -======= src/modules/music-control/e-module-music-control.edj \ src/modules/music-control/introspect.xml ->>>>>>> upstream if USE_MODULE_MUSIC_CONTROL music_controldir = $(MDIR)/music-control music_control_DATA = src/modules/music-control/module.desktop \ diff --git a/src/modules/Makefile_wl_desktop_shell.mk b/src/modules/Makefile_wl_desktop_shell.mk index 98aa9be..6ab2d67 100644 --- a/src/modules/Makefile_wl_desktop_shell.mk +++ b/src/modules/Makefile_wl_desktop_shell.mk @@ -1,14 +1,6 @@ EXTRA_DIST += src/modules/wl_desktop_shell/module.desktop.in \ src/modules/wl_desktop_shell/e-module-wl_desktop_shell.edj \ -<<<<<<< HEAD src/modules/wl_desktop_shell/module.desktop.in -======= -src/modules/wl_desktop_shell/module.desktop.in \ -src/modules/wl_desktop_shell/e_input_method_protocol.h \ -src/modules/wl_desktop_shell/e_input_method_protocol.c \ -src/modules/wl_desktop_shell/e_desktop_shell_protocol.h \ -src/modules/wl_desktop_shell/e_desktop_shell_protocol.c ->>>>>>> upstream if USE_MODULE_WL_DESKTOP_SHELL wl_desktop_shelldir = $(MDIR)/wl_desktop_shell wl_desktop_shell_DATA = src/modules/wl_desktop_shell/e-module-wl_desktop_shell.edj \ @@ -24,17 +16,10 @@ src_modules_wl_desktop_shell_module_la_LDFLAGS = $(MOD_LDFLAGS) src_modules_wl_desktop_shell_module_la_SOURCES = \ src/modules/wl_desktop_shell/e_mod_main.c \ -<<<<<<< HEAD - src/modules/wl_desktop_shell/e_scaler.c \ - src/modules/wl_desktop_shell/e_scaler.h -======= src/modules/wl_desktop_shell/e_mod_main.h \ src/modules/wl_desktop_shell/e_mod_input_panel.c \ - src/modules/wl_desktop_shell/e_input_method_protocol.c \ - src/modules/wl_desktop_shell/e_input_method_protocol.h \ - src/modules/wl_desktop_shell/e_desktop_shell_protocol.c \ - src/modules/wl_desktop_shell/e_desktop_shell_protocol.h ->>>>>>> upstream + src/modules/wl_desktop_shell/e_scaler.c \ + src/modules/wl_desktop_shell/e_scaler.h PHONIES += wl_desktop_shell install-wl_desktop_shell wl_desktop_shell: $(wl_desktop_shellpkg_LTLIBRARIES) $(wl_desktop_shell_DATA) diff --git a/src/modules/Makefile_wl_screenshot.mk b/src/modules/Makefile_wl_screenshot.mk deleted file mode 100644 index 2cf0f78..0000000 --- a/src/modules/Makefile_wl_screenshot.mk +++ /dev/null @@ -1,27 +0,0 @@ -EXTRA_DIST += src/modules/wl_screenshot/module.desktop.in \ -src/modules/wl_screenshot/e-module-wl_screenshot.edj \ -src/modules/wl_screenshot/e_screenshooter_server.h \ -src/modules/wl_screenshot/e_screenshooter_server.c - -if USE_MODULE_WL_SCREENSHOT -wl_screenshotdir = $(MDIR)/wl_screenshot -wl_screenshot_DATA = src/modules/wl_screenshot/e-module-wl_screenshot.edj \ - src/modules/wl_screenshot/module.desktop - -wl_screenshotpkgdir = $(MDIR)/wl_screenshot/$(MODULE_ARCH) -wl_screenshotpkg_LTLIBRARIES = src/modules/wl_screenshot/module.la - -src_modules_wl_screenshot_module_la_DEPENDENCIES = $(MDEPENDENCIES) -src_modules_wl_screenshot_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_SCREENSHOT_CFLAGS@ @WAYLAND_CFLAGS@ -DNEED_WL -src_modules_wl_screenshot_module_la_LIBADD = $(LIBS) @WL_SCREENSHOT_LIBS@ @WAYLAND_LIBS@ -src_modules_wl_screenshot_module_la_LDFLAGS = $(MOD_LDFLAGS) - -src_modules_wl_screenshot_module_la_SOURCES = src/modules/wl_screenshot/e_mod_main.c \ - src/modules/wl_screenshot/e_mod_main.h \ - src/modules/wl_screenshot/e_screenshooter_server.h \ - src/modules/wl_screenshot/e_screenshooter_server.c - -PHONIES += wl_screenshot install-wl_screenshot -wl_screenshot: $(wl_screenshotpkg_LTLIBRARIES) $(wl_screenshot_DATA) -install-wl_screenshot: install-wl_screenshotDATA install-wl_screenshotpkgLTLIBRARIES -endif diff --git a/src/modules/bufferqueue/e_mod_main.c b/src/modules/bufferqueue/e_mod_main.c index e05085f..52dcd79 100644 --- a/src/modules/bufferqueue/e_mod_main.c +++ b/src/modules/bufferqueue/e_mod_main.c @@ -172,7 +172,6 @@ _e_bq_mgr_new(char *sock_name) { E_Comp *comp; E_Bq_Mgr *bq_mgr; - E_Comp_Data *cdata; int fd; static char *default_sock_name = "e_bq_mgr_daemon"; @@ -232,14 +231,7 @@ _e_bq_mgr_new(char *sock_name) else { /* try to get the compositor data */ - cdata = comp->wl_comp_data; - if (!cdata) - { - free(bq_mgr); - return NULL; - } - - bq_mgr->wdpy = cdata->wl.disp; + bq_mgr->wdpy = e_comp_wl->wl.disp; bq_mgr->loop = wl_display_get_event_loop(bq_mgr->wdpy); bq_mgr->self_dpy = 0; } @@ -904,12 +896,12 @@ _e_bq_mgr_init(E_Bq_Mgr *bq_mgr) * the .desktop file) but more specifically the api version it was compiled * for so E can skip modules that are compiled for an incorrect API version * safely) */ -EAPI E_Module_Api e_modapi = +E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Buffer queue manager" }; -EAPI void * +E_API void * e_modapi_init(E_Module *m) { E_Bq_Mgr *bq_mgr = NULL; @@ -929,7 +921,7 @@ e_modapi_init(E_Module *m) return m; } -EAPI int +E_API int e_modapi_shutdown(E_Module *m) { E_Bq_Mgr *bq_mgr = m->data; @@ -939,7 +931,7 @@ e_modapi_shutdown(E_Module *m) return 1; } -EAPI int +E_API int e_modapi_save(E_Module *m) { /* Do Something */ diff --git a/src/modules/mixer/emixer.c b/src/modules/mixer/emixer.c index 0d5b62e..f7c069e 100644 --- a/src/modules/mixer/emixer.c +++ b/src/modules/mixer/emixer.c @@ -668,7 +668,7 @@ _fill_sink(void) ////////////////////////////////////////////////////////////////////////////// -EAPI_MAIN int +E_API_MAIN int elm_main(int argc, char **argv) { Evas_Object *tb, *tbar, *sc, *rect, *bx; diff --git a/src/modules/packagekit/e_mod_packagekit.c b/src/modules/packagekit/e_mod_packagekit.c index be5b707..4f8c413 100644 --- a/src/modules/packagekit/e_mod_packagekit.c +++ b/src/modules/packagekit/e_mod_packagekit.c @@ -291,15 +291,10 @@ _signal_package_cb(void *data, const Eldbus_Message *msg) _store_error(ctxt, "could not get package arguments"); return; } -<<<<<<< HEAD - if (PKITV07) - { DBG("PKGKIT: Package: (%s) %s [ %s ]", info_str, pkg_id, summary); } -======= //if (PKITV07) //{ DBG("PKGKIT: Package: (%s) %s [ %s ]", info_str, pkg_id, summary); } //else //{ DBG("PKGKIT: Package: (%d) %s [ %s ]", info, pkg_id, summary); } ->>>>>>> upstream splitted = eina_str_split_full(pkg_id, ";", 2, &num_elements); if (num_elements == 2) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 10b5195..497c66b 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -1,13 +1,8 @@ #define E_COMP_WL #include "e.h" -<<<<<<< HEAD #include #include #include "e_scaler.h" -======= -#include "e_mod_main.h" -#include "e_desktop_shell_protocol.h" ->>>>>>> upstream #define XDG_SERVER_VERSION 5 @@ -180,13 +175,8 @@ _e_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resourc } e_comp_object_frame_xy_unadjust(ec->frame, -<<<<<<< HEAD - wl_fixed_to_int(cdata->ptr.x), - wl_fixed_to_int(cdata->ptr.y), -======= wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), ->>>>>>> upstream &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE); @@ -215,20 +205,10 @@ _e_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resou DBG("Comp Resize Edges Set: %d", edges); -<<<<<<< HEAD - cdata->resize.resource = resource; - cdata->resize.edges = edges; - - cx = wl_fixed_to_int(cdata->ptr.x) - ec->client.x; - cy = wl_fixed_to_int(cdata->ptr.y) - ec->client.y; - cdata->ptr.grab_x = wl_fixed_from_int(cx); - cdata->ptr.grab_y = wl_fixed_from_int(cy); -======= e_comp_wl->resize.resource = resource; e_comp_wl->resize.edges = edges; e_comp_wl->ptr.grab_x = e_comp_wl->ptr.x - wl_fixed_from_int(ec->client.x); e_comp_wl->ptr.grab_y = e_comp_wl->ptr.y - wl_fixed_from_int(ec->client.y); ->>>>>>> upstream switch (e_comp_wl->ptr.button) { @@ -247,13 +227,8 @@ _e_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resou } e_comp_object_frame_xy_unadjust(ec->frame, -<<<<<<< HEAD - wl_fixed_to_int(cdata->ptr.x), - wl_fixed_to_int(cdata->ptr.y), -======= wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), ->>>>>>> upstream &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE); @@ -274,10 +249,7 @@ _e_shell_surface_cb_toplevel_set(struct wl_client *client EINA_UNUSED, struct wl } /* set toplevel client properties */ -<<<<<<< HEAD ec->icccm.accepts_focus = 1; -======= ->>>>>>> upstream if (!ec->internal) ec->borderless = !ec->internal; @@ -570,40 +542,10 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso return; } -<<<<<<< HEAD - /* make sure it's a wayland pixmap */ - if (e_pixmap_type_get(ep) != E_PIXMAP_TYPE_WL) return; - - /* find the client for this pixmap */ - if (!(ec = e_pixmap_client_get(ep))) - ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ep)); - - if (!ec) - { - pid_t pid; - int internal = 0; - - /* check if it's internal or external */ - wl_client_get_credentials(client, &pid, NULL, NULL); - if (pid == getpid()) internal = 1; - - if (!(ec = e_client_new(NULL, ep, 0, internal))) - { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Client For Pixmap"); - return; - } - - ec->netwm.pid = pid; - ec->netwm.ping = EINA_TRUE; - } -======= EC_CHANGED(ec); ec->new_client = ec->netwm.ping = EINA_TRUE; e_comp->new_clients++; e_client_unignore(ec); ->>>>>>> upstream /* get the client data */ if (!(cdata = ec->comp_data)) @@ -843,13 +785,8 @@ _e_xdg_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_res } e_comp_object_frame_xy_unadjust(ec->frame, -<<<<<<< HEAD - wl_fixed_to_int(cdata->ptr.x), - wl_fixed_to_int(cdata->ptr.y), -======= wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), ->>>>>>> upstream &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE); @@ -879,29 +816,10 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r if ((ec->maximized) || (ec->fullscreen)) return; -<<<<<<< HEAD - /* get compositor data from seat */ - if (!(cdata = wl_resource_get_user_data(seat_resource))) - { - wl_resource_post_error(seat_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Comp_Data for Seat"); - return; - } - - cdata->resize.resource = resource; - cdata->resize.edges = edges; - - cx = wl_fixed_to_int(cdata->ptr.x) - ec->client.x; - cy = wl_fixed_to_int(cdata->ptr.y) - ec->client.y; - cdata->ptr.grab_x = wl_fixed_from_int(cx); - cdata->ptr.grab_y = wl_fixed_from_int(cy); -======= e_comp_wl->resize.resource = resource; e_comp_wl->resize.edges = edges; e_comp_wl->ptr.grab_x = e_comp_wl->ptr.x - wl_fixed_from_int(ec->client.x); e_comp_wl->ptr.grab_y = e_comp_wl->ptr.y - wl_fixed_from_int(ec->client.y); ->>>>>>> upstream switch (e_comp_wl->ptr.button) { @@ -920,13 +838,8 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r } e_comp_object_frame_xy_unadjust(ec->frame, -<<<<<<< HEAD - wl_fixed_to_int(cdata->ptr.x), - wl_fixed_to_int(cdata->ptr.y), -======= wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), ->>>>>>> upstream &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE); @@ -1209,40 +1122,10 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour return; } -<<<<<<< HEAD - /* make sure it's a wayland pixmap */ - if (e_pixmap_type_get(ep) != E_PIXMAP_TYPE_WL) return; - - /* find the client for this pixmap */ - if (!(ec = e_pixmap_client_get(ep))) - ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ep)); - - if (!ec) - { - pid_t pid; - int internal = 0; - - /* check if it's internal or external */ - wl_client_get_credentials(client, &pid, NULL, NULL); - if (pid == getpid()) internal = 1; - - if (!(ec = e_client_new(NULL, ep, 0, internal))) - { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Client For Pixmap"); - return; - } - ec->netwm.pid = pid; - } - - ec->netwm.ping = EINA_TRUE; -======= EC_CHANGED(ec); ec->new_client = ec->netwm.ping = EINA_TRUE; e_comp->new_clients++; e_client_unignore(ec); ->>>>>>> upstream /* get the client data */ if (!(cdata = ec->comp_data)) @@ -1292,23 +1175,6 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour ec->border.changed = ec->changes.border = !ec->borderless; ec->netwm.type = E_WINDOW_TYPE_NORMAL; ec->comp_data->set_win_type = EINA_TRUE; - - E_Comp_Client_Data *p_cdata = e_pixmap_cdata_get(ep); - EINA_SAFETY_ON_NULL_RETURN(p_cdata); - ec->icccm.accepts_focus = ec->icccm.take_focus = p_cdata->accepts_focus; - - if (p_cdata->fetch.win_type) - { - ec->netwm.type = p_cdata->win_type; - p_cdata->fetch.win_type = 0; - } - if (p_cdata->fetch.layer) - { - ec->layer = p_cdata->layer; - p_cdata->fetch.layer = 0; - evas_object_layer_set(ec->frame, ec->layer); - ELOG("LAYER_SET", ec->pixmap, ec); - } } static void @@ -1389,14 +1255,10 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource cdata->shell.map = _e_xdg_shell_surface_map; cdata->shell.unmap = _e_xdg_shell_surface_unmap; -<<<<<<< HEAD - ec->override = 1; -======= EC_CHANGED(ec); ec->new_client = ec->override = 1; e_client_unignore(ec); e_comp->new_clients++; ->>>>>>> upstream if (!ec->internal) ec->borderless = !ec->internal_elm_win; ec->lock_border = EINA_TRUE; @@ -1535,7 +1397,6 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t e_comp->wl_comp_data, NULL); } -<<<<<<< HEAD static void _e_tz_surf_cb_tz_res_get(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface) { @@ -1586,15 +1447,8 @@ static const struct tizen_surface_interface _e_tz_surf_interface = static void _e_tz_surf_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { - E_Comp_Data *cdata; struct wl_resource *res; - if (!(cdata = data)) - { - wl_client_post_no_memory(client); - return; - } - if (!(res = wl_resource_create(client, &tizen_surface_interface, MIN(version, 1), @@ -1605,13 +1459,10 @@ _e_tz_surf_cb_bind(struct wl_client *client, void *data, uint32_t version, uint3 return; } - wl_resource_set_implementation(res, &_e_tz_surf_interface, cdata, NULL); + wl_resource_set_implementation(res, &_e_tz_surf_interface, e_comp->wl_comp_data, NULL); } -EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" }; -======= E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" }; ->>>>>>> upstream E_API void * e_modapi_init(E_Module *m) @@ -1641,19 +1492,18 @@ e_modapi_init(E_Module *m) return NULL; } -<<<<<<< HEAD e_scaler_init(); - if (!wl_global_create(cdata->wl.disp, + if (!wl_global_create(e_comp_wl->wl.disp, &tizen_surface_interface, 1, - cdata, + e_comp->wl_comp_data, _e_tz_surf_cb_bind)) { ERR("Could not create tizen_surface to wayland globals: %m"); return NULL; } -======= + #ifdef HAVE_WL_TEXT_INPUT if (!e_input_panel_init()) { @@ -1661,7 +1511,6 @@ e_modapi_init(E_Module *m) return NULL; } #endif ->>>>>>> upstream return m; } diff --git a/src/modules/wl_desktop_shell/e_scaler.c b/src/modules/wl_desktop_shell/e_scaler.c index 196ecbc..d6646a6 100644 --- a/src/modules/wl_desktop_shell/e_scaler.c +++ b/src/modules/wl_desktop_shell/e_scaler.c @@ -7,16 +7,15 @@ static void _e_viewport_destroy(struct wl_resource *resource) { - E_Pixmap *ep = wl_resource_get_user_data(resource); - E_Comp_Client_Data *cdata = e_pixmap_cdata_get(ep); + E_Client *ec = wl_resource_get_user_data(resource); - EINA_SAFETY_ON_NULL_RETURN(cdata); - EINA_SAFETY_ON_NULL_RETURN(cdata->scaler.viewport); + if (!ec->comp_data) return; + if (!ec->comp_data->scaler.viewport) return; - cdata->scaler.viewport = NULL; - cdata->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1); - cdata->pending.buffer_viewport.surface.width = -1; - cdata->pending.buffer_viewport.changed = 1; + ec->comp_data->scaler.viewport = NULL; + ec->comp_data->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1); + ec->comp_data->pending.buffer_viewport.surface.width = -1; + ec->comp_data->pending.buffer_viewport.changed = 1; } static void @@ -35,11 +34,10 @@ _e_viewport_cb_set(struct wl_client *client EINA_UNUSED, int32_t dst_width, int32_t dst_height) { - E_Pixmap *ep = wl_resource_get_user_data(resource); - E_Comp_Client_Data *cdata = e_pixmap_cdata_get(ep); + E_Client *ec = wl_resource_get_user_data(resource); - EINA_SAFETY_ON_NULL_RETURN(cdata); - EINA_SAFETY_ON_NULL_RETURN(cdata->scaler.viewport); + EINA_SAFETY_ON_NULL_RETURN(ec->comp_data); + EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->scaler.viewport); if (wl_fixed_to_double(src_width) < 0 || wl_fixed_to_double(src_height) < 0) { @@ -60,13 +58,13 @@ _e_viewport_cb_set(struct wl_client *client EINA_UNUSED, return; } - cdata->pending.buffer_viewport.buffer.src_x = src_x; - cdata->pending.buffer_viewport.buffer.src_y = src_y; - cdata->pending.buffer_viewport.buffer.src_width = src_width; - cdata->pending.buffer_viewport.buffer.src_height = src_height; - cdata->pending.buffer_viewport.surface.width = dst_width; - cdata->pending.buffer_viewport.surface.height = dst_height; - cdata->pending.buffer_viewport.changed = 1; + ec->comp_data->pending.buffer_viewport.buffer.src_x = src_x; + ec->comp_data->pending.buffer_viewport.buffer.src_y = src_y; + ec->comp_data->pending.buffer_viewport.buffer.src_width = src_width; + ec->comp_data->pending.buffer_viewport.buffer.src_height = src_height; + ec->comp_data->pending.buffer_viewport.surface.width = dst_width; + ec->comp_data->pending.buffer_viewport.surface.height = dst_height; + ec->comp_data->pending.buffer_viewport.changed = 1; } static void @@ -77,17 +75,16 @@ _e_viewport_cb_set_source(struct wl_client *client EINA_UNUSED, wl_fixed_t src_width, wl_fixed_t src_height) { - E_Pixmap *ep = wl_resource_get_user_data(resource); - E_Comp_Client_Data *cdata = e_pixmap_cdata_get(ep); + E_Client *ec = wl_resource_get_user_data(resource); - EINA_SAFETY_ON_NULL_RETURN(cdata); - EINA_SAFETY_ON_NULL_RETURN(cdata->scaler.viewport); + EINA_SAFETY_ON_NULL_RETURN(ec->comp_data); + EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->scaler.viewport); if (src_width == wl_fixed_from_int(-1) && src_height == wl_fixed_from_int(-1)) { /* unset source size */ - cdata->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1); - cdata->pending.buffer_viewport.changed = 1; + ec->comp_data->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1); + ec->comp_data->pending.buffer_viewport.changed = 1; return; } @@ -101,11 +98,11 @@ _e_viewport_cb_set_source(struct wl_client *client EINA_UNUSED, return; } - cdata->pending.buffer_viewport.buffer.src_x = src_x; - cdata->pending.buffer_viewport.buffer.src_y = src_y; - cdata->pending.buffer_viewport.buffer.src_width = src_width; - cdata->pending.buffer_viewport.buffer.src_height = src_height; - cdata->pending.buffer_viewport.changed = 1; + ec->comp_data->pending.buffer_viewport.buffer.src_x = src_x; + ec->comp_data->pending.buffer_viewport.buffer.src_y = src_y; + ec->comp_data->pending.buffer_viewport.buffer.src_width = src_width; + ec->comp_data->pending.buffer_viewport.buffer.src_height = src_height; + ec->comp_data->pending.buffer_viewport.changed = 1; } static void @@ -114,17 +111,16 @@ _e_viewport_cb_set_destination(struct wl_client *client EINA_UNUSED, int32_t dst_width, int32_t dst_height) { - E_Pixmap *ep = wl_resource_get_user_data(resource); - E_Comp_Client_Data *cdata = e_pixmap_cdata_get(ep); + E_Client *ec = wl_resource_get_user_data(resource); - EINA_SAFETY_ON_NULL_RETURN(cdata); - EINA_SAFETY_ON_NULL_RETURN(cdata->scaler.viewport); + EINA_SAFETY_ON_NULL_RETURN(ec->comp_data); + EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->scaler.viewport); if (dst_width == -1 && dst_height == -1) { /* unset destination size */ - cdata->pending.buffer_viewport.surface.width = -1; - cdata->pending.buffer_viewport.changed = 1; + ec->comp_data->pending.buffer_viewport.surface.width = -1; + ec->comp_data->pending.buffer_viewport.changed = 1; return; } @@ -137,9 +133,9 @@ _e_viewport_cb_set_destination(struct wl_client *client EINA_UNUSED, return; } - cdata->pending.buffer_viewport.surface.width = dst_width; - cdata->pending.buffer_viewport.surface.height = dst_height; - cdata->pending.buffer_viewport.changed = 1; + ec->comp_data->pending.buffer_viewport.surface.width = dst_width; + ec->comp_data->pending.buffer_viewport.surface.height = dst_height; + ec->comp_data->pending.buffer_viewport.changed = 1; } static const struct wl_viewport_interface _e_viewport_interface = { @@ -159,14 +155,13 @@ static void _e_scaler_cb_get_viewport(struct wl_client *client EINA_UNUSED, struct wl_resource *scaler, uint32_t id, struct wl_resource *surface_resource) { int version = wl_resource_get_version(scaler); - E_Pixmap *ep; + E_Client *ec; struct wl_resource *res; - E_Comp_Client_Data *cdata; - if (!(ep = wl_resource_get_user_data(surface_resource))) return; - if (!(cdata = e_pixmap_cdata_get(ep))) return; + if (!(ec = wl_resource_get_user_data(surface_resource))) return; + if (!ec->comp_data) return; - if (cdata->scaler.viewport) + if (ec->comp_data && ec->comp_data->scaler.viewport) { wl_resource_post_error(scaler, WL_SCALER_ERROR_VIEWPORT_EXISTS, @@ -181,8 +176,8 @@ _e_scaler_cb_get_viewport(struct wl_client *client EINA_UNUSED, struct wl_resour return; } - cdata->scaler.viewport = res; - wl_resource_set_implementation(res, &_e_viewport_interface, ep, _e_viewport_destroy); + ec->comp_data->scaler.viewport = res; + wl_resource_set_implementation(res, &_e_viewport_interface, ec, _e_viewport_destroy); } static const struct wl_scaler_interface _e_scaler_interface = @@ -209,17 +204,12 @@ _e_scaler_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32 static void _e_rotator_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { - E_Pixmap *ep; E_Client *ec; - E_Comp_Client_Data *cdata = NULL; - if ((ep = wl_resource_get_user_data(resource))) + if ((ec = wl_resource_get_user_data(resource))) { - if ((ec = e_pixmap_client_get(ep))) - { - if ((cdata = ec->comp_data)) - cdata->transform.enabled = EINA_FALSE; - } + if (ec->comp_data) + ec->comp_data->transform.enabled = EINA_FALSE; } wl_resource_destroy(resource); @@ -228,15 +218,12 @@ _e_rotator_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource * static void _e_rotator_cb_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { - E_Pixmap *ep; E_Client *ec; - E_Comp_Client_Data *cdata = NULL; - if (!(ep = wl_resource_get_user_data(resource))) return; - if (!(ec = e_pixmap_client_get(ep))) return; - if (!(cdata = ec->comp_data)) return; + if (!(ec = wl_resource_get_user_data(resource))) return; + if (!ec->comp_data) return; - cdata->transform.enabled = EINA_TRUE; + ec->comp_data->transform.enabled = EINA_TRUE; DBG("SET ROTATOR"); } @@ -244,15 +231,12 @@ _e_rotator_cb_set(struct wl_client *client EINA_UNUSED, struct wl_resource *reso static void _e_rotator_cb_unset(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { - E_Pixmap *ep; E_Client *ec; - E_Comp_Client_Data *cdata = NULL; - if (!(ep = wl_resource_get_user_data(resource))) return; - if (!(ec = e_pixmap_client_get(ep))) return; - if (!(cdata = ec->comp_data)) return; + if (!(ec = wl_resource_get_user_data(resource))) return; + if (!ec->comp_data) return; - cdata->transform.enabled = EINA_FALSE; + ec->comp_data->transform.enabled = EINA_FALSE; DBG("UNSET ROTATOR"); } @@ -273,10 +257,10 @@ static void _e_transform_cb_get_rotator(struct wl_client *client EINA_UNUSED, struct wl_resource *transform, uint32_t id, struct wl_resource *surface_resource) { int version = wl_resource_get_version(transform); - E_Pixmap *ep; + E_Client *ec; struct wl_resource *res; - if (!(ep = wl_resource_get_user_data(surface_resource))) return; + if (!(ec = wl_resource_get_user_data(surface_resource))) return; res = wl_resource_create(client, &wl_rotator_interface, version, id); if (res == NULL) @@ -285,7 +269,7 @@ _e_transform_cb_get_rotator(struct wl_client *client EINA_UNUSED, struct wl_reso return; } - wl_resource_set_implementation(res, &_e_rotator_interface, ep, NULL); + wl_resource_set_implementation(res, &_e_rotator_interface, ec, NULL); } static const struct wl_transform_interface _e_transform_interface = @@ -312,22 +296,18 @@ _e_transform_cb_bind(struct wl_client *client, void *data, uint32_t version, uin Eina_Bool e_scaler_init(void) { - E_Comp_Data *cdata; - if (!e_comp) return EINA_FALSE; - if (!(cdata = e_comp->wl_comp_data)) return EINA_FALSE; - if (!cdata->wl.disp) return EINA_FALSE; /* try to add scaler to wayland globals */ - if (!wl_global_create(cdata->wl.disp, &wl_scaler_interface, 2, - cdata, _e_scaler_cb_bind)) + if (!wl_global_create(e_comp_wl->wl.disp, &wl_scaler_interface, 2, + e_comp->wl_comp_data, _e_scaler_cb_bind)) { ERR("Could not add scaler to wayland globals: %m"); return EINA_FALSE; } - if (!wl_global_create(cdata->wl.disp, &wl_transform_interface, 1, - cdata, _e_transform_cb_bind)) + if (!wl_global_create(e_comp_wl->wl.disp, &wl_transform_interface, 1, + e_comp->wl_comp_data, _e_transform_cb_bind)) { ERR("Could not add transform to wayland globals: %m"); return EINA_FALSE; diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index abd5019..b777163 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -60,12 +60,6 @@ _e_mod_drm_cb_output(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) DBG("WL_DRM OUTPUT CHANGE"); -<<<<<<< HEAD - snprintf(buff, sizeof(buff), "%d", e->id); - e_comp_wl_output_init(buff, e->make, e->model, e->x, e->y, e->w, e->h, - e->phys_width, e->phys_height, e->refresh, - e->subpixel_order, e->transform); -======= EINA_LIST_FOREACH(e_randr2->screens, l, screen) { if ((!strcmp(screen->info.name, e->name)) && @@ -88,7 +82,6 @@ _e_mod_drm_cb_output(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) break; } } ->>>>>>> upstream /* previous calculation of e_scale gave unsuitable value because * there were no sufficient information to calculate dpi. @@ -741,7 +734,6 @@ _drm_read_pixels(E_Comp_Wl_Output *output, void *pixels) E_API void * e_modapi_init(E_Module *m) { -<<<<<<< HEAD E_Comp *comp; int w = 0, h = 0, scr_w = 0, scr_h = 0; const char *env_w, *env_h; @@ -825,27 +817,6 @@ e_modapi_init(E_Module *m) } if (!comp->ee) -======= - int w = 0, h = 0; - - printf("LOAD WL_DRM MODULE\n"); - - /* try to init ecore_drm */ - /* if (!ecore_drm_init()) */ - /* { */ - /* fprintf(stderr, "Could not initialize ecore_drm"); */ - /* return NULL; */ - /* } */ - - if (e_comp_config_get()->engine == E_COMP_ENGINE_GL) - { - e_comp->ee = ecore_evas_new("gl_drm", 0, 0, 1, 1, NULL); - e_comp_gl_set(!!e_comp->ee); - } - - /* fallback to framebuffer drm (non-accel) */ - if (!e_comp->ee) ->>>>>>> upstream { if ((e_comp->ee = ecore_evas_new("drm", 0, 0, 1, 1, NULL))) { @@ -864,17 +835,15 @@ e_modapi_init(E_Module *m) ecore_evas_data_set(e_comp->ee, "comp", e_comp); -<<<<<<< HEAD + /* get the current screen geometry */ + ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h); + /* resize the canvas */ if (!((scr_w == w) && (scr_h == h))) { DBG("Change ecore_evas canvas size %dx%d -> %dx%d", scr_w, scr_h, w, h); ecore_evas_resize(comp->ee, w, h); } -======= - /* get the current screen geometry */ - ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h); ->>>>>>> upstream ecore_evas_callback_resize_set(e_comp->ee, _e_mod_drm_cb_ee_resize); @@ -889,8 +858,9 @@ e_modapi_init(E_Module *m) &e_comp_wl->ptr.y); evas_event_feed_mouse_in(e_comp->evas, 0, NULL); -<<<<<<< HEAD - evas_event_feed_mouse_in(comp->evas, 0, NULL); + e_comp_wl_input_pointer_enabled_set(EINA_TRUE); + e_comp_wl_input_keyboard_enabled_set(EINA_TRUE); + e_comp_wl_input_touch_enabled_set(EINA_TRUE); /* comp->pointer = */ /* e_pointer_window_new(ecore_evas_window_get(comp->ee), 1); */ @@ -899,16 +869,6 @@ e_modapi_init(E_Module *m) comp->pointer->color = EINA_TRUE; e_pointer_hide(comp->pointer); } -======= - e_comp_wl_input_pointer_enabled_set(EINA_TRUE); - e_comp_wl_input_keyboard_enabled_set(EINA_TRUE); - e_comp_wl_input_touch_enabled_set(EINA_TRUE); - - /* comp->pointer = */ - /* e_pointer_window_new(ecore_evas_window_get(comp->ee), 1); */ - e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE); - e_comp->pointer->color = EINA_TRUE; ->>>>>>> upstream /* FIXME: We need a way to trap for user changing the keymap inside of E * without the event coming from X11 */ @@ -920,8 +880,7 @@ e_modapi_init(E_Module *m) /* FIXME: This is just for testing at the moment.... * happens to jive with what drm does */ -<<<<<<< HEAD - e_comp_wl_input_keymap_set(comp->wl_comp_data, "evdev", "pc105", "us"); + e_comp_wl_input_keymap_set("evdev", "pc105", "us"); E_LIST_HANDLER_APPEND(event_handlers, ECORE_DRM_EVENT_ACTIVATE, _e_mod_drm_cb_activate, comp); @@ -931,17 +890,6 @@ e_modapi_init(E_Module *m) _e_mod_drm_cb_input_device_add, comp); E_LIST_HANDLER_APPEND(event_handlers, ECORE_DRM_EVENT_INPUT_DEVICE_DEL, _e_mod_drm_cb_input_device_del, comp); -======= - e_comp_wl_input_keymap_set(NULL, NULL, NULL); - - activate_handler = - ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE, - _e_mod_drm_cb_activate, NULL); - - output_handler = - ecore_event_handler_add(ECORE_DRM_EVENT_OUTPUT, - _e_mod_drm_cb_output, NULL); ->>>>>>> upstream return m; } @@ -952,15 +900,7 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED) /* shutdown ecore_drm */ /* ecore_drm_shutdown(); */ -<<<<<<< HEAD E_FREE_LIST(event_handlers, ecore_event_handler_del); -======= - if (output_handler) ecore_event_handler_del(output_handler); - output_handler = NULL; - - if (activate_handler) ecore_event_handler_del(activate_handler); - activate_handler = NULL; ->>>>>>> upstream return 1; } diff --git a/src/modules/wl_screenshot/e_mod_main.c b/src/modules/wl_screenshot/e_mod_main.c deleted file mode 100644 index 6d364ba..0000000 --- a/src/modules/wl_screenshot/e_mod_main.c +++ /dev/null @@ -1,348 +0,0 @@ -#include "e.h" -#include -#include -#include -#include -#include "e_screenshooter_server.h" - -typedef struct _Instance Instance; -struct _Instance -{ - E_Gadcon_Client *gcc; - Evas_Object *o_btn; -}; - -static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style); -static void _gc_shutdown(E_Gadcon_Client *gcc); -static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient); -static const char *_gc_label(const E_Gadcon_Client_Class *cc); -static Evas_Object *_gc_icon(const E_Gadcon_Client_Class *cc, Evas *evas); -static const char *_gc_id_new(const E_Gadcon_Client_Class *cc); -static void _cb_btn_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event); -static void _cb_handle_global(void *data, struct wl_registry *registry, unsigned int name, const char *interface, unsigned int version); -static void _cb_handle_global_remove(void *data __UNUSED__, struct wl_registry *registry __UNUSED__, unsigned int name __UNUSED__); -static struct wl_buffer *_create_shm_buffer(struct wl_shm *_shm, int width, int height, void **data_out); -static void _cb_handle_geometry(void *data __UNUSED__, struct wl_output *wl_output __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__, int transform __UNUSED__); -static void _cb_handle_mode(void *data, struct wl_output *wl_output, unsigned int flags, int w, int h, int refresh); -static void _save_png(int w, int h, void *data); -static Eina_Bool _cb_timer(void *data __UNUSED__); - -static const E_Gadcon_Client_Class _gc = -{ - GADCON_CLIENT_CLASS_VERSION, "wl_screenshot", - { - _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL, - e_gadcon_site_is_not_toolbar - }, - E_GADCON_CLIENT_STYLE_PLAIN -}; - -static const struct wl_output_listener _output_listener = -{ - _cb_handle_geometry, - _cb_handle_mode -}; - -static const struct wl_registry_listener _registry_listener = -{ - _cb_handle_global, - _cb_handle_global_remove -}; - -static E_Module *_mod = NULL; -static struct screenshooter *_shooter = NULL; -static struct wl_output *_output; -static int ow = 0, oh = 0; -static Ecore_Timer *_timer = NULL; - -EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Screenshooter" }; - -EAPI void * -e_modapi_init(E_Module *m) -{ - struct wl_display *disp; - struct wl_registry *reg; - - const char *engine_name; - EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL); - engine_name = ecore_evas_engine_name_get(e_comp->ee); - if (!strncmp(engine_name, "drm", 3) || !strncmp(engine_name, "gl_drm", 2)) - return e_screenshooter_server_init(m); - - if (!ecore_wl_init(NULL)) return NULL; - - if (!(disp = ecore_wl_display_get())) - { - ecore_wl_shutdown(); - return NULL; - } - - if (!(reg = ecore_wl_registry_get())) - { - ecore_wl_shutdown(); - return NULL; - } - - _mod = m; - e_gadcon_provider_register(&_gc); - - wl_registry_add_listener(reg, &_registry_listener, NULL); - - return m; -} - -EAPI int -e_modapi_shutdown(E_Module *m __UNUSED__) -{ - _mod = NULL; - e_gadcon_provider_unregister(&_gc); - ecore_wl_shutdown(); - return 1; -} - -EAPI int -e_modapi_save(E_Module *m __UNUSED__) -{ - return 1; -} - -static E_Gadcon_Client * -_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style) -{ - Evas_Object *o; - E_Gadcon_Client *gcc; - Instance *inst; - char buff[PATH_MAX]; - - inst = E_NEW(Instance, 1); - EINA_SAFETY_ON_NULL_RETURN_VAL(inst, NULL); - - snprintf(buff, sizeof(buff), "%s/e-module-wl_screenshot.edj", _mod->dir); - - o = edje_object_add(gc->evas); - if (!e_theme_edje_object_set(o, "base/theme/modules/wl_screenshot", - "modules/wl_screenshot/main")) - edje_object_file_set(o, buff, "modules/wl_screenshot/main"); - - gcc = e_gadcon_client_new(gc, name, id, style, o); - if (!gcc) - { - evas_object_del(o); - E_FREE(inst); - return NULL; - } - - gcc->data = inst; - - inst->gcc = gcc; - inst->o_btn = o; - - evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, - _cb_btn_down, inst); - return gcc; -} - -static void -_gc_shutdown(E_Gadcon_Client *gcc) -{ - Instance *inst; - - if (!(inst = gcc->data)) return; - evas_object_del(inst->o_btn); - free(inst); -} - -static void -_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient __UNUSED__) -{ - Instance *inst; - Evas_Coord mw, mh; - - inst = gcc->data; - mw = 0, mh = 0; - edje_object_size_min_get(inst->o_btn, &mw, &mh); - if ((mw < 1) || (mh < 1)) - edje_object_size_min_calc(inst->o_btn, &mw, &mh); - if (mw < 4) mw = 4; - if (mh < 4) mh = 4; - e_gadcon_client_aspect_set(gcc, mw, mh); - e_gadcon_client_min_size_set(gcc, mw, mh); -} - -static const char * -_gc_label(const E_Gadcon_Client_Class *cc __UNUSED__) -{ - return _("Screenshooter"); -} - -static Evas_Object * -_gc_icon(const E_Gadcon_Client_Class *cc __UNUSED__, Evas *evas) -{ - Evas_Object *o; - char buf[PATH_MAX]; - - o = edje_object_add(evas); - snprintf(buf, sizeof(buf), "%s/e-module-wl_screenshot.edj", _mod->dir); - edje_object_file_set(o, buf, "icon"); - return o; -} - -static const char * -_gc_id_new(const E_Gadcon_Client_Class *cc __UNUSED__) -{ - return _gc.name; -} - -static void -_cb_btn_down(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event) -{ - Evas_Event_Mouse_Down *ev; - - ev = event; - if (ev->button == 1) - { - if (_timer) ecore_timer_del(_timer); - _timer = ecore_timer_add(5.0, _cb_timer, NULL); - } -} - -static void -_cb_handle_global(void *data __UNUSED__, struct wl_registry *registry, unsigned int name, const char *interface, unsigned int version __UNUSED__) -{ - if (!strcmp(interface, "screenshooter")) - { - _shooter = wl_registry_bind(registry, name, &screenshooter_interface, 1); - /* FIXME: When we handle shots from multiple outputs, then we will - * need to setup the listener here */ - /* screenshooter_add_listener(_shooter, &, _shooter); */ - } - else if (!strcmp(interface, "wl_output")) - { - _output = wl_registry_bind(registry, name, &wl_output_interface, 1); - wl_output_add_listener(_output, &_output_listener, NULL); - } - -} - -static void -_cb_handle_global_remove(void *data __UNUSED__, struct wl_registry *registry __UNUSED__, unsigned int name __UNUSED__) -{ - /* no-op */ -} - -static struct wl_buffer * -_create_shm_buffer(struct wl_shm *_shm, int width, int height, void **data_out) -{ - char filename[] = "wayland-shm-XXXXXX"; - Eina_Tmpstr *tmpfile = NULL; - struct wl_shm_pool *pool; - struct wl_buffer *buffer; - int fd, size, stride; - void *data; - - fd = eina_file_mkstemp(filename, &tmpfile); - if (fd < 0) - { - fprintf(stderr, "open %s failed: %m\n", tmpfile); - return NULL; - } - - stride = width * 4; - size = stride * height; - if (ftruncate(fd, size) < 0) - { - fprintf(stderr, "ftruncate failed: %m\n"); - close(fd); - return NULL; - } - - data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); - unlink(tmpfile); - eina_tmpstr_del(tmpfile); - - if (data == MAP_FAILED) - { - fprintf(stderr, "mmap failed: %m\n"); - close(fd); - return NULL; - } - - pool = wl_shm_create_pool(_shm, fd, size); - close(fd); - if (!pool) - return NULL; - - buffer = - wl_shm_pool_create_buffer(pool, 0, width, height, stride, - WL_SHM_FORMAT_ARGB8888); - wl_shm_pool_destroy(pool); - - *data_out = data; - - return buffer; -} - -static void -_cb_handle_geometry(void *data __UNUSED__, struct wl_output *wl_output __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__, int transform __UNUSED__) -{ - /* no-op */ -} - -static void -_cb_handle_mode(void *data __UNUSED__, struct wl_output *wl_output __UNUSED__, unsigned int flags __UNUSED__, int w, int h, int refresh __UNUSED__) -{ - if (ow == 0) ow = w; - if (oh == 0) oh = h; -} - -static void -_save_png(int w, int h, void *data) -{ - Ecore_Evas *ee; - Evas *evas; - Evas_Object *img; - char buff[1024]; - char fname[PATH_MAX]; - - ee = ecore_evas_buffer_new(w, h); - evas = ecore_evas_get(ee); - - img = evas_object_image_filled_add(evas); - evas_object_image_fill_set(img, 0, 0, w, h); - evas_object_image_size_set(img, w, h); - evas_object_image_data_set(img, data); - evas_object_show(img); - - snprintf(fname, sizeof(fname), "%s/screenshot.png", e_user_homedir_get()); - snprintf(buff, sizeof(buff), "quality=90 compress=9"); - if (!(evas_object_image_save(img, fname, NULL, buff))) - { - printf("Error saving shot\n"); - } - - if (img) evas_object_del(img); - if (ee) ecore_evas_free(ee); -} - -static Eina_Bool -_cb_timer(void *data __UNUSED__) -{ - struct wl_buffer *buffer; - void *d = NULL; - - if (!_shooter) return EINA_FALSE; - - /* FIXME: ow and oh should probably be the size of all outputs */ - buffer = _create_shm_buffer(ecore_wl_shm_get(), ow, oh, &d); - if (!buffer) return EINA_FALSE; - - screenshooter_shoot(_shooter, _output, buffer); - - ecore_wl_sync(); - - _save_png(ow, oh, d); - - wl_buffer_destroy(buffer); - - return EINA_FALSE; -} diff --git a/src/modules/wl_screenshot/e_screenshooter_server.c b/src/modules/wl_screenshot/e_screenshooter_server.c deleted file mode 100644 index c60adda..0000000 --- a/src/modules/wl_screenshot/e_screenshooter_server.c +++ /dev/null @@ -1,104 +0,0 @@ -#define E_COMP_WL -#include "e.h" -#include -#include -#include -#include "e_screenshooter_server.h" - -static void -_e_screenshooter_shoot(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *output_resource, - struct wl_resource *buffer_resource) -{ - E_Comp_Wl_Output *output = wl_resource_get_user_data(output_resource); - struct wl_shm_buffer *shm_buffer = wl_shm_buffer_get(buffer_resource); - int32_t bw, bh, bs; - uint32_t bf; - void *bp; - - if (!output || !shm_buffer) - { - wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT, - "screenshooter failed: wrong %s resource", - (!output)?"output":"buffer"); - return; - } - - bw = wl_shm_buffer_get_width(shm_buffer); - bh = wl_shm_buffer_get_height(shm_buffer); - bf = wl_shm_buffer_get_format(shm_buffer); - bp = wl_shm_buffer_get_data(shm_buffer); - bs = wl_shm_buffer_get_stride(shm_buffer); - - if (bw != output->w || bh != output->h) - { - wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT, - "screenshooter failed: invalid buffer size"); - return; - } - - /* do dump */ - wl_shm_buffer_begin_access(shm_buffer); - evas_render_copy(e_comp->evas, bp, bs, bw, bh, bf, - output->x, output->y, output->w, output->h, - 0, 0, bw, bh); - wl_shm_buffer_end_access(shm_buffer); - - /* done */ - screenshooter_send_done(resource); -} - -static const struct screenshooter_interface _e_screenshooter_interface = -{ - _e_screenshooter_shoot -}; - -static void -_e_screenshooter_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) -{ - E_Comp_Data *cdata; - struct wl_resource *res; - - if (!(cdata = data)) - { - wl_client_post_no_memory(client); - return; - } - - if (!(res = wl_resource_create(client, &screenshooter_interface, MIN(version, 1), id))) - { - ERR("Could not create screenshooter resource: %m"); - wl_client_post_no_memory(client); - return; - } - - wl_resource_set_implementation(res, &_e_screenshooter_interface, cdata, NULL); -} - -void* -e_screenshooter_server_init(E_Module *m) -{ - E_Comp_Data *cdata; - - if (!e_comp) return EINA_FALSE; - if (!(cdata = e_comp->wl_comp_data)) return EINA_FALSE; - if (cdata->available_hw_accel.scaler) return EINA_FALSE; - if (!cdata->wl.disp) return EINA_FALSE; - - /* try to add screenshooter to wayland globals */ - if (!wl_global_create(cdata->wl.disp, &screenshooter_interface, 1, - cdata, _e_screenshooter_cb_bind)) - { - ERR("Could not add screenshooter to wayland globals: %m"); - return EINA_FALSE; - } - - return m; -} - -int -e_screenshooter_server_shutdown(E_Module *m) -{ - return 1; -} diff --git a/src/modules/wl_screenshot/e_screenshooter_server.h b/src/modules/wl_screenshot/e_screenshooter_server.h deleted file mode 100644 index 3320797..0000000 --- a/src/modules/wl_screenshot/e_screenshooter_server.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef E_SCREENSHOOTER_SERVER_H -#define E_SCREENSHOOTER_SERVER_H - -void* e_screenshooter_server_init(E_Module *m); -int e_screenshooter_server_shutdown(E_Module *m); - -#endif diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c index 24790c2..55de047 100644 --- a/src/modules/wl_x11/e_mod_main.c +++ b/src/modules/wl_x11/e_mod_main.c @@ -11,13 +11,8 @@ _cb_delete_request(Ecore_Evas *ee EINA_UNUSED) ecore_main_loop_quit(); } -<<<<<<< HEAD -static Eina_Bool -_cb_keymap_changed(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) -======= static Eina_Bool _cb_keymap_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) ->>>>>>> upstream { E_Config_XKB_Layout *ekbd; char *rules = NULL, *model = NULL, *layout = NULL; @@ -84,12 +79,7 @@ e_modapi_init(E_Module *m) ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h); -<<<<<<< HEAD - /* NB: This needs to be called AFTER comp_canvas has been setup as it - * makes reference to the comp->evas */ -======= e_comp_x_randr_screen_iface_set(); ->>>>>>> upstream if (!e_comp_wl_init()) return NULL; if (!e_comp_canvas_init(w, h)) return NULL; @@ -97,40 +87,23 @@ e_modapi_init(E_Module *m) e_comp_wl_input_keyboard_enabled_set(EINA_TRUE); e_comp_wl_input_touch_enabled_set(EINA_TRUE); -<<<<<<< HEAD - /* comp->pointer = */ - /* e_pointer_window_new(ecore_evas_window_get(comp->ee), EINA_TRUE); */ - if ((comp->pointer = e_pointer_canvas_new(comp->ee, EINA_TRUE)) - comp->pointer->color = EINA_TRUE; -======= /* e_comp->pointer = */ /* e_pointer_window_new(ecore_evas_window_get(e_comp->ee), EINA_TRUE); */ - e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE); - e_comp->pointer->color = EINA_TRUE; ->>>>>>> upstream + if ((e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE))) + e_comp->pointer->color = EINA_TRUE; /* force a keymap update so compositor keyboard gets setup */ _cb_keymap_changed(e_comp->wl_comp_data, 0, NULL); /* setup keymap_change event handler */ -<<<<<<< HEAD - kbd_hdlr = - ecore_event_handler_add(ECORE_X_EVENT_XKB_STATE_NOTIFY, - _cb_keymap_changed, comp->wl_comp_data); -======= kbd_hdlr = ecore_event_handler_add(ECORE_X_EVENT_XKB_STATE_NOTIFY, _cb_keymap_changed, e_comp->wl_comp_data); ->>>>>>> upstream return m; } -<<<<<<< HEAD -EAPI int -======= E_API int ->>>>>>> upstream e_modapi_shutdown(E_Module *m EINA_UNUSED) { /* delete handler for keymap change */ -- 2.7.4