Compare commits
79 Commits
master
...
devs/disco
Author | SHA1 | Date |
---|---|---|
Mike Blumenkrantz | 925468fbe9 | |
Mike Blumenkrantz | a6ded999a9 | |
Thiep Ha | 29634ea402 | |
Mike Blumenkrantz | efab05af1c | |
Mike Blumenkrantz | ea2de95298 | |
Mike Blumenkrantz | b613ec44f0 | |
Mike Blumenkrantz | 631cb11509 | |
Mike Blumenkrantz | 1a41b1b023 | |
Mike Blumenkrantz | 4044e8edff | |
Mike Blumenkrantz | ef9bb4325e | |
Sung-Jin Park | 004c791da5 | |
Derek Foreman | d7e1988477 | |
Stefan Schmidt | 3f0b2c2373 | |
Stefan Schmidt | 7da17dc3ed | |
Stefan Schmidt | b266264b09 | |
Stefan Schmidt | 605be2354c | |
Mike Blumenkrantz | ade1e9a02f | |
Mike Blumenkrantz | b72f5e29d9 | |
Mike Blumenkrantz | cf463057eb | |
Mike Blumenkrantz | c05b284b4f | |
Mike Blumenkrantz | 874c9d43bd | |
Mike Blumenkrantz | a30c4b574e | |
Mike Blumenkrantz | eb4ed14e2a | |
Mike Blumenkrantz | 96035d4d5d | |
Mike Blumenkrantz | 04d552042d | |
Mike Blumenkrantz | 6addb294c8 | |
Mike Blumenkrantz | 2c32787b87 | |
Carsten Haitzler | 8a7280f87d | |
Carsten Haitzler | 04036826da | |
Mike Blumenkrantz | d8878479ad | |
Mike Blumenkrantz | 58737e9db4 | |
Chris Michael | 97c488348c | |
Chris Michael | 11a5f6be3f | |
Carsten Haitzler | 9e83a7eb4a | |
Mike Blumenkrantz | 8532f7e1d6 | |
Mike Blumenkrantz | 90e0018c7e | |
Mike Blumenkrantz | 930dbc73ac | |
Stafford Horne | a817b1b5f4 | |
Mike Blumenkrantz | 40f100b26c | |
Mike Blumenkrantz | 76d38b53da | |
Mike Blumenkrantz | 84e801185a | |
Mike Blumenkrantz | c9ddd75705 | |
Mike Blumenkrantz | 3647c07cc5 | |
Stafford Horne | ee2cbf1c91 | |
Mike Blumenkrantz | 0ec94ff693 | |
Mike Blumenkrantz | 27144e5148 | |
Carsten Haitzler | c8a105bdba | |
Kai Huuhko | 2735d2af0c | |
Mike Blumenkrantz | 38ecec6d0b | |
Mike Blumenkrantz | 2f2eff9691 | |
Mike Blumenkrantz | b467800265 | |
Mike Blumenkrantz | 99d92b711c | |
Mike Blumenkrantz | 8a399d8fd5 | |
Mike Blumenkrantz | 756c4808cb | |
Mike Blumenkrantz | 8f0bc26593 | |
Mike Blumenkrantz | 54ea61471a | |
Mike Blumenkrantz | 9d6152f4c7 | |
Mike Blumenkrantz | 4c18316fba | |
Mike Blumenkrantz | ef7d5232f3 | |
Carsten Haitzler | 98bb7f8431 | |
Mike Blumenkrantz | e54f4fd67f | |
Mike Blumenkrantz | e9db26a5a4 | |
Mike Blumenkrantz | 3dc340b4dd | |
Vivek Ellur | 7a64f1f5fb | |
Vivek Ellur | 89c9b15a75 | |
Vivek Ellur | 523400269b | |
Chris Michael | cbed2658b1 | |
Chris Michael | 5c2b91e7b2 | |
Chris Michael | fb5fce9720 | |
Chris Michael | 7e0c617fa5 | |
Chris Michael | 9aa851f4fb | |
Chris Michael | 9db7ce3c0a | |
Chris Michael | d0e7e77187 | |
Chris Michael | 7f468681ae | |
Chris Michael | 5bbbd488d2 | |
Chris Michael | 4a70c192ca | |
Chris Michael | 6b25e902c7 | |
Chris Michael | 5ab2de727b | |
Chris Michael | 8fcdf3cb9f |
208
NEWS
208
NEWS
|
@ -52,7 +52,7 @@ Bryce Harrington (14):
|
|||
wayland: whitespace cleanup
|
||||
wayland: Free temporary string on error exit
|
||||
|
||||
Carsten Haitzler (109):
|
||||
Carsten Haitzler (118):
|
||||
mixer: Optionally select an external mixer application.
|
||||
e backlight - limit min to 0.05 to avoid totally off backlight
|
||||
fix README to be more up to date
|
||||
|
@ -162,6 +162,15 @@ Carsten Haitzler (109):
|
|||
e comp data - actually ... NO visibility effect by default is right
|
||||
e mixer - be more robust if pulse exits/crashes and def sink is null
|
||||
e - comps sync - ec client was null - i think, so protect against crash
|
||||
e - ibar - fix clash when 2 icons of the same path get added somehow
|
||||
e exec tracker - fix tracking to update desktop files on efreet change
|
||||
ibar - fix shutdown if ibar client menu is up
|
||||
e deskmirror - fix loss of mirror object from deskmirror
|
||||
e screens/zones/randr - store randr2 id in xinerama and zones for lookup
|
||||
e mixer fix - fix default mixer to pulse if there
|
||||
e - fix compositor fade out ghosting
|
||||
e msgbus - move almost all of core dbus methods to msgbus module
|
||||
e - efm - rate limit dbus requests to open dirs or files to avoid dos
|
||||
|
||||
Cedric BAIL (3):
|
||||
lokker: empty string should not be translated.
|
||||
|
@ -174,7 +183,7 @@ Chidambar Zinnoury (4):
|
|||
e menus: Fix invalid comparisons.
|
||||
e fm: Use correct string length when copying path.
|
||||
|
||||
Christopher Michael (355):
|
||||
Christopher Michael (357):
|
||||
bugfix: Fix e_msgbus file having missing initializers for Eldbus Messages & Signals
|
||||
bugfix: Fix e_notification file having missing initializers for Eldbus Messages & Signals
|
||||
bugfix: Cleanup appmenu module having missing field initializers for Eldbus Messages & Signals
|
||||
|
@ -530,6 +539,8 @@ Christopher Michael (355):
|
|||
enlightenment: Use 'fabs' to compute absolute value of floating point types
|
||||
enlightenment: Make sure we have a zone before calling _bgpreview_viewport_update
|
||||
Fix e_menu trying to swallow an object from a different canvas
|
||||
Fix formatting and remove extra blank line
|
||||
Fix invalid compositor type check in e_dpms_force_update
|
||||
|
||||
Conrad Meyer (4):
|
||||
Mixer Pulse: Fix trivial use-after-free.
|
||||
|
@ -564,7 +575,7 @@ Dave Andreoli (3):
|
|||
Update gtk bookmarks to work with new gtk3 path
|
||||
Improve italian lang
|
||||
|
||||
Derek Foreman (31):
|
||||
Derek Foreman (32):
|
||||
Conditionally ignore wayland cursor set events
|
||||
Provide wl_output interface to clients
|
||||
Provide wl_output events on hotplug
|
||||
|
@ -596,12 +607,23 @@ Derek Foreman (31):
|
|||
wayland: Only send keyboard modifiers to focused resources
|
||||
wayland: Always add frame callbacks to current state on commit
|
||||
wayland: force wl surface frame callbacks on commit for undamaged surfaces
|
||||
Stop using MIN macros when choosing versions for wayland resources
|
||||
|
||||
Duna Oh (1):
|
||||
fix crash when activating menu that is not in range
|
||||
|
||||
Flavio Ceolin (1):
|
||||
Flavio Ceolin (2):
|
||||
modules:mixer:pulse Update default sink
|
||||
modules:mixer: Avoid pa backend from crash
|
||||
|
||||
Florent Revest (7):
|
||||
Adds eglfs to Enlightenment
|
||||
configure.ac: fixes wayland-only build
|
||||
e_signals.c: Inclues Ecore_DRM only if WL_DRM is built and not only if WAYLAND is built
|
||||
wl_eglfs: enable gl acceleration, mouse, touchscreen and keyboard
|
||||
[HACK??] Fixes wayland-only build
|
||||
Fixes build complaining about missing ABOUT-NLS
|
||||
Don't load xwayland if it isn't compiled
|
||||
|
||||
Gustavo Lima Chaves (1):
|
||||
Generate *all* music control files in src tree.
|
||||
|
@ -626,7 +648,8 @@ Jean-Philippe ANDRÉ (6):
|
|||
Jee-Yong Um (1):
|
||||
e_actions: Fix to parse syntax correctly in key binding settings
|
||||
|
||||
Kai Huuhko (1):
|
||||
Kai Huuhko (2):
|
||||
L10N: Update Finnish translations
|
||||
L10N: Update Finnish translations
|
||||
|
||||
Leif Middelschulte (2):
|
||||
|
@ -683,7 +706,7 @@ Massimo Maiurana (12):
|
|||
Updating italian translation
|
||||
Updating catalan translation
|
||||
|
||||
Mike Blumenkrantz (1008):
|
||||
Mike Blumenkrantz (1074):
|
||||
unset release mode
|
||||
bump version
|
||||
Revert "mixer: Optionally select an external mixer application."
|
||||
|
@ -1692,10 +1715,85 @@ Mike Blumenkrantz (1008):
|
|||
when maximizing a wayland client with csd, use window geometry
|
||||
add NEWS from 19.12 release
|
||||
20.0-beta release
|
||||
20.0-beta NEWS updates
|
||||
unset release mode
|
||||
always unalias x11 client parent window <-> pixmap relation during delete
|
||||
clean up some systray leaks
|
||||
add E_COMP_ENGINE env var to determine sw/gl
|
||||
Revert "when maximizing a wayland client with csd, use window geometry"
|
||||
adjust non-x11 client's saved frame geometry when changing csd
|
||||
simplify client SMART/EXPAND maximize
|
||||
Revert "queue pending buffers for wayland shm clients"
|
||||
add native surface (gl) clients to post render list
|
||||
fix comp object native surface config checking for non-x11 compositors
|
||||
use e_comp->gl flag to set native surface state
|
||||
add wayland egl client support
|
||||
check for wayland egl extensions before starting a gl compositor
|
||||
remove note about window close crashing
|
||||
account for window position in efm window drag initial positioning
|
||||
adjust efm multi-icon drag positioning by the current pan coords
|
||||
set e_comp->gl for wayland compositors based on gl display bind success
|
||||
break out x11 client visibility setting into util functions
|
||||
move client iconic hint setting into x11 hide function
|
||||
emit ibox icon signals to the internal edje object of the e_icon
|
||||
add counter and smart callbacks for comp object visible mirrors
|
||||
add e_comp_object_mirror_visibility_check()
|
||||
toggle x11 client iconic/mapped state based on mirror visibility
|
||||
Revert "force a software render in all cases when finalizing x11 client iconify"
|
||||
disable client menu stacking functions for unstackable windows
|
||||
enforce fullscreen client stacking during nocomp end IFF client is fullscreen
|
||||
check client comp data existence in x11 mirror visibility callbacks
|
||||
clamp client to ABOVE layer when ending nocomp
|
||||
Revert "clamp client to ABOVE layer when ending nocomp"
|
||||
use unsigned int for client focus tracking freeze state
|
||||
ensure that all mixer volumes resolve to the appropriate gadget icon
|
||||
null efm icon eio handle in error callback
|
||||
20.0-rc release
|
||||
20.0-rc NEWS updates
|
||||
unset release mode
|
||||
install emixer icon to $(datadir)/pixmaps instead of /icons
|
||||
improve readability of E_FIRST_FRAME environment variable detection
|
||||
improve x11 client focusing with mouse-based focus policies on mouse move
|
||||
do not add new deskmirror clients on desk_set event if client already exists
|
||||
do not refill all tasks bars when a sticky window changes desks
|
||||
update E_Client->desk member upon focusing a sticky client
|
||||
further improve csd calculations for x11 clients
|
||||
add safety checks to e_client_focus/raise_latest_set() fns
|
||||
always create compositor mirror objects, ignore pixmap image state
|
||||
block task gadget refills while a drag is active
|
||||
Revert "e deskmirror - fix loss of mirror object from deskmirror"
|
||||
ensure that a deskmirror object does not orphan child objects
|
||||
always set wayland E_Client->redirected during client creation
|
||||
ensure fwin efm delete callback does not trigger crash
|
||||
remove fwin popup size hint change callback on win deletion
|
||||
ref clients while a wayland shell surface exists
|
||||
only create wayland screensaver timer in wayland mode
|
||||
only perform drm shutdown during signal handler if drm engine is in use
|
||||
reenable restart/shutdown dbus methods under x11
|
||||
fix all shadow warnings in msgbus module
|
||||
add mechanism for preventing unload of important modules during runtime
|
||||
use separate handler for x11 fatal errors when using xwayland
|
||||
declare xwayland functions prior to using them
|
||||
avoid setting incorrect geometry during new_client frame calc
|
||||
adjust for SSD geometry during wayland client resize
|
||||
use CSD geometry during move/resize display
|
||||
do not apply max client geometry restriction if max geometry is not set
|
||||
allow more client hooks to bypass delete check
|
||||
re-swallow bg_object after wallpaper transition has completed
|
||||
remove e_comp_wl struct keyboard repeat members
|
||||
|
||||
MinJeong Kim (1):
|
||||
e_menu: remove an unnecessary comparison
|
||||
|
||||
Nicolas Aguirre (7):
|
||||
Revert "Don't load xwayland if it isn't compiled"
|
||||
Revert "Fixes build complaining about missing ABOUT-NLS"
|
||||
Revert "[HACK??] Fixes wayland-only build"
|
||||
Revert "wl_eglfs: enable gl acceleration, mouse, touchscreen and keyboard"
|
||||
Revert "e_signals.c: Inclues Ecore_DRM only if WL_DRM is built and not only if WAYLAND is built"
|
||||
Revert "configure.ac: fixes wayland-only build"
|
||||
Revert "Adds eglfs to Enlightenment"
|
||||
|
||||
Nicolas Marcotte (1):
|
||||
added a macro and a fucntion to switch to desktop D on screen S as specified in https://phab.enlightenment.org/T2218
|
||||
|
||||
|
@ -1752,7 +1850,14 @@ Simon Lees (5):
|
|||
Srivardhan Hebbar (1):
|
||||
autotools: modified autogen.sh script to be able to build from different directory.
|
||||
|
||||
Stefan Schmidt (64):
|
||||
Stafford Horne (5):
|
||||
e/conf_apps: Fix resizing of "Startup Application" dialog
|
||||
e/ilist: Fix issue with multiselect returning wrong index
|
||||
e/desk_wallpaper: Fix setting wallpaper from within Virtual Desk dialog
|
||||
e/imc: fix issue with input method import segv and small window size
|
||||
e/core: Fix minor mem leak when reading module paths
|
||||
|
||||
Stefan Schmidt (68):
|
||||
modules/wl_drm: Remove trailing whitespaces
|
||||
e_client: _e_client_cb_drag_finished is not used in wayland only mode
|
||||
modules/lokker: Array address is never NULL.
|
||||
|
@ -1817,6 +1922,13 @@ Stefan Schmidt (64):
|
|||
e_widget_filepreview: Remove assign without effect
|
||||
modules/battery: Remove assign without effect
|
||||
e_comp_wl: create global and bind session_recovery interface
|
||||
e_fm:correct declaration of function with no parameters
|
||||
pulse backend: correct declaration of function with no parameters
|
||||
e_gadcon: use Eina_Bool for one-bit bitfield
|
||||
e_menu: use Eina_Bool for one-bit bitfield
|
||||
|
||||
Sung-Jin Park (1):
|
||||
(1) e_config.c/e_comp_wl.c: add code for making repeat values configurable (2) e.src(s): add keyboard.repeat_delay, keyboard.repeat_rate into e.src files
|
||||
|
||||
Takeshi Banse (1):
|
||||
cpufreq: teach cpuinfo_{min,max}_freq as available frequencies
|
||||
|
@ -1857,6 +1969,11 @@ Tomáš Čech (1):
|
|||
Vincent Torri (1):
|
||||
add MIN define for non-linux systems
|
||||
|
||||
Vivek Ellur (3):
|
||||
e: Fix realloc issue in e font module
|
||||
Fix memory leak issue
|
||||
Fix null dereference issue
|
||||
|
||||
Wonguk Jeong (1):
|
||||
conf_application: fix crash on setting Desktop Environment
|
||||
|
||||
|
@ -1885,12 +2002,89 @@ kabeer khan (5):
|
|||
wl_drm: create ecore_evas for drm gl backend
|
||||
Release list of touch resources when input is shutdown
|
||||
|
||||
shorne (1):
|
||||
e/win_config: allow content of some dialogs to resize with the window
|
||||
|
||||
vivek (3):
|
||||
wl_desktop_shell: Implemented function to show xdg shell surface menu
|
||||
wl_desktop_shell: Fixed the issue to check if client is active or hung up
|
||||
wl_desktop_shell: Fixed the issue to check if wl surface is active or hung up
|
||||
|
||||
|
||||
Release 0.19.14:
|
||||
---------------------
|
||||
Mike Blumenkrantz (14):
|
||||
improve x11 client focusing with mouse-based focus policies on mouse move
|
||||
do not add new deskmirror clients on desk_set event if client already exists
|
||||
do not refill all tasks bars when a sticky window changes desks
|
||||
update E_Client->desk member upon focusing a sticky client
|
||||
further improve csd calculations for x11 clients
|
||||
always create compositor mirror objects, ignore pixmap image state
|
||||
block task gadget refills while a drag is active
|
||||
Revert "e deskmirror - fix loss of mirror object from deskmirror"
|
||||
ensure that a deskmirror object does not orphan child objects
|
||||
avoid setting incorrect geometry during new_client frame calc
|
||||
use CSD geometry during move/resize display
|
||||
do not apply max client geometry restriction if max geometry is not set
|
||||
allow more client hooks to bypass delete check
|
||||
re-swallow bg_object after wallpaper transition has completed
|
||||
|
||||
Stafford Horne (1):
|
||||
e/core: Fix minor mem leak when reading module paths
|
||||
|
||||
|
||||
Release 0.19.13:
|
||||
---------------------
|
||||
Carsten Haitzler (4):
|
||||
e - ibar - fix clash when 2 icons of the same path get added somehow
|
||||
e exec tracker - fix tracking to update desktop files on efreet change
|
||||
ibar - fix shutdown if ibar client menu is up
|
||||
e deskmirror - fix loss of mirror object from deskmirror
|
||||
|
||||
Mike Blumenkrantz (31):
|
||||
when removing VERTICAL maximize state, also remove LEFT and RIGHT states
|
||||
don't crash desktop gadget systrays when adjusting image sizing
|
||||
make wake-on-urgent apply for all cases of window urgency
|
||||
force full damage for first frame of x11 override clients
|
||||
subtract x11 client damage region even when forcing full override damage
|
||||
fix typo in previous damage rect commit
|
||||
do not return when x11 damage event returns no rects
|
||||
trap shaped x11 clients and prevent compositor blocking with high rect count
|
||||
reject deleted clients from x11 sync alarm event callback
|
||||
clear x11 client pixmap when returning from iconic
|
||||
force a software render in all cases when finalizing x11 client iconify
|
||||
update csd using deltas of previous values
|
||||
make comp config unresizable...again
|
||||
remove dead modules from whitelist
|
||||
only apply frame geometry deltas for CSD if the CSD region exists
|
||||
reject frame theme changes for clients which have CSD
|
||||
simplify client SMART/EXPAND maximize
|
||||
add native surface (gl) clients to post render list
|
||||
adjust efm multi-icon drag positioning by the current pan coords
|
||||
break out x11 client visibility setting into util functions
|
||||
move client iconic hint setting into x11 hide function
|
||||
emit ibox icon signals to the internal edje object of the e_icon
|
||||
add counter and smart callbacks for comp object visible mirrors
|
||||
add e_comp_object_mirror_visibility_check()
|
||||
toggle x11 client iconic/mapped state based on mirror visibility
|
||||
Revert "force a software render in all cases when finalizing x11 client iconify"
|
||||
disable client menu stacking functions for unstackable windows
|
||||
enforce fullscreen client stacking during nocomp end IFF client is fullscreen
|
||||
check client comp data existence in x11 mirror visibility callbacks
|
||||
use unsigned int for client focus tracking freeze state
|
||||
null efm icon eio handle in error callback
|
||||
|
||||
Stafford Horne (2):
|
||||
e/conf_apps: Fix resizing of "Startup Application" dialog
|
||||
e/ilist: Fix issue with multiselect returning wrong index
|
||||
|
||||
Thierry (1):
|
||||
mouse_config: fix accel threshold and numerator limits.
|
||||
|
||||
shorne (1):
|
||||
e/win_config: allow content of some dialogs to resize with the window
|
||||
|
||||
|
||||
Release 0.19.12:
|
||||
---------------------
|
||||
Amitesh Singh (1):
|
||||
|
|
|
@ -215,6 +215,8 @@ group "E_Config" struct {
|
|||
value "update.later" uchar: 0;
|
||||
value "xkb.only_label" int: 0;
|
||||
value "xkb.default_model" string: "default";
|
||||
value "keyboard.repeat_delay" int: 400;
|
||||
value "keyboard.repeat_rate" int: 25;
|
||||
value "exe_always_single_instance" uchar: 0;
|
||||
value "use_desktop_window_profile" int: 0;
|
||||
value "powersave.none" double: 0.25;
|
||||
|
|
|
@ -865,6 +865,8 @@ group "E_Config" struct {
|
|||
}
|
||||
value "xkb.only_label" int: 0;
|
||||
value "xkb.default_model" string: "default";
|
||||
value "keyboard.repeat_delay" int: 400;
|
||||
value "keyboard.repeat_rate" int: 25;
|
||||
value "exe_always_single_instance" uchar: 1;
|
||||
value "use_desktop_window_profile" int: 0;
|
||||
}
|
||||
|
|
|
@ -1106,6 +1106,8 @@ group "E_Config" struct {
|
|||
}
|
||||
value "xkb.only_label" int: 0;
|
||||
value "xkb.default_model" string: "default";
|
||||
value "keyboard.repeat_delay" int: 400;
|
||||
value "keyboard.repeat_rate" int: 25;
|
||||
value "exe_always_single_instance" uchar: 0;
|
||||
value "use_desktop_window_profile" int: 0;
|
||||
}
|
||||
|
|
|
@ -1128,6 +1128,8 @@ group "E_Config" struct {
|
|||
}
|
||||
value "xkb.only_label" int: 0;
|
||||
value "xkb.default_model" string: "default";
|
||||
value "keyboard.repeat_delay" int: 400;
|
||||
value "keyboard.repeat_rate" int: 25;
|
||||
value "exe_always_single_instance" uchar: 0;
|
||||
value "use_desktop_window_profile" int: 0;
|
||||
}
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -1,14 +1,14 @@
|
|||
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
||||
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
||||
m4_define([v_maj], [0])
|
||||
m4_define([v_min], [19])
|
||||
m4_define([v_min], [20])
|
||||
m4_define([v_mic], [99])
|
||||
m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl
|
||||
##-- When released, remove the dnl on the below line
|
||||
dnl m4_undefine([v_rev])
|
||||
m4_define([relname], [0.20.0])
|
||||
m4_define([relname], [0.21.0])
|
||||
##-- When doing snapshots - change soname. remove dnl on below line
|
||||
m4_define([relname], [ver-autocannoli-0.20])
|
||||
m4_define([relname], [ver-0.21])
|
||||
dnl m4_define([v_rel], [-release relname])
|
||||
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
||||
m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
|
||||
|
@ -742,7 +742,7 @@ AC_MSG_CHECKING([whether wayland EGL support is enabled])
|
|||
AC_MSG_RESULT([${e_cv_want_wayland_egl}])
|
||||
|
||||
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],
|
||||
PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 wayland-server >= 1.8.0 wayland-client >= 1.8.0 xkbcommon uuid],
|
||||
[
|
||||
have_wayland=yes
|
||||
AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
|
||||
|
@ -859,7 +859,7 @@ WL_WEEKEYBOARD=false
|
|||
define([CHECK_MODULE_WL_WEEKEYBOARD],
|
||||
[
|
||||
if test "x${have_wayland}" = "xyes" ; then
|
||||
AC_E_CHECK_PKG(WL_WEEKEYBOARD, [ eina >= 1.8.0 evas >= 1.8.0 ecore >= 1.8.0 ecore-evas >= 1.8.0 ecore-wayland >= 1.8.0 edje >= 1.8.0 ], [WL_WEEKEYBOARD=true], [WL_WEEKEYBOARD=false])
|
||||
AC_E_CHECK_PKG(WL_WEEKEYBOARD, [ eina >= 1.8.0 evas >= 1.8.0 ecore >= 1.8.0 ecore-evas >= 1.8.0 ecore-wl2 >= 1.8.0 edje >= 1.8.0 ], [WL_WEEKEYBOARD=true], [WL_WEEKEYBOARD=false])
|
||||
else
|
||||
WL_WEEKEYBOARD=false
|
||||
fi
|
||||
|
|
|
@ -5,7 +5,7 @@ Name=Temp
|
|||
Name[ca]=Temp.
|
||||
Name[de]=Temporäre Daten
|
||||
Name[eo]=Dumtempaj
|
||||
Name[fi]=Väliaikais
|
||||
Name[fi]=Väliaikaiset
|
||||
Name[fr]=Temporaires
|
||||
Name[gl]=Temporais
|
||||
Name[ja]=気温
|
||||
|
|
|
@ -35,5 +35,6 @@ sr
|
|||
sv
|
||||
tr
|
||||
uk
|
||||
vi
|
||||
zh_CN
|
||||
zh_TW
|
||||
|
|
|
@ -127,7 +127,7 @@ void *alloca (size_t);
|
|||
# include <Elementary.h>
|
||||
|
||||
# ifdef HAVE_WAYLAND
|
||||
# include <Ecore_Wayland.h>
|
||||
# include <Ecore_Wl2.h>
|
||||
# include <uuid.h>
|
||||
# endif
|
||||
|
||||
|
|
|
@ -490,6 +490,7 @@ _e_bg_signal(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA
|
|||
|
||||
E_FREE_FUNC(zone->prev_bg_object, evas_object_del);
|
||||
E_FREE_FUNC(zone->transition_object, evas_object_del);
|
||||
e_comp_canvas_zone_update(zone);
|
||||
evas_object_move(zone->bg_object, zone->x, zone->y);
|
||||
evas_object_resize(zone->bg_object, zone->w, zone->h);
|
||||
evas_object_layer_set(zone->bg_object, E_LAYER_BG);
|
||||
|
|
|
@ -22,7 +22,7 @@ E_API int E_EVENT_CLIENT_UNFULLSCREEN = -1;
|
|||
|
||||
static Eina_Hash *clients_hash[2] = {NULL}; // pixmap->client
|
||||
|
||||
static int focus_track_frozen = 0;
|
||||
static unsigned int focus_track_frozen = 0;
|
||||
|
||||
static int warp_to = 0;
|
||||
static int warp_to_x = 0;
|
||||
|
@ -315,6 +315,9 @@ _e_client_hook_call(E_Client_Hook_Point hookpoint, E_Client *ec)
|
|||
if (ch->delete_me) continue;
|
||||
ch->func(ch->data, ec);
|
||||
if ((hookpoint != E_CLIENT_HOOK_DEL) &&
|
||||
(hookpoint != E_CLIENT_HOOK_MOVE_END) &&
|
||||
(hookpoint != E_CLIENT_HOOK_RESIZE_END) &&
|
||||
(hookpoint != E_CLIENT_HOOK_FOCUS_UNSET) &&
|
||||
e_object_is_del(E_OBJECT(ec)))
|
||||
break;
|
||||
}
|
||||
|
@ -3352,6 +3355,7 @@ e_client_hook_del(E_Client_Hook *ch)
|
|||
E_API void
|
||||
e_client_focus_latest_set(E_Client *ec)
|
||||
{
|
||||
if (!ec) CRI("ACK");
|
||||
if (focus_track_frozen > 0) return;
|
||||
focus_stack = eina_list_remove(focus_stack, ec);
|
||||
focus_stack = eina_list_prepend(focus_stack, ec);
|
||||
|
@ -3360,6 +3364,7 @@ e_client_focus_latest_set(E_Client *ec)
|
|||
E_API void
|
||||
e_client_raise_latest_set(E_Client *ec)
|
||||
{
|
||||
if (!ec) CRI("ACK");
|
||||
raise_stack = eina_list_remove(raise_stack, ec);
|
||||
raise_stack = eina_list_prepend(raise_stack, ec);
|
||||
}
|
||||
|
@ -3379,6 +3384,7 @@ e_client_focus_track_freeze(void)
|
|||
E_API void
|
||||
e_client_focus_track_thaw(void)
|
||||
{
|
||||
if (focus_track_frozen)
|
||||
focus_track_frozen--;
|
||||
}
|
||||
|
||||
|
@ -3549,6 +3555,8 @@ e_client_focused_set(E_Client *ec)
|
|||
|
||||
e_hints_active_window_set(ec);
|
||||
_e_client_event_simple(ec, E_EVENT_CLIENT_FOCUS_IN);
|
||||
if (ec->sticky && ec->desk && (!ec->desk->visible))
|
||||
e_client_desk_set(ec, e_desk_current_get(ec->zone));
|
||||
}
|
||||
|
||||
E_API void
|
||||
|
@ -3571,7 +3579,7 @@ e_client_activate(E_Client *ec, Eina_Bool just_do_it)
|
|||
if (!ec->lock_user_iconify)
|
||||
e_client_uniconify(ec);
|
||||
}
|
||||
if ((!ec->iconic) && (!ec->sticky))
|
||||
if ((!ec->iconic) && ((!ec->sticky) || e_config->focus_revert_allow_sticky))
|
||||
{
|
||||
int val = e_config->focus_last_focused_per_desktop;
|
||||
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
|
||||
static Eina_List *handlers;
|
||||
static Ecore_Timer *timer_post_screensaver_lock = NULL;
|
||||
static Ecore_Timer *timer_post_screensaver_on = NULL;
|
||||
|
||||
static void
|
||||
_e_comp_canvas_cb_del()
|
||||
{
|
||||
E_FREE_LIST(handlers, ecore_event_handler_del);
|
||||
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
|
||||
E_FREE_FUNC(timer_post_screensaver_on, ecore_timer_del);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -155,13 +157,23 @@ _e_comp_cb_zone_change()
|
|||
|
||||
////////////////////////////////////
|
||||
|
||||
static void
|
||||
_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
|
||||
static Eina_Bool
|
||||
_e_comp_cb_screensaver_active_delay(void *data EINA_UNUSED)
|
||||
{
|
||||
/* thawed in _e_comp_screensaver_off() */
|
||||
ecore_animator_frametime_set(10.0);
|
||||
if (!e_comp->nocomp)
|
||||
ecore_evas_manual_render_set(e_comp->ee, EINA_TRUE);
|
||||
timer_post_screensaver_on = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
|
||||
{
|
||||
if (timer_post_screensaver_on) return;
|
||||
/* thawed in _e_comp_screensaver_off() */
|
||||
timer_post_screensaver_on = ecore_timer_add
|
||||
(1.0, _e_comp_cb_screensaver_active_delay, NULL);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -192,6 +204,7 @@ static Eina_Bool
|
|||
_e_comp_cb_screensaver_off()
|
||||
{
|
||||
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
|
||||
E_FREE_FUNC(timer_post_screensaver_on, ecore_timer_del);
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
////////////////////////////////////
|
||||
|
@ -263,7 +276,9 @@ e_comp_canvas_init(int w, int h)
|
|||
|
||||
EINA_LIST_FOREACH(screens, l, scr)
|
||||
{
|
||||
e_zone_new(scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h);
|
||||
E_Zone *zone = e_zone_new(scr->screen, scr->escreen,
|
||||
scr->x, scr->y, scr->w, scr->h);
|
||||
if (scr->id) zone->randr2_id = strdup(scr->id);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -474,11 +489,15 @@ e_comp_canvas_update(void)
|
|||
zones = eina_list_remove(zones, zone);
|
||||
e_comp->zones = eina_list_append(e_comp->zones, zone);
|
||||
zone->num = scr->screen;
|
||||
free(zone->randr2_id);
|
||||
zone->randr2_id = NULL;
|
||||
if (scr->id) zone->randr2_id = strdup(scr->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
zone = e_zone_new(scr->screen, scr->escreen,
|
||||
scr->x, scr->y, scr->w, scr->h);
|
||||
if (scr->id) zone->randr2_id = strdup(scr->id);
|
||||
printf("@@@ NEW ZONE = %p\n", zone);
|
||||
changed = EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -1788,6 +1788,7 @@ _e_comp_smart_cb_frame_recalc(void *data, Evas_Object *obj, void *event_info EIN
|
|||
evas_object_resize(cw->ec->frame, cw->ec->zone->w, cw->ec->zone->h);
|
||||
else if (cw->ec->new_client)
|
||||
{
|
||||
if ((cw->ec->w < 1) || (cw->ec->h < 1)) return;
|
||||
e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h);
|
||||
evas_object_resize(cw->ec->frame, w, h);
|
||||
}
|
||||
|
@ -2971,11 +2972,14 @@ e_comp_object_frame_geometry_get(Evas_Object *obj, int *l, int *r, int *t, int *
|
|||
E_API void
|
||||
e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
|
||||
{
|
||||
Eina_Bool calc;
|
||||
|
||||
API_ENTRY;
|
||||
if (cw->frame_object)
|
||||
CRI("ACK!");
|
||||
if ((cw->client_inset.l == l) && (cw->client_inset.r == r) &&
|
||||
(cw->client_inset.t == t) && (cw->client_inset.b == b)) return;
|
||||
calc = cw->client_inset.calc;
|
||||
cw->client_inset.calc = l || r || t || b;
|
||||
eina_stringshare_replace(&cw->frame_theme, "borderless");
|
||||
if (cw->client_inset.calc)
|
||||
|
@ -2983,14 +2987,22 @@ e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
|
|||
cw->ec->w += (l + r) - (cw->client_inset.l + cw->client_inset.r);
|
||||
cw->ec->h += (t + b) - (cw->client_inset.t + cw->client_inset.b);
|
||||
}
|
||||
else if ((!e_client_has_xwindow(cw->ec)) && (cw->ec->maximized || cw->ec->fullscreen))
|
||||
else if (cw->ec->maximized || cw->ec->fullscreen)
|
||||
{
|
||||
if (e_client_has_xwindow(cw->ec))
|
||||
{
|
||||
cw->ec->saved.x += l - cw->client_inset.l;
|
||||
cw->ec->saved.y += t - cw->client_inset.t;
|
||||
}
|
||||
else
|
||||
{
|
||||
cw->ec->saved.w -= ((l + r) - (cw->client_inset.l + cw->client_inset.r));
|
||||
cw->ec->saved.h -= ((t + b) - (cw->client_inset.t + cw->client_inset.b));
|
||||
}
|
||||
}
|
||||
if (!cw->ec->new_client)
|
||||
{
|
||||
if (cw->client_inset.calc)
|
||||
if ((calc || (!e_client_has_xwindow(cw->ec))) && cw->client_inset.calc)
|
||||
{
|
||||
cw->ec->x -= l - cw->client_inset.l;
|
||||
cw->ec->y -= t - cw->client_inset.t;
|
||||
|
@ -3756,7 +3768,6 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
|
|||
Evas_Object *o;
|
||||
int w, h;
|
||||
unsigned int *pix = NULL;
|
||||
Eina_Bool argb = EINA_FALSE;
|
||||
|
||||
SOFT_ENTRY(NULL);
|
||||
|
||||
|
@ -3772,7 +3783,6 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
|
|||
return o;
|
||||
}
|
||||
if ((!cw->ec) || (!e_pixmap_size_get(cw->ec->pixmap, &w, &h))) return NULL;
|
||||
if ((!cw->native) && (!e_pixmap_image_exists(cw->ec->pixmap))) return NULL;
|
||||
o = evas_object_image_filled_add(evas_object_evas_get(obj));
|
||||
evas_object_image_colorspace_set(o, EVAS_COLORSPACE_ARGB8888);
|
||||
evas_object_image_smooth_scale_set(o, e_comp_config_get()->smooth_windows);
|
||||
|
@ -3787,10 +3797,7 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
|
|||
evas_object_image_size_set(o, w, h);
|
||||
|
||||
if (cw->ec->shaped)
|
||||
{
|
||||
if (!e_pixmap_image_exists(cw->ec->pixmap)) return o;
|
||||
pix = evas_object_image_data_get(cw->obj, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cw->native)
|
||||
|
@ -3805,16 +3812,9 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
|
|||
evas_object_image_native_surface_set(o, &ns);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!e_pixmap_image_exists(cw->ec->pixmap)) return o;
|
||||
argb = e_pixmap_image_is_argb(cw->ec->pixmap);
|
||||
if (argb)
|
||||
pix = e_pixmap_image_data_get(cw->ec->pixmap);
|
||||
else
|
||||
pix = evas_object_image_data_get(cw->obj, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
if (pix)
|
||||
{
|
||||
Eina_Bool dirty;
|
||||
|
@ -3830,7 +3830,6 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
|
|||
//evas_object_image_border_set(o, bx, by, bxx, byy);
|
||||
//evas_object_image_border_center_fill_set(o, EVAS_BORDER_FILL_SOLID);
|
||||
evas_object_image_data_set(o, pix);
|
||||
if (!argb)
|
||||
evas_object_image_data_set(cw->obj, pix);
|
||||
if (dirty)
|
||||
evas_object_image_data_update_add(o, 0, 0, w, h);
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#define COMPOSITOR_VERSION 3
|
||||
|
||||
E_API int E_EVENT_WAYLAND_GLOBAL_ADD = -1;
|
||||
E_API Ecore_Wl2_Display *ewd = NULL;
|
||||
|
||||
#include "session-recovery-server-protocol.h"
|
||||
|
||||
#ifndef EGL_HEIGHT
|
||||
|
@ -69,27 +71,11 @@ _e_comp_wl_focus_check(void)
|
|||
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_wl_log_cb_print(const char *format, va_list args)
|
||||
{
|
||||
EINA_LOG_DOM_INFO(e_log_dom, format, args);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_wl_cb_read(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
|
||||
{
|
||||
/* dispatch pending wayland events */
|
||||
wl_event_loop_dispatch(e_comp_wl->wl.loop, 0);
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_wl_cb_prepare(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
|
||||
{
|
||||
/* flush pending client events */
|
||||
wl_display_flush_clients(e_comp_wl->wl.disp);
|
||||
}
|
||||
/* static void */
|
||||
/* _e_comp_wl_log_cb_print(const char *format, va_list args) */
|
||||
/* { */
|
||||
/* EINA_LOG_DOM_INFO(e_log_dom, format, args); */
|
||||
/* } */
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_wl_cb_module_idle(void *data EINA_UNUSED)
|
||||
|
@ -580,6 +566,8 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event
|
|||
|
||||
x = ec->mouse.last_down[ec->moveinfo.down.button - 1].w;
|
||||
y = ec->mouse.last_down[ec->moveinfo.down.button - 1].h;
|
||||
if (e_comp_object_frame_exists(ec->frame))
|
||||
e_comp_object_frame_wh_unadjust(ec->frame, x, y, &x, &y);
|
||||
|
||||
switch (ec->resize_mode)
|
||||
{
|
||||
|
@ -1572,7 +1560,7 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED,
|
|||
|
||||
if (!(res =
|
||||
wl_resource_create(client, &wl_compositor_interface,
|
||||
MIN(version, COMPOSITOR_VERSION), id)))
|
||||
version, id)))
|
||||
{
|
||||
ERR("Could not create compositor resource: %m");
|
||||
wl_client_post_no_memory(client);
|
||||
|
@ -1599,7 +1587,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);
|
||||
/* if (e_comp_wl->fd_hdlr) ecore_main_fd_handler_del(e_comp_wl->fd_hdlr); */
|
||||
|
||||
/* free allocated data structure */
|
||||
free(e_comp_wl);
|
||||
|
@ -2008,7 +1996,7 @@ _e_comp_wl_subcompositor_cb_bind(struct wl_client *client, void *data EINA_UNUSE
|
|||
|
||||
if (!(res =
|
||||
wl_resource_create(client, &wl_subcompositor_interface,
|
||||
MIN(version, 1), id)))
|
||||
version, id)))
|
||||
{
|
||||
ERR("Could not create subcompositor resource: %m");
|
||||
wl_client_post_no_memory(client);
|
||||
|
@ -2160,7 +2148,7 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec)
|
|||
/* set initial client properties */
|
||||
ec->argb = EINA_TRUE;
|
||||
ec->no_shape_cut = EINA_TRUE;
|
||||
ec->ignored = 1;
|
||||
ec->redirected = ec->ignored = 1;
|
||||
ec->border_size = 0;
|
||||
|
||||
/* NB: could not find a better place to do this, BUT for internal windows,
|
||||
|
@ -2424,7 +2412,7 @@ _e_comp_wl_cb_output_bind(struct wl_client *client, void *data, uint32_t version
|
|||
if (!(output = data)) return;
|
||||
|
||||
resource =
|
||||
wl_resource_create(client, &wl_output_interface, MIN(version, 2), id);
|
||||
wl_resource_create(client, &wl_output_interface, version, id);
|
||||
if (!resource)
|
||||
{
|
||||
wl_client_post_no_memory(client);
|
||||
|
@ -2459,8 +2447,6 @@ static Eina_Bool
|
|||
_e_comp_wl_compositor_create(void)
|
||||
{
|
||||
E_Comp_Wl_Data *cdata;
|
||||
const char *name;
|
||||
int fd = 0;
|
||||
|
||||
/* check for existing compositor. create if needed */
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_NONE)
|
||||
|
@ -2477,24 +2463,25 @@ _e_comp_wl_compositor_create(void)
|
|||
e_comp_wl = e_comp->wl_comp_data = cdata;
|
||||
|
||||
/* set wayland log handler */
|
||||
wl_log_set_handler_server(_e_comp_wl_log_cb_print);
|
||||
/* wl_log_set_handler_server(_e_comp_wl_log_cb_print); */
|
||||
|
||||
/* try to create a wayland display */
|
||||
if (!(cdata->wl.disp = wl_display_create()))
|
||||
/* try to create an ecore_wl2 display */
|
||||
ewd = ecore_wl2_display_create(NULL);
|
||||
if (!ewd)
|
||||
{
|
||||
ERR("Could not create a Wayland display: %m");
|
||||
free(cdata);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
cdata->wl.disp = ecore_wl2_display_get(ewd);
|
||||
if (!cdata->wl.disp)
|
||||
{
|
||||
ERR("Could not create a Wayland display: %m");
|
||||
goto disp_err;
|
||||
}
|
||||
|
||||
/* try to setup wayland socket */
|
||||
if (!(name = wl_display_add_socket_auto(cdata->wl.disp)))
|
||||
{
|
||||
ERR("Could not create Wayland display socket: %m");
|
||||
goto sock_err;
|
||||
}
|
||||
|
||||
/* set wayland display environment variable */
|
||||
e_env_set("WAYLAND_DISPLAY", name);
|
||||
/* e_env_set("WAYLAND_DISPLAY", name); */
|
||||
|
||||
/* initialize compositor signals */
|
||||
wl_signal_init(&cdata->signals.surface.create);
|
||||
|
@ -2596,19 +2583,6 @@ _e_comp_wl_compositor_create(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* get the wayland display loop */
|
||||
cdata->wl.loop = wl_display_get_event_loop(cdata->wl.disp);
|
||||
|
||||
/* get the file descriptor of the wayland event loop */
|
||||
fd = wl_event_loop_get_fd(cdata->wl.loop);
|
||||
|
||||
/* create a listener for wayland main loop events */
|
||||
cdata->fd_hdlr =
|
||||
ecore_main_fd_handler_add(fd, (ECORE_FD_READ | ECORE_FD_ERROR),
|
||||
_e_comp_wl_cb_read, cdata, NULL, NULL);
|
||||
ecore_main_fd_handler_prepare_callback_set(cdata->fd_hdlr,
|
||||
_e_comp_wl_cb_prepare, cdata);
|
||||
|
||||
/* setup module idler to load shell mmodule */
|
||||
ecore_idler_add(_e_comp_wl_cb_module_idle, cdata);
|
||||
|
||||
|
@ -2625,9 +2599,9 @@ input_err:
|
|||
e_comp_wl_data_manager_shutdown();
|
||||
data_err:
|
||||
comp_global_err:
|
||||
e_env_unset("WAYLAND_DISPLAY");
|
||||
sock_err:
|
||||
wl_display_destroy(cdata->wl.disp);
|
||||
/* e_env_unset("WAYLAND_DISPLAY"); */
|
||||
/* sock_err: */
|
||||
ecore_wl2_display_destroy(ewd);
|
||||
disp_err:
|
||||
free(cdata);
|
||||
return EINA_FALSE;
|
||||
|
@ -2697,12 +2671,10 @@ e_comp_wl_init(void)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
ecore_wl_server_mode_set(1);
|
||||
|
||||
/* try to init ecore_wayland */
|
||||
if (!ecore_wl_init(NULL))
|
||||
if (!ecore_wl2_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore_Wayland!\n"));
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore_Wl2!\n"));
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -2774,24 +2746,27 @@ e_comp_wl_shutdown(void)
|
|||
/* free handlers */
|
||||
E_FREE_LIST(handlers, ecore_event_handler_del);
|
||||
|
||||
while (e_comp_wl->wl.globals)
|
||||
{
|
||||
Ecore_Wl_Global *global;
|
||||
/* while (e_comp_wl->wl.globals) */
|
||||
/* { */
|
||||
/* Ecore_Wl_Global *global; */
|
||||
|
||||
global =
|
||||
EINA_INLIST_CONTAINER_GET(e_comp_wl->wl.globals, Ecore_Wl_Global);
|
||||
/* global = */
|
||||
/* EINA_INLIST_CONTAINER_GET(e_comp_wl->wl.globals, Ecore_Wl_Global); */
|
||||
|
||||
e_comp_wl->wl.globals =
|
||||
eina_inlist_remove(e_comp_wl->wl.globals, e_comp_wl->wl.globals);
|
||||
/* e_comp_wl->wl.globals = */
|
||||
/* eina_inlist_remove(e_comp_wl->wl.globals, e_comp_wl->wl.globals); */
|
||||
|
||||
/* free(global->interface); */
|
||||
/* free(global); */
|
||||
/* } */
|
||||
|
||||
free(global->interface);
|
||||
free(global);
|
||||
}
|
||||
if (e_comp_wl->wl.shm) wl_shm_destroy(e_comp_wl->wl.shm);
|
||||
_e_comp_wl_gl_shutdown();
|
||||
|
||||
ecore_wl2_display_destroy(ewd);
|
||||
|
||||
/* shutdown ecore_wayland */
|
||||
ecore_wl_shutdown();
|
||||
ecore_wl2_shutdown();
|
||||
}
|
||||
|
||||
EINTERN struct wl_resource *
|
||||
|
|
|
@ -102,7 +102,7 @@ struct _E_Comp_Wl_Data
|
|||
{
|
||||
struct wl_display *disp;
|
||||
struct wl_registry *registry; // only used for nested wl compositors
|
||||
struct wl_event_loop *loop;
|
||||
/* struct wl_event_loop *loop; */
|
||||
Eina_Inlist *globals; // only used for nested wl compositors
|
||||
struct wl_shm *shm; // only used for nested wl compositors
|
||||
Evas_GL *gl;
|
||||
|
@ -140,6 +140,7 @@ struct _E_Comp_Wl_Data
|
|||
{
|
||||
struct wl_resource *shell;
|
||||
struct wl_resource *xdg_shell;
|
||||
struct wl_resource *draw_modes;
|
||||
} shell_interface;
|
||||
|
||||
struct
|
||||
|
@ -272,6 +273,7 @@ struct _E_Comp_Wl_Client_Data
|
|||
void (*map)(struct wl_resource *resource);
|
||||
void (*unmap)(struct wl_resource *resource);
|
||||
Eina_Rectangle window;
|
||||
Eina_Bool draw_mode_noshadow;
|
||||
} shell;
|
||||
|
||||
E_Comp_Wl_Buffer_Ref buffer_ref;
|
||||
|
@ -340,6 +342,8 @@ E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timest
|
|||
|
||||
E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD;
|
||||
|
||||
E_API extern Ecore_Wl2_Display *ewd;
|
||||
|
||||
# ifndef HAVE_WAYLAND_ONLY
|
||||
EINTERN void e_comp_wl_xwayland_client_queue(E_Client *ec);
|
||||
static inline E_Comp_X_Client_Data *
|
||||
|
|
|
@ -263,7 +263,6 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour
|
|||
_e_comp_wl_data_device_data_offer_create(source,
|
||||
data_device_res);
|
||||
wl_data_device_send_selection(data_device_res, offer_res);
|
||||
|
||||
}
|
||||
else if (data_device_res)
|
||||
wl_data_device_send_selection(data_device_res, NULL);
|
||||
|
@ -302,8 +301,10 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
|
|||
if (e_client_has_xwindow(e_comp_wl->selection.target))
|
||||
{
|
||||
ecore_x_client_message32_send(e_client_util_win_get(e_comp_wl->selection.target),
|
||||
ECORE_X_ATOM_XDND_DROP, ECORE_X_EVENT_MASK_NONE,
|
||||
e_comp->cm_selection, 0, ecore_x_current_time_get(), 0, 0);
|
||||
ECORE_X_ATOM_XDND_DROP,
|
||||
ECORE_X_EVENT_MASK_NONE,
|
||||
e_comp->cm_selection, 0,
|
||||
ecore_x_current_time_get(), 0, 0);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -319,7 +320,8 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
|
|||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_util_has_xwayland())
|
||||
{
|
||||
ecore_x_selection_owner_set(0, ECORE_X_ATOM_SELECTION_XDND, ecore_x_current_time_get());
|
||||
ecore_x_selection_owner_set(0, ECORE_X_ATOM_SELECTION_XDND,
|
||||
ecore_x_current_time_get());
|
||||
ecore_x_window_hide(e_comp->cm_selection);
|
||||
}
|
||||
#endif
|
||||
|
@ -340,7 +342,8 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
|
|||
|
||||
DBG("Data Device Drag Start");
|
||||
|
||||
if ((e_comp_wl->kbd.focus) && (e_comp_wl->kbd.focus != origin_resource)) return;
|
||||
if ((e_comp_wl->kbd.focus) && (e_comp_wl->kbd.focus != origin_resource))
|
||||
return;
|
||||
|
||||
if (!(source = wl_resource_get_user_data(source_resource))) return;
|
||||
e_comp_wl->drag_source = source;
|
||||
|
@ -371,9 +374,10 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
|
|||
}
|
||||
|
||||
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);
|
||||
e_comp_wl->drag->button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
|
||||
e_comp_wl->drag = e_drag_new(x, y, NULL, 0, NULL, 0, NULL,
|
||||
_e_comp_wl_data_device_drag_finished);
|
||||
e_comp_wl->drag->button_mask =
|
||||
evas_pointer_button_down_mask_get(e_comp->evas);
|
||||
if (ec)
|
||||
e_drag_object_set(e_comp_wl->drag, ec->frame);
|
||||
e_drag_start(e_comp_wl->drag, x, y);
|
||||
|
@ -381,7 +385,9 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
|
|||
if (e_comp_util_has_xwayland())
|
||||
{
|
||||
ecore_x_window_show(e_comp->cm_selection);
|
||||
ecore_x_selection_owner_set(e_comp->cm_selection, ECORE_X_ATOM_SELECTION_XDND, ecore_x_current_time_get());
|
||||
ecore_x_selection_owner_set(e_comp->cm_selection,
|
||||
ECORE_X_ATOM_SELECTION_XDND,
|
||||
ecore_x_current_time_get());
|
||||
}
|
||||
#endif
|
||||
if (e_comp_wl->ptr.ec)
|
||||
|
@ -441,7 +447,8 @@ _e_comp_wl_data_manager_cb_device_get(struct wl_client *client, struct wl_resour
|
|||
}
|
||||
|
||||
eina_hash_add(e_comp_wl->mgr.data_resources, &client, res);
|
||||
wl_resource_set_implementation(res, &_e_data_device_interface, e_comp->wl_comp_data,
|
||||
wl_resource_set_implementation(res, &_e_data_device_interface,
|
||||
e_comp->wl_comp_data,
|
||||
_e_comp_wl_data_device_cb_unbind);
|
||||
}
|
||||
|
||||
|
@ -469,7 +476,8 @@ _e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data EINA_UNUSED
|
|||
struct wl_resource *res;
|
||||
|
||||
/* try to create data manager resource */
|
||||
e_comp_wl->mgr.resource = res = wl_resource_create(client, &wl_data_device_manager_interface, 1, id);
|
||||
e_comp_wl->mgr.resource = res =
|
||||
wl_resource_create(client, &wl_data_device_manager_interface, 1, id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create data device manager: %m");
|
||||
|
@ -658,7 +666,9 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
|
|||
uint32_t serial;
|
||||
int x, y;
|
||||
|
||||
if (e_client_has_xwindow(ec) && e_client_has_xwindow(e_comp_wl->drag_client)) return;
|
||||
if (e_client_has_xwindow(ec) &&
|
||||
e_client_has_xwindow(e_comp_wl->drag_client))
|
||||
return;
|
||||
if (!e_client_has_xwindow(ec))
|
||||
{
|
||||
data_device_res =
|
||||
|
@ -668,7 +678,8 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
|
|||
if (e_comp_wl->drag_source && (!offer_res)) return;
|
||||
}
|
||||
e_comp_wl->selection.target = ec;
|
||||
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL, _e_comp_wl_data_device_target_del, ec);
|
||||
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL,
|
||||
_e_comp_wl_data_device_target_del, ec);
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_client_has_xwindow(ec))
|
||||
|
@ -703,8 +714,10 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
|
|||
}
|
||||
|
||||
ecore_x_client_message32_send(e_client_util_win_get(ec),
|
||||
ECORE_X_ATOM_XDND_ENTER, ECORE_X_EVENT_MASK_NONE,
|
||||
ECORE_X_ATOM_XDND_ENTER,
|
||||
ECORE_X_EVENT_MASK_NONE,
|
||||
e_comp->cm_selection, d1, d2, d3, d4);
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -712,7 +725,8 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
|
|||
y = wl_fixed_to_int(e_comp_wl->ptr.y) - e_comp_wl->selection.target->client.y;
|
||||
serial = wl_display_next_serial(e_comp_wl->wl.disp);
|
||||
wl_data_device_send_enter(data_device_res, serial, ec->comp_data->surface,
|
||||
wl_fixed_from_int(x), wl_fixed_from_int(y), offer_res);
|
||||
wl_fixed_from_int(x), wl_fixed_from_int(y),
|
||||
offer_res);
|
||||
}
|
||||
|
||||
E_API void
|
||||
|
@ -720,15 +734,19 @@ e_comp_wl_data_device_send_leave(E_Client *ec)
|
|||
{
|
||||
struct wl_resource *res;
|
||||
|
||||
if (e_client_has_xwindow(ec) && e_client_has_xwindow(e_comp_wl->drag_client)) return;
|
||||
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_DEL, _e_comp_wl_data_device_target_del, ec);
|
||||
if (e_client_has_xwindow(ec) &&
|
||||
e_client_has_xwindow(e_comp_wl->drag_client))
|
||||
return;
|
||||
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_DEL,
|
||||
_e_comp_wl_data_device_target_del, ec);
|
||||
if (e_comp_wl->selection.target == ec)
|
||||
e_comp_wl->selection.target = NULL;
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_client_has_xwindow(ec))
|
||||
{
|
||||
ecore_x_client_message32_send(e_client_util_win_get(ec),
|
||||
ECORE_X_ATOM_XDND_LEAVE, ECORE_X_EVENT_MASK_NONE,
|
||||
ECORE_X_ATOM_XDND_LEAVE,
|
||||
ECORE_X_EVENT_MASK_NONE,
|
||||
e_comp->cm_selection, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -749,7 +767,11 @@ e_comp_wl_data_device_send_offer(E_Client *ec)
|
|||
if (!data_device_res) return NULL;
|
||||
source = e_comp_wl->drag_source;
|
||||
if (source)
|
||||
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);
|
||||
}
|
||||
|
||||
return offer_res;
|
||||
}
|
||||
|
||||
|
@ -784,7 +806,9 @@ e_comp_wl_data_device_keyboard_focus_set(void)
|
|||
else if (source && e_client_has_xwindow(e_client_focused_get()))
|
||||
{
|
||||
/* wl -> x11 */
|
||||
ecore_x_selection_owner_set(e_comp->cm_selection, ECORE_X_ATOM_SELECTION_CLIPBOARD, ecore_x_current_time_get());
|
||||
ecore_x_selection_owner_set(e_comp->cm_selection,
|
||||
ECORE_X_ATOM_SELECTION_CLIPBOARD,
|
||||
ecore_x_current_time_get());
|
||||
return;
|
||||
}
|
||||
} while (0);
|
||||
|
@ -794,7 +818,11 @@ e_comp_wl_data_device_keyboard_focus_set(void)
|
|||
if (!data_device_res) return;
|
||||
|
||||
if (source)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -894,7 +922,8 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd
|
|||
{
|
||||
if (!source->data_source.mime_types)
|
||||
source->data_source.mime_types = eina_array_new(1);
|
||||
eina_array_push(source->data_source.mime_types, eina_stringshare_add(mime_type));
|
||||
eina_array_push(source->data_source.mime_types,
|
||||
eina_stringshare_add(mime_type));
|
||||
}
|
||||
|
||||
if (fd > 0)
|
||||
|
|
|
@ -126,9 +126,13 @@ _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource)
|
|||
e_comp_wl->kbd.resources =
|
||||
eina_list_remove(e_comp_wl->kbd.resources, resource);
|
||||
EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
|
||||
{
|
||||
if (res == resource)
|
||||
{
|
||||
e_comp_wl->kbd.focused =
|
||||
eina_list_remove_list(e_comp_wl->kbd.focused, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -169,8 +173,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
|
|||
wl_resource_get_version(resource), id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create keyboard on seat %s: %m",
|
||||
e_comp_wl->seat.name);
|
||||
ERR("Could not create keyboard on seat %s: %m", e_comp_wl->seat.name);
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
@ -181,14 +184,13 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
|
|||
e_comp->wl_comp_data,
|
||||
_e_comp_wl_input_cb_keyboard_unbind);
|
||||
|
||||
/* FIXME: These values should be configurable */
|
||||
/* send current repeat_info */
|
||||
if (wl_resource_get_version(res) >= WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION)
|
||||
wl_keyboard_send_repeat_info(res, 25, 400);
|
||||
wl_keyboard_send_repeat_info(res, e_config->keyboard.repeat_rate, e_config->keyboard.repeat_delay);
|
||||
|
||||
/* send current keymap */
|
||||
wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
e_comp_wl->xkb.fd,
|
||||
e_comp_wl->xkb.size);
|
||||
e_comp_wl->xkb.fd, e_comp_wl->xkb.size);
|
||||
|
||||
/* if the client owns the focused surface, we need to send an enter */
|
||||
focused = e_client_focused_get();
|
||||
|
@ -249,7 +251,7 @@ _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data EINA_UNUSED,
|
|||
{
|
||||
struct wl_resource *res;
|
||||
|
||||
res = wl_resource_create(client, &wl_seat_interface, MIN(version, 4), id);
|
||||
res = wl_resource_create(client, &wl_seat_interface, version, id);
|
||||
if (!res)
|
||||
{
|
||||
ERR("Could not create seat resource: %m");
|
||||
|
@ -403,8 +405,7 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap)
|
|||
/* send updated keymap */
|
||||
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,
|
||||
e_comp_wl->xkb.size);
|
||||
e_comp_wl->xkb.fd, e_comp_wl->xkb.size);
|
||||
|
||||
/* update modifiers */
|
||||
e_comp_wl_input_keyboard_modifiers_update();
|
||||
|
@ -501,18 +502,15 @@ e_comp_wl_input_keyboard_modifiers_serialize(void)
|
|||
xkb_mod_mask_t mod;
|
||||
xkb_layout_index_t grp;
|
||||
|
||||
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state,
|
||||
XKB_STATE_DEPRESSED);
|
||||
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_DEPRESSED);
|
||||
changed |= mod != e_comp_wl->kbd.mod_depressed;
|
||||
e_comp_wl->kbd.mod_depressed = mod;
|
||||
|
||||
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state,
|
||||
XKB_STATE_MODS_LATCHED);
|
||||
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LATCHED);
|
||||
changed |= mod != e_comp_wl->kbd.mod_latched;
|
||||
e_comp_wl->kbd.mod_latched = mod;
|
||||
|
||||
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state,
|
||||
XKB_STATE_MODS_LOCKED);
|
||||
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LOCKED);
|
||||
changed |= mod != e_comp_wl->kbd.mod_locked;
|
||||
e_comp_wl->kbd.mod_locked = mod;
|
||||
|
||||
|
|
|
@ -1561,8 +1561,8 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
|
|||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
x = ox = ec->x;
|
||||
y = oy = ec->y;
|
||||
x = ox = ec->client.x;
|
||||
y = oy = ec->client.y;
|
||||
w = ow = ec->client.w;
|
||||
h = oh = ec->client.h;
|
||||
|
||||
|
@ -1599,6 +1599,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
|
|||
h = ev->h, _e_comp_x_client_data_get(ec)->initial_attributes.h = ev->h;
|
||||
}
|
||||
|
||||
e_comp_object_frame_xy_adjust(ec->frame, x, y, &x, &y);
|
||||
e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h);
|
||||
|
||||
move = (x != ec->x) || (y != ec->y);
|
||||
|
@ -1610,8 +1611,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
|
|||
{
|
||||
E_Zone *zone;
|
||||
|
||||
ec->saved.x = x;
|
||||
ec->saved.y = y;
|
||||
e_comp_object_frame_xy_unadjust(ec->frame, x, y, &ec->saved.x, &ec->saved.y);
|
||||
|
||||
zone = e_comp_zone_xy_get(x, y);
|
||||
if (zone && (zone->x || zone->y))
|
||||
|
@ -1643,10 +1643,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
|
|||
if (resize && (!ec->lock_client_size) && (move || ((!ec->maximized) && (!ec->fullscreen))))
|
||||
{
|
||||
if ((ec->maximized & E_MAXIMIZE_TYPE) != E_MAXIMIZE_NONE)
|
||||
{
|
||||
ec->saved.w = w;
|
||||
ec->saved.h = h;
|
||||
}
|
||||
e_comp_object_frame_wh_unadjust(ec->frame, w, h, &ec->saved.w, &ec->saved.h);
|
||||
else
|
||||
{
|
||||
evas_object_resize(ec->frame, w, h);
|
||||
|
@ -2376,8 +2373,22 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M
|
|||
if ((!ec) && (ev->window != ev->event_window))
|
||||
ec = _e_comp_x_client_find_by_window(ev->event_window);
|
||||
if ((!ec) || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW;
|
||||
if ((!ec->mouse.in) && (!ec->hidden) && e_client_util_desk_visible(ec, e_desk_current_get(ec->zone)))
|
||||
e_client_mouse_in(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_x_root_adjust(ev->root.y));
|
||||
if ((!ec->mouse.in) && evas_object_visible_get(ec->frame) && (!ec->desk->animate_count))
|
||||
{
|
||||
E_Client *tec;
|
||||
Ecore_Window top = e_comp_top_window_at_xy_get(ev->root.x, ev->root.y);
|
||||
int x, y;
|
||||
if (top == e_comp->ee_win) return ECORE_CALLBACK_RENEW;
|
||||
|
||||
x = e_comp_canvas_x_root_adjust(ev->root.x);
|
||||
y = e_comp_canvas_x_root_adjust(ev->root.y);
|
||||
for (tec = e_client_above_get(ec); tec; tec = e_client_above_get(tec))
|
||||
{
|
||||
if (!evas_object_visible_get(tec->frame)) continue;
|
||||
if (E_INSIDE(x, y, tec->x, tec->y, tec->w, tec->h)) return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
e_client_mouse_in(ec, x, y);
|
||||
}
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
E_COMP_X_PIXMAP_CHECK ECORE_CALLBACK_RENEW;
|
||||
|
@ -5319,6 +5330,7 @@ e_comp_x_init(void)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_x_io_error_handler_set(_e_main_cb_x_fatal, NULL);
|
||||
|
||||
if (!ecore_x_composite_query())
|
||||
|
|
|
@ -525,6 +525,7 @@ _e_config_edd_init(Eina_Bool old)
|
|||
E_CONFIG_VAL(D, T, resize_info_visible, INT); /**/
|
||||
E_CONFIG_VAL(D, T, focus_last_focused_per_desktop, INT); /**/
|
||||
E_CONFIG_VAL(D, T, focus_revert_on_hide_or_close, INT); /**/
|
||||
E_CONFIG_VAL(D, T, focus_revert_allow_sticky, INT); /**/
|
||||
E_CONFIG_VAL(D, T, pointer_slide, INT); /**/
|
||||
E_CONFIG_VAL(D, T, disable_all_pointer_warps, INT); /**/
|
||||
E_CONFIG_VAL(D, T, pointer_warp_speed, DOUBLE); /**/
|
||||
|
@ -733,6 +734,9 @@ _e_config_edd_init(Eina_Bool old)
|
|||
E_CONFIG_VAL(D, T, xkb.dont_touch_my_damn_keyboard, UCHAR);
|
||||
E_CONFIG_VAL(D, T, xkb.default_model, STR);
|
||||
|
||||
E_CONFIG_VAL(D, T, keyboard.repeat_delay, INT);
|
||||
E_CONFIG_VAL(D, T, keyboard.repeat_rate, INT);
|
||||
|
||||
if (old)
|
||||
{
|
||||
E_CONFIG_SUB(D, T, xkb.current_layout, _e_config_xkb_option_edd);
|
||||
|
@ -1326,6 +1330,14 @@ e_config_load(void)
|
|||
free(ecc);
|
||||
}
|
||||
}
|
||||
CONFIG_VERSION_CHECK(19)
|
||||
{
|
||||
CONFIG_VERSION_UPDATE_INFO(19);
|
||||
|
||||
/* set (400, 25) as the default values of repeat delay, rate */
|
||||
e_config->keyboard.repeat_delay = 400;
|
||||
e_config->keyboard.repeat_rate = 25;
|
||||
}
|
||||
}
|
||||
if (!e_config->remember_internal_fm_windows)
|
||||
e_config->remember_internal_fm_windows = !!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);
|
||||
|
@ -1399,6 +1411,7 @@ e_config_load(void)
|
|||
E_CONFIG_LIMIT(e_config->resize_info_visible, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->focus_revert_allow_sticky, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->pointer_slide, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->disable_all_pointer_warps, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->pointer_warp_speed, 0.0, 1.0);
|
||||
|
@ -1504,6 +1517,9 @@ e_config_load(void)
|
|||
E_CONFIG_LIMIT(e_config->backlight.dim, 0.05, 1.0);
|
||||
E_CONFIG_LIMIT(e_config->backlight.idle_dim, 0, 1);
|
||||
|
||||
E_CONFIG_LIMIT(e_config->keyboard.repeat_delay, -1, 1000); // 1 second
|
||||
E_CONFIG_LIMIT(e_config->keyboard.repeat_rate, -1, 1000); // 1 second
|
||||
|
||||
if (!e_config->icon_theme)
|
||||
e_config->icon_theme = eina_stringshare_add("hicolor"); // FDO default
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ typedef enum
|
|||
/* increment this whenever a new set of config values are added but the users
|
||||
* config doesn't need to be wiped - simply new values need to be put in
|
||||
*/
|
||||
#define E_CONFIG_FILE_GENERATION 18
|
||||
#define E_CONFIG_FILE_GENERATION 19
|
||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
|
||||
|
||||
#define E_CONFIG_BINDINGS_VERSION 0 // DO NOT INCREMENT UNLESS YOU WANT TO WIPE ALL BINDINGS!!!!!
|
||||
|
@ -161,6 +161,7 @@ struct _E_Config
|
|||
int resize_info_visible; // GUI
|
||||
int focus_last_focused_per_desktop; // GUI
|
||||
int focus_revert_on_hide_or_close; // GUI
|
||||
int focus_revert_allow_sticky; // GUI
|
||||
int disable_all_pointer_warps; // GUI
|
||||
int pointer_slide; // GUI
|
||||
double pointer_warp_speed; // GUI
|
||||
|
@ -429,6 +430,12 @@ struct _E_Config
|
|||
const char *desklock_layout;
|
||||
} xkb;
|
||||
|
||||
struct
|
||||
{
|
||||
int repeat_delay;//delay in milliseconds since key down until repeating starts
|
||||
int repeat_rate;//the rate of repeating keys in characters per second
|
||||
} keyboard;
|
||||
|
||||
Eina_List *menu_applications;
|
||||
unsigned char exe_always_single_instance; // GUI
|
||||
int use_desktop_window_profile; // GUI
|
||||
|
|
|
@ -377,7 +377,7 @@ e_desk_last_focused_focus(E_Desk *desk)
|
|||
/* this was the window last focused in this desktop */
|
||||
if (!ec->lock_focus_out)
|
||||
{
|
||||
if (ec->sticky)
|
||||
if (ec->sticky && (!e_config->focus_revert_allow_sticky))
|
||||
{
|
||||
ecs = ec;
|
||||
continue;
|
||||
|
|
|
@ -567,10 +567,13 @@ _comp_object_check(Mirror *m)
|
|||
|
||||
evas_object_geometry_get(m->comp_object, NULL, NULL, &w, &h);
|
||||
if ((w < 2) || (h < 2)) return EINA_FALSE;
|
||||
if (m->mirror) evas_object_del(m->mirror);
|
||||
if (!m->mirror)
|
||||
{
|
||||
m->mirror = e_comp_object_util_mirror_add(m->comp_object);
|
||||
if (!m->mirror) return EINA_FALSE;
|
||||
}
|
||||
evas_object_smart_callback_del(m->comp_object, "dirty", _comp_object_dirty);
|
||||
if (m->added) return EINA_TRUE;
|
||||
evas_object_name_set(m->mirror, "m->mirror");
|
||||
_e_deskmirror_mirror_setup(m);
|
||||
return EINA_TRUE;
|
||||
|
@ -720,7 +723,7 @@ _client_desk_set(E_Smart_Data *sd, int type EINA_UNUSED, E_Event_Client_Desk_Set
|
|||
if (!e_client_util_desk_visible(ev->ec, sd->desk))
|
||||
eina_hash_del_by_key(sd->mirror_hash, &ev->ec->frame);
|
||||
}
|
||||
if (sd->desk == ev->ec->desk)
|
||||
if ((!m) && (sd->desk == ev->ec->desk))
|
||||
_e_deskmirror_mirror_add(sd, ev->ec->frame);
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ e_dpms_update(void)
|
|||
|
||||
enabled = ((e_config->screensaver_enable) &&
|
||||
(!e_config->mode.presentation) &&
|
||||
((!e_util_fullscreen_current_any()) && (!e_config->no_dpms_on_fullscreen))
|
||||
);
|
||||
((!e_util_fullscreen_current_any()) &&
|
||||
(!e_config->no_dpms_on_fullscreen)));
|
||||
if (_e_dpms_enabled != enabled)
|
||||
{
|
||||
_e_dpms_enabled = enabled;
|
||||
|
@ -98,7 +98,7 @@ e_dpms_force_update(void)
|
|||
off += OFF;
|
||||
}
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (!e_comp->comp_type == E_PIXMAP_TYPE_X) return;
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
ecore_x_dpms_timeouts_set(standby + 10, suspend + 10, off + 10);
|
||||
ecore_x_dpms_timeouts_set(standby, suspend, off);
|
||||
#endif
|
||||
|
@ -220,8 +220,10 @@ e_dpms_init(void)
|
|||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X)
|
||||
{
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_dpms_screensaver_on, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF_PRE, _e_dpms_screensaver_off, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON,
|
||||
_e_dpms_screensaver_on, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF_PRE,
|
||||
_e_dpms_screensaver_off, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -281,4 +283,3 @@ e_dpms_shutdown(void)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -5199,8 +5199,10 @@ _e_fm2_cb_eio_stat(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *s
|
|||
}
|
||||
|
||||
static void
|
||||
_e_fm2_cb_eio_err(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, int error EINA_UNUSED)
|
||||
_e_fm2_cb_eio_err(void *data, Eio_File *handler EINA_UNUSED, int error EINA_UNUSED)
|
||||
{
|
||||
E_Fm2_Icon *ic = data;
|
||||
ic->eio = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -74,12 +74,12 @@ void *alloca(size_t);
|
|||
typedef struct _E_Fm_Op_Task E_Fm_Op_Task;
|
||||
typedef struct _E_Fm_Op_Copy_Data E_Fm_Op_Copy_Data;
|
||||
|
||||
static E_Fm_Op_Task *_e_fm_op_task_new();
|
||||
static E_Fm_Op_Task *_e_fm_op_task_new(void);
|
||||
static void _e_fm_op_task_free(void *t);
|
||||
|
||||
static void _e_fm_op_remove_link_task(E_Fm_Op_Task *task);
|
||||
static Eina_Bool _e_fm_op_stdin_data(void *data, Ecore_Fd_Handler *fd_handler);
|
||||
static void _e_fm_op_set_up_idlers();
|
||||
static void _e_fm_op_set_up_idlers(void);
|
||||
static void _e_fm_op_delete_idler(int *mark);
|
||||
static int _e_fm_op_idler_handle_error(int *mark, Eina_List **queue, Eina_List **node, E_Fm_Op_Task *task);
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ _e_font_fontconfig_name_parse(Eina_Hash **font_hash, E_Font_Properties *efp, con
|
|||
s1 = strchr(font, ':');
|
||||
if (s1)
|
||||
{
|
||||
char *s2, *name, *style;
|
||||
char *s2, *name, *style, *temp;
|
||||
int len;
|
||||
|
||||
len = s1 - font;
|
||||
|
@ -171,7 +171,13 @@ _e_font_fontconfig_name_parse(Eina_Hash **font_hash, E_Font_Properties *efp, con
|
|||
if (s2)
|
||||
{
|
||||
len = s2 - name;
|
||||
temp = name;
|
||||
name = realloc(name, sizeof(char) * len + 1);
|
||||
if (!name)
|
||||
{
|
||||
free(temp);
|
||||
return NULL;
|
||||
}
|
||||
memset(name, 0, sizeof(char) * len + 1);
|
||||
strncpy(name, font, len);
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ struct _E_Gadcon_Client
|
|||
int seq, flags; /* goes to save */
|
||||
int state, resist;
|
||||
int prev_pos, prev_size;
|
||||
int want_save : 1;
|
||||
Eina_Bool want_save : 1;
|
||||
} state_info;
|
||||
|
||||
struct
|
||||
|
|
|
@ -37,7 +37,13 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
|
|||
ecore_x_pointer_ungrab();
|
||||
#else
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
ecore_wl_input_ungrab(ecore_wl_input_get());
|
||||
{
|
||||
Ecore_Wl2_Window *wl_win;
|
||||
|
||||
if ((wl_win = ecore_wl2_display_window_find(ewd, grab_mouse_win)))
|
||||
ecore_wl2_input_ungrab(ecore_wl2_window_input_get(wl_win),
|
||||
wl_win, 0);
|
||||
}
|
||||
#endif
|
||||
grab_mouse_win = 0;
|
||||
}
|
||||
|
@ -47,8 +53,15 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
|
|||
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_x_keyboard_ungrab();
|
||||
#else
|
||||
/* TODO */
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
ecore_wl_input_ungrab(ecore_wl_input_get());
|
||||
{
|
||||
Ecore_Wl2_Window *wl_win;
|
||||
|
||||
if ((wl_win = ecore_wl2_display_window_find(ewd, grab_key_win)))
|
||||
ecore_wl2_input_ungrab(ecore_wl2_window_input_get(wl_win),
|
||||
wl_win, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
grab_key_win = 0;
|
||||
|
@ -69,10 +82,11 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
|
|||
#else
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
Ecore_Wl_Window *wl_win;
|
||||
Ecore_Wl2_Window *wl_win;
|
||||
|
||||
if ((wl_win = ecore_wl_window_find(mouse_win)))
|
||||
ecore_wl_input_grab(ecore_wl_input_get(), wl_win, 0);
|
||||
if ((wl_win = ecore_wl2_display_window_find(ewd, mouse_win)))
|
||||
ecore_wl2_input_grab(ecore_wl2_window_input_get(wl_win),
|
||||
wl_win, 0);
|
||||
}
|
||||
#endif
|
||||
grab_mouse_win = mouse_win;
|
||||
|
@ -98,10 +112,11 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
|
|||
#else
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
Ecore_Wl_Window *wl_win;
|
||||
Ecore_Wl2_Window *wl_win;
|
||||
|
||||
if ((wl_win = ecore_wl_window_find(key_win)))
|
||||
ecore_wl_input_grab(ecore_wl_input_get(), wl_win, 0);
|
||||
if ((wl_win = ecore_wl2_display_window_find(key_win)))
|
||||
ecore_wl2_input_grab(ecore_wl2_window_input_get(wl_win),
|
||||
wl_win, 0);
|
||||
}
|
||||
#endif
|
||||
grab_key_win = key_win;
|
||||
|
@ -122,7 +137,13 @@ e_grabinput_release(Ecore_Window mouse_win, Ecore_Window key_win)
|
|||
ecore_x_pointer_ungrab();
|
||||
#else
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
ecore_wl_input_ungrab(ecore_wl_input_get());
|
||||
{
|
||||
Ecore_Wl2_Window *wl_win;
|
||||
|
||||
if ((wl_win = ecore_wl2_display_window_find(ewd, mouse_win)))
|
||||
ecore_wl2_input_ungrab(ecore_wl2_window_input_get(wl_win),
|
||||
wl_win, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
grab_mouse_win = 0;
|
||||
|
@ -134,7 +155,13 @@ e_grabinput_release(Ecore_Window mouse_win, Ecore_Window key_win)
|
|||
ecore_x_keyboard_ungrab();
|
||||
#else
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
ecore_wl_input_ungrab(ecore_wl_input_get());
|
||||
{
|
||||
Ecore_Wl2_Window *wl_win;
|
||||
|
||||
if ((wl_win = ecore_wl2_display_window_find(key_win)))
|
||||
ecore_wl2_input_grab(ecore_wl2_window_input_get(wl_win),
|
||||
wl_win, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
grab_key_win = 0;
|
||||
|
@ -192,7 +219,7 @@ static void
|
|||
_e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
Ecore_Wl_Window *wl_win;
|
||||
Ecore_Wl2_Window *wl_win;
|
||||
#endif
|
||||
|
||||
/* fprintf(stderr, "focus to %x method %i\n", win, method); */
|
||||
|
@ -212,7 +239,7 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
|
|||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
if ((wl_win = ecore_wl_window_find(win)))
|
||||
if ((wl_win = ecore_wl2_display_window_find(ewd, win)))
|
||||
{
|
||||
/* FIXME: Need to add an ecore_wl_window_focus function */
|
||||
}
|
||||
|
@ -227,7 +254,7 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
|
|||
#else
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
if ((wl_win = ecore_wl_window_find(win)))
|
||||
if ((wl_win = ecore_wl2_display_window_find(ewd, win)))
|
||||
{
|
||||
/* FIXME: Need to add an ecore_wl_window_focus function */
|
||||
}
|
||||
|
@ -242,7 +269,7 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
|
|||
#else
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
if ((wl_win = ecore_wl_window_find(win)))
|
||||
if ((wl_win = ecore_wl2_display_window_find(ewd, win)))
|
||||
{
|
||||
/* FIXME: Need to add an ecore_wl_window_focus function */
|
||||
}
|
||||
|
|
|
@ -352,10 +352,10 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown_push(ecore_shutdown);
|
||||
|
||||
e_first_frame = getenv("E_FIRST_FRAME");
|
||||
if (e_first_frame && (!e_first_frame[0]))
|
||||
e_first_frame = NULL;
|
||||
else
|
||||
if (e_first_frame && e_first_frame[0])
|
||||
e_first_frame_start_time = ecore_time_get();
|
||||
else
|
||||
e_first_frame = NULL;
|
||||
|
||||
TS("EIO Init");
|
||||
if (!eio_init())
|
||||
|
|
|
@ -31,7 +31,7 @@ struct _E_Menu
|
|||
const char *category;
|
||||
|
||||
struct {
|
||||
char visible : 1;
|
||||
Eina_Bool visible : 1;
|
||||
int x, y, w, h;
|
||||
} cur, prev;
|
||||
|
||||
|
|
|
@ -147,11 +147,33 @@ _module_is_nosave(const char *name)
|
|||
return !strncmp(name, "wl_", 3); //block wl_* modules from being saved
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_module_is_important(const char *name)
|
||||
{
|
||||
const char *list[] =
|
||||
{
|
||||
"xwayland",
|
||||
"wl_desktop_shell",
|
||||
"wl_drm",
|
||||
"wl_fb",
|
||||
"wl_text_input",
|
||||
"wl_weekeyboard",
|
||||
"wl_wl",
|
||||
"wl_x11",
|
||||
};
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < EINA_C_ARRAY_LENGTH(list); i++)
|
||||
if (eina_streq(name, list[i])) return EINA_TRUE;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
/* externally accessible functions */
|
||||
EINTERN int
|
||||
e_module_init(void)
|
||||
{
|
||||
Eina_List *module_paths;
|
||||
Eina_List *next_path;
|
||||
E_Path_Dir *epd;
|
||||
Eio_Monitor *mon;
|
||||
Eio_File *ls;
|
||||
|
@ -181,7 +203,7 @@ e_module_init(void)
|
|||
}
|
||||
}
|
||||
module_paths = e_path_dir_list_get(path_modules);
|
||||
EINA_LIST_FREE(module_paths, epd)
|
||||
EINA_LIST_FOREACH(module_paths, next_path, epd)
|
||||
{
|
||||
if (ecore_file_is_dir(epd->dir))
|
||||
{
|
||||
|
@ -192,10 +214,9 @@ e_module_init(void)
|
|||
ls = eio_file_direct_ls(epd->dir, _module_filter_cb, _module_main_cb, _module_done_cb, _module_error_cb, data);
|
||||
_e_module_path_monitors = eina_list_append(_e_module_path_monitors, mon);
|
||||
_e_module_path_lists = eina_list_append(_e_module_path_lists, ls);
|
||||
eina_stringshare_del(epd->dir);
|
||||
free(epd);
|
||||
}
|
||||
}
|
||||
e_path_dir_list_free(module_paths);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -535,6 +556,7 @@ e_module_disable(E_Module *m)
|
|||
E_OBJECT_CHECK_RETURN(m, 0);
|
||||
E_OBJECT_TYPE_CHECK_RETURN(m, E_MODULE_TYPE, 0);
|
||||
if ((!m->enabled) || (m->error)) return 0;
|
||||
if ((!stopping) && _module_is_important(m->name)) return 0;
|
||||
ret = m->func.shutdown ? m->func.shutdown(m) : 1;
|
||||
m->data = NULL;
|
||||
m->enabled = 0;
|
||||
|
|
|
@ -56,28 +56,24 @@ e_moveresize_replace(Eina_Bool enable)
|
|||
E_API void
|
||||
e_moveresize_client_extents(const E_Client *ec, int *w, int *h)
|
||||
{
|
||||
if (e_comp_object_frame_allowed(ec->frame))
|
||||
*w = ec->client.w, *h = ec->client.h;
|
||||
else
|
||||
*w = ec->w, *h = ec->h;
|
||||
if ((ec->icccm.base_w >= 0) &&
|
||||
(ec->icccm.base_h >= 0))
|
||||
{
|
||||
if (ec->icccm.step_w > 0)
|
||||
*w = (ec->client.w - ec->icccm.base_w) / ec->icccm.step_w;
|
||||
else
|
||||
*w = ec->client.w;
|
||||
*w = (*w - ec->icccm.base_w) / ec->icccm.step_w;
|
||||
if (ec->icccm.step_h > 0)
|
||||
*h = (ec->client.h - ec->icccm.base_h) / ec->icccm.step_h;
|
||||
else
|
||||
*h = ec->client.h;
|
||||
*h = (*h - ec->icccm.base_h) / ec->icccm.step_h;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ec->icccm.step_w > 0)
|
||||
*w = (ec->client.w - ec->icccm.min_w) / ec->icccm.step_w;
|
||||
else
|
||||
*w = ec->client.w;
|
||||
*w = (*w - ec->icccm.min_w) / ec->icccm.step_w;
|
||||
if (ec->icccm.step_h > 0)
|
||||
*h = (ec->client.h - ec->icccm.min_h) / ec->icccm.step_h;
|
||||
else
|
||||
*h = ec->client.h;
|
||||
*h = (*h - ec->icccm.min_h) / ec->icccm.step_h;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,115 +1,28 @@
|
|||
#include "e.h"
|
||||
|
||||
#define PATH "/org/enlightenment/wm/RemoteObject"
|
||||
|
||||
/* local subsystem functions */
|
||||
static void _e_msgbus_request_name_cb(void *data, const Eldbus_Message *msg,
|
||||
Eldbus_Pending *pending);
|
||||
static void _e_msgbus_request_name_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending);
|
||||
|
||||
static Eldbus_Message *_e_msgbus_core_version_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_core_restart_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_core_shutdown_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_core_version_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_core_restart_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_core_shutdown_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
|
||||
static Eldbus_Message *_e_msgbus_module_load_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_unload_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_enable_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_disable_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_list_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
|
||||
static Eldbus_Message *_e_msgbus_profile_set_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_get_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_list_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_add_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_delete_cb(const Eldbus_Service_Interface *iface,
|
||||
const Eldbus_Message *msg);
|
||||
|
||||
#define E_MSGBUS_WIN_ACTION_CB_PROTO(NAME) \
|
||||
static Eldbus_Message * _e_msgbus_window_##NAME##_cb(const Eldbus_Service_Interface * iface, \
|
||||
const Eldbus_Message * msg)
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(list);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(close);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(kill);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(focus);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(iconify);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(uniconify);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(maximize);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(unmaximize);
|
||||
|
||||
/* local subsystem globals */
|
||||
static E_Msgbus_Data *_e_msgbus_data = NULL;
|
||||
|
||||
static const Eldbus_Method core_methods[] = {
|
||||
static const Eldbus_Method core_methods[] =
|
||||
{
|
||||
{ "Version", NULL, ELDBUS_ARGS({"s", "version"}), _e_msgbus_core_version_cb, 0 },
|
||||
{ "Restart", NULL, NULL, _e_msgbus_core_restart_cb, 0 },
|
||||
{ "Shutdown", NULL, NULL, _e_msgbus_core_shutdown_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
static const Eldbus_Method module_methods[] = {
|
||||
{ "Load", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_load_cb, 0 },
|
||||
{ "Unload", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_unload_cb, 0 },
|
||||
{ "Enable", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_enable_cb, 0 },
|
||||
{ "Disable", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_disable_cb, 0 },
|
||||
{ "List", NULL, ELDBUS_ARGS({"a(si)", "modules"}),
|
||||
_e_msgbus_module_list_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
static const Eldbus_Method profile_methods[] = {
|
||||
{ "Set", ELDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_set_cb, 0 },
|
||||
{ "Get", NULL, ELDBUS_ARGS({"s", "profile"}), _e_msgbus_profile_get_cb, 0 },
|
||||
{ "List", NULL, ELDBUS_ARGS({"as", "array_profiles"}),
|
||||
_e_msgbus_profile_list_cb, 0 },
|
||||
{ "Add", ELDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_add_cb, 0 },
|
||||
{ "Delete", ELDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_delete_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
static const Eldbus_Method window_methods[] = {
|
||||
{ "List", NULL, ELDBUS_ARGS({"a(si)", "array_of_window"}),
|
||||
_e_msgbus_window_list_cb, 0 },
|
||||
{ "Close", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_close_cb, 0 },
|
||||
{ "Kill", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_kill_cb, 0 },
|
||||
{ "Focus", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_focus_cb, 0 },
|
||||
{ "Iconify", ELDBUS_ARGS({"i", "window_id"}), NULL,
|
||||
_e_msgbus_window_iconify_cb, 0 },
|
||||
{ "Uniconify", ELDBUS_ARGS({"i", "window_id"}), NULL,
|
||||
_e_msgbus_window_uniconify_cb, 0 },
|
||||
{ "Maximize", ELDBUS_ARGS({"i", "window_id"}), NULL,
|
||||
_e_msgbus_window_maximize_cb, 0 },
|
||||
{ "Unmaximize", ELDBUS_ARGS({"i", "window_id"}), NULL,
|
||||
_e_msgbus_window_unmaximize_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
#define PATH "/org/enlightenment/wm/RemoteObject"
|
||||
|
||||
static const Eldbus_Service_Interface_Desc core_desc = {
|
||||
"org.enlightenment.wm.Core", core_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc module_desc = {
|
||||
"org.enlightenment.wm.Module", module_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc profile_desc = {
|
||||
"org.enlightenment.wm.Profile", profile_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc window_desc = {
|
||||
"org.enlightenment.wm.Window", window_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
/* local subsystem globals */
|
||||
static E_Msgbus_Data *_e_msgbus_data = NULL;
|
||||
|
||||
/* externally accessible functions */
|
||||
EINTERN int
|
||||
|
@ -126,12 +39,10 @@ e_msgbus_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
_e_msgbus_data->iface = eldbus_service_interface_register(_e_msgbus_data->conn,
|
||||
PATH, &core_desc);
|
||||
eldbus_service_interface_register(_e_msgbus_data->conn, PATH, &module_desc);
|
||||
eldbus_service_interface_register(_e_msgbus_data->conn, PATH, &profile_desc);
|
||||
eldbus_service_interface_register(_e_msgbus_data->conn, PATH, &window_desc);
|
||||
eldbus_name_request(_e_msgbus_data->conn, "org.enlightenment.wm.service",
|
||||
_e_msgbus_data->iface = eldbus_service_interface_register
|
||||
(_e_msgbus_data->conn, PATH, &core_desc);
|
||||
eldbus_name_request(_e_msgbus_data->conn,
|
||||
"org.enlightenment.wm.service",
|
||||
0, _e_msgbus_request_name_cb, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
@ -144,7 +55,8 @@ e_msgbus_shutdown(void)
|
|||
if (_e_msgbus_data->conn)
|
||||
{
|
||||
eldbus_name_release(_e_msgbus_data->conn,
|
||||
"org.enlightenment.wm.service", NULL, NULL);
|
||||
"org.enlightenment.wm.service",
|
||||
NULL, NULL);
|
||||
eldbus_connection_unref(_e_msgbus_data->conn);
|
||||
}
|
||||
eldbus_shutdown();
|
||||
|
@ -157,8 +69,7 @@ e_msgbus_shutdown(void)
|
|||
E_API Eldbus_Service_Interface *
|
||||
e_msgbus_interface_attach(const Eldbus_Service_Interface_Desc *desc)
|
||||
{
|
||||
if (!_e_msgbus_data->iface)
|
||||
return NULL;
|
||||
if (!_e_msgbus_data->iface) return NULL;
|
||||
return eldbus_service_interface_register(_e_msgbus_data->conn, PATH, desc);
|
||||
}
|
||||
|
||||
|
@ -199,6 +110,9 @@ static Eldbus_Message *
|
|||
_e_msgbus_core_restart_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
ERR("DBus restart API disabled for security reasons");
|
||||
else
|
||||
e_sys_action_do(E_SYS_RESTART, NULL);
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
@ -207,297 +121,9 @@ static Eldbus_Message *
|
|||
_e_msgbus_core_shutdown_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
ERR("DBus shutdown API disabled for security reasons");
|
||||
else
|
||||
e_sys_action_do(E_SYS_EXIT, NULL);
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
||||
/* Modules Handlers */
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_load_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *module;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &module))
|
||||
return reply;
|
||||
|
||||
if (!e_module_find(module))
|
||||
{
|
||||
e_module_new(module);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_unload_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *module;
|
||||
E_Module *m;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &module))
|
||||
return reply;
|
||||
|
||||
if ((m = e_module_find(module)))
|
||||
{
|
||||
e_module_disable(m);
|
||||
e_object_del(E_OBJECT(m));
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_enable_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *module;
|
||||
E_Module *m;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &module))
|
||||
return reply;
|
||||
|
||||
if ((m = e_module_find(module)))
|
||||
{
|
||||
e_module_enable(m);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_disable_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *module;
|
||||
E_Module *m;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &module))
|
||||
return reply;
|
||||
|
||||
if ((m = e_module_find(module)))
|
||||
{
|
||||
e_module_disable(m);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Module *mod;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
Eldbus_Message_Iter *main_iter, *array;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
|
||||
main_iter = eldbus_message_iter_get(reply);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(main_iter, reply);
|
||||
|
||||
eldbus_message_iter_arguments_append(main_iter, "a(si)", &array);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(array, reply);
|
||||
|
||||
EINA_LIST_FOREACH(e_module_list(), l, mod)
|
||||
{
|
||||
Eldbus_Message_Iter *s;
|
||||
const char *name;
|
||||
int enabled;
|
||||
|
||||
name = mod->name;
|
||||
enabled = mod->enabled;
|
||||
|
||||
eldbus_message_iter_arguments_append(array, "(si)", &s);
|
||||
if (!s) continue;
|
||||
eldbus_message_iter_arguments_append(s, "si", name, enabled);
|
||||
eldbus_message_iter_container_close(array, s);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
/* Profile Handlers */
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_set_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *profile;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &profile))
|
||||
return reply;
|
||||
|
||||
e_config_save_flush();
|
||||
e_config_profile_set(profile);
|
||||
e_config_profile_save();
|
||||
e_config_save_block_set(1);
|
||||
e_sys_action_do(E_SYS_RESTART, NULL);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_get_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
const char *profile;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
|
||||
profile = e_config_profile_get();
|
||||
eldbus_message_arguments_append(reply, "s", profile);
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eina_List *l;
|
||||
char *name;
|
||||
Eldbus_Message *reply;
|
||||
Eldbus_Message_Iter *array, *main_iter;
|
||||
|
||||
reply = eldbus_message_method_return_new(msg);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
|
||||
|
||||
main_iter = eldbus_message_iter_get(reply);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(main_iter, reply);
|
||||
|
||||
eldbus_message_iter_arguments_append(main_iter, "as", &array);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(array, reply);
|
||||
|
||||
l = e_config_profile_list();
|
||||
EINA_LIST_FREE(l, name)
|
||||
{
|
||||
eldbus_message_iter_basic_append(array, 's', name);
|
||||
free(name);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_add_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *profile;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &profile))
|
||||
return reply;
|
||||
e_config_profile_add(profile);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_delete_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *profile;
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &profile))
|
||||
return eldbus_message_method_return_new(msg);
|
||||
if (!strcmp(e_config_profile_get(), profile))
|
||||
return eldbus_message_error_new(msg,
|
||||
"org.enlightenment.DBus.InvalidArgument",
|
||||
"Can't delete active profile");
|
||||
e_config_profile_del(profile);
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
||||
/* Window handlers */
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_window_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
const Eina_List *l;
|
||||
E_Client *ec;
|
||||
Eldbus_Message *reply;
|
||||
Eldbus_Message_Iter *main_iter, *array;
|
||||
|
||||
reply = eldbus_message_method_return_new(msg);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(reply, NULL);
|
||||
|
||||
main_iter = eldbus_message_iter_get(reply);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(main_iter, reply);
|
||||
|
||||
eldbus_message_iter_arguments_append(main_iter, "a(si)", &array);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(array, reply);
|
||||
|
||||
EINA_LIST_FOREACH(e_comp->clients, l, ec)
|
||||
{
|
||||
Eldbus_Message_Iter *s;
|
||||
|
||||
if (e_client_util_ignored_get(ec)) continue;
|
||||
|
||||
eldbus_message_iter_arguments_append(array, "(si)", &s);
|
||||
if (!s) continue;
|
||||
eldbus_message_iter_arguments_append(s, "si", ec->icccm.name,
|
||||
e_client_util_win_get(ec));
|
||||
eldbus_message_iter_container_close(array, s);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
#define E_MSGBUS_WIN_ACTION_CB_BEGIN(NAME) \
|
||||
static Eldbus_Message * \
|
||||
_e_msgbus_window_##NAME##_cb(const Eldbus_Service_Interface * iface EINA_UNUSED, \
|
||||
const Eldbus_Message * msg) \
|
||||
{ \
|
||||
E_Client *ec; \
|
||||
int xwin; \
|
||||
\
|
||||
if (!eldbus_message_arguments_get(msg, "i", &xwin)) \
|
||||
return eldbus_message_method_return_new(msg); \
|
||||
ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, xwin); \
|
||||
if (ec) \
|
||||
{
|
||||
#define E_MSGBUS_WIN_ACTION_CB_END \
|
||||
} \
|
||||
\
|
||||
return eldbus_message_method_return_new(msg); \
|
||||
}
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(close)
|
||||
e_client_act_close_begin(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(kill)
|
||||
e_client_act_kill_begin(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(focus)
|
||||
e_client_activate(ec, 1);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(iconify)
|
||||
e_client_iconify(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(uniconify)
|
||||
e_client_uniconify(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(maximize)
|
||||
e_client_maximize(ec, e_config->maximize_policy);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(unmaximize)
|
||||
e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
|
|
@ -1194,6 +1194,8 @@ e_randr2_screens_setup(int rw, int rh)
|
|||
screen->y = s->config.geom.y;
|
||||
screen->w = s->config.geom.w;
|
||||
screen->h = s->config.geom.h;
|
||||
if (s->id) screen->id = strdup(s->id);
|
||||
|
||||
all_screens = eina_list_append(all_screens, screen);
|
||||
printf("xinerama screen %i %i %ix%i\n", screen->x, screen->y, screen->w, screen->h);
|
||||
INF("E INIT: XINERAMA SCREEN: [%i][%i], %ix%i+%i+%i",
|
||||
|
|
|
@ -743,11 +743,11 @@ _e_remember_cb_hook_pre_post_fetch(void *data EINA_UNUSED, E_Client *ec)
|
|||
}
|
||||
if (ec->icccm.min_w > ec->client.w)
|
||||
ec->client.w = ec->icccm.min_w;
|
||||
if (ec->icccm.max_w < ec->client.w)
|
||||
if ((ec->icccm.max_w > 0) && (ec->icccm.max_w < ec->client.w))
|
||||
ec->client.w = ec->icccm.max_w;
|
||||
if (ec->icccm.min_h > ec->client.h)
|
||||
ec->client.h = ec->icccm.min_h;
|
||||
if (ec->icccm.max_h < ec->client.h)
|
||||
if ((ec->icccm.max_h > 0) && (ec->icccm.max_h < ec->client.h))
|
||||
ec->client.h = ec->icccm.max_h;
|
||||
}
|
||||
e_comp_object_frame_wh_adjust(ec->frame, ec->client.w, ec->client.h, &ec->w, &ec->h);
|
||||
|
|
|
@ -27,8 +27,12 @@ e_scale_update(void)
|
|||
e_scale = (double)ecore_x_dpi_get() / (double)e_config->scale.base_dpi;
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
/* FIXME: This needs to get the DPI from a given output */
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
e_scale = (double)ecore_wl_dpi_get() / (double)e_config->scale.base_dpi;
|
||||
{
|
||||
e_scale = (double)ecore_wl2_output_dpi_get(NULL) /
|
||||
(double)e_config->scale.base_dpi;
|
||||
}
|
||||
#endif
|
||||
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
|
||||
else if (e_scale < e_config->scale.min)
|
||||
|
|
|
@ -287,7 +287,7 @@ _e_screensaver_handler_screensaver_off_cb(void *data EINA_UNUSED, int type EINA_
|
|||
else if (_e_screensaver_ask_presentation_count)
|
||||
_e_screensaver_ask_presentation_count = 0;
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (_e_screensaver_timeout)
|
||||
if (_e_screensaver_timeout && (e_comp->comp_type == E_PIXMAP_TYPE_WL))
|
||||
_e_screensaver_timer = ecore_timer_add(_e_screensaver_timeout, _e_screensaver_idle_timeout_cb, (void*)1);
|
||||
#endif
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
#include "e.h"
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
# ifdef HAVE_WL_DRM
|
||||
#include <Ecore_Drm.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
|
@ -69,9 +71,11 @@ _e_crash(void)
|
|||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
#ifdef HAVE_WL_DRM
|
||||
const Eina_List *list, *l, *ll;
|
||||
Ecore_Drm_Device *dev;
|
||||
|
||||
if (!strstr(ecore_evas_engine_name_get(e_comp->ee), "drm")) return;
|
||||
list = ecore_drm_devices_get();
|
||||
EINA_LIST_FOREACH_SAFE(list, l, ll, dev)
|
||||
{
|
||||
|
@ -83,6 +87,7 @@ _e_crash(void)
|
|||
}
|
||||
|
||||
ecore_drm_shutdown();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -8,6 +8,13 @@ static Eina_List *all_screens = NULL;
|
|||
static Eina_List *chosen_screens = NULL;
|
||||
static Eina_List *fake_screens = NULL;
|
||||
|
||||
static void
|
||||
_screen_free(E_Screen *scr)
|
||||
{
|
||||
free(scr->id);
|
||||
free(scr);
|
||||
}
|
||||
|
||||
EINTERN int
|
||||
e_xinerama_init(void)
|
||||
{
|
||||
|
@ -45,7 +52,7 @@ e_xinerama_screens_all_get(void)
|
|||
E_API void
|
||||
e_xinerama_screens_set(Eina_List *screens)
|
||||
{
|
||||
E_FREE_LIST(all_screens, free);
|
||||
E_FREE_LIST(all_screens, _screen_free);
|
||||
chosen_screens = eina_list_free(chosen_screens);
|
||||
all_screens = screens;
|
||||
_e_xinerama_update();
|
||||
|
@ -76,9 +83,9 @@ e_xinerama_fake_screens_exist(void)
|
|||
static void
|
||||
_e_xinerama_clean(void)
|
||||
{
|
||||
E_FREE_LIST(all_screens, free);
|
||||
E_FREE_LIST(all_screens, _screen_free);
|
||||
chosen_screens = eina_list_free(chosen_screens);
|
||||
E_FREE_LIST(fake_screens, free);
|
||||
E_FREE_LIST(fake_screens, _screen_free);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -10,6 +10,7 @@ struct _E_Screen
|
|||
{
|
||||
int screen, escreen;
|
||||
int x, y, w, h;
|
||||
char *id; // this is the same id we get from randr2 so look it up there
|
||||
};
|
||||
|
||||
EINTERN int e_xinerama_init(void);
|
||||
|
|
|
@ -1492,7 +1492,7 @@ _e_zone_free(E_Zone *zone)
|
|||
e_object_del(E_OBJECT(zone->desks[x + (y * zone->desk_x_count)]));
|
||||
}
|
||||
free(zone->desks);
|
||||
|
||||
free(zone->randr2_id);
|
||||
free(zone);
|
||||
}
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@ struct _E_Zone
|
|||
Eina_Bool dirty : 1;
|
||||
} useful_geometry;
|
||||
Eina_Bool stowed : 1;
|
||||
char *randr2_id; // same id we get from randr2 so look it up there
|
||||
};
|
||||
|
||||
struct _E_Event_Zone_Generic
|
||||
|
|
|
@ -44,7 +44,7 @@ install-mixer: install-mixerDATA install-mixerpkgLTLIBRARIES
|
|||
desktopfiledir = $(datadir)/applications
|
||||
desktopfile_DATA = src/modules/mixer/emixer.desktop
|
||||
|
||||
iconsdir= $(datadir)/icons
|
||||
iconsdir= $(datadir)/pixmaps
|
||||
icons_DATA = src/modules/mixer/emixer.png
|
||||
|
||||
endif
|
||||
|
|
|
@ -17,7 +17,10 @@ src/modules/msgbus/e_mod_main.h \
|
|||
src/modules/msgbus/e_mod_main.c \
|
||||
src/modules/msgbus/msgbus_audit.c \
|
||||
src/modules/msgbus/msgbus_desktop.c \
|
||||
src/modules/msgbus/msgbus_lang.c
|
||||
src/modules/msgbus/msgbus_lang.c \
|
||||
src/modules/msgbus/msgbus_module.c \
|
||||
src/modules/msgbus/msgbus_profile.c \
|
||||
src/modules/msgbus/msgbus_window.c
|
||||
|
||||
PHONIES += msgbus install-msgbus
|
||||
msgbus: $(msgbuspkg_LTLIBRARIES) $(msgbus_DATA)
|
||||
|
|
|
@ -25,7 +25,9 @@ src_modules_wl_desktop_shell_module_la_SOURCES = \
|
|||
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
|
||||
src/modules/wl_desktop_shell/e_desktop_shell_protocol.h \
|
||||
src/modules/wl_desktop_shell/draw-mode.c \
|
||||
src/modules/wl_desktop_shell/draw-mode.h
|
||||
|
||||
PHONIES += wl_desktop_shell install-wl_desktop_shell
|
||||
wl_desktop_shell: $(wl_desktop_shellpkg_LTLIBRARIES) $(wl_desktop_shell_DATA)
|
||||
|
|
|
@ -129,6 +129,7 @@ _create_data(E_Config_Dialog *cfd)
|
|||
|
||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||
cfdata->cfd = cfd;
|
||||
cfd->cfdata = cfdata;
|
||||
_fill_data(cfdata);
|
||||
return cfdata;
|
||||
}
|
||||
|
@ -146,8 +147,7 @@ _change_hash_free_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNU
|
|||
static void
|
||||
_free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
if (cfdata->win_import)
|
||||
e_int_config_imc_import_del(cfdata->win_import);
|
||||
E_FREE_FUNC(cfdata->win_import, evas_object_del);
|
||||
eina_stringshare_del(cfdata->imc_current);
|
||||
|
||||
if (cfdata->imc_basic_map)
|
||||
|
|
|
@ -49,7 +49,7 @@ e_int_config_imc_import(E_Config_Dialog *parent)
|
|||
import = E_NEW(Import, 1);
|
||||
if (!import) return NULL;
|
||||
|
||||
win = elm_win_add(parent->parent, "E", ELM_WIN_BASIC);
|
||||
win = elm_win_add(parent->parent, "E", ELM_WIN_DIALOG_BASIC);
|
||||
if (!win)
|
||||
{
|
||||
E_FREE(import);
|
||||
|
@ -67,16 +67,18 @@ e_int_config_imc_import(E_Config_Dialog *parent)
|
|||
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _imc_import_cb_delete, NULL);
|
||||
ecore_evas_name_class_set(ecore_evas_ecore_evas_get(evas_object_evas_get(win)), "E", "_imc_import_dialog");
|
||||
|
||||
o = edje_object_add(evas);
|
||||
elm_win_resize_object_add(win, o);
|
||||
o = elm_layout_add(win);
|
||||
E_EXPAND(o);
|
||||
E_FILL(o);
|
||||
import->bg_obj = o;
|
||||
e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/main");
|
||||
elm_win_resize_object_add(win, o);
|
||||
evas_object_show(o);
|
||||
|
||||
o = e_widget_list_add(evas, 1, 1);
|
||||
e_widget_on_focus_hook_set(o, _imc_import_cb_wid_focus, import);
|
||||
import->box_obj = o;
|
||||
edje_object_part_swallow(import->bg_obj, "e.swallow.buttons", o);
|
||||
elm_object_part_content_set(import->bg_obj, "e.swallow.buttons", o);
|
||||
|
||||
o = evas_object_rectangle_add(evas);
|
||||
import->event_obj = o;
|
||||
|
@ -111,7 +113,7 @@ e_int_config_imc_import(E_Config_Dialog *parent)
|
|||
|
||||
e_widget_size_min_get(o, &w, &h);
|
||||
evas_object_size_hint_min_set(o, w, h);
|
||||
edje_object_part_swallow(import->bg_obj, "e.swallow.content", o);
|
||||
elm_object_part_content_set(import->bg_obj, "e.swallow.content", o);
|
||||
evas_object_show(o);
|
||||
|
||||
import->ok_obj = e_widget_button_add(evas, _("OK"), NULL,
|
||||
|
@ -129,13 +131,8 @@ e_int_config_imc_import(E_Config_Dialog *parent)
|
|||
o = import->box_obj;
|
||||
e_widget_size_min_get(o, &w, &h);
|
||||
evas_object_size_hint_min_set(o, w, h);
|
||||
edje_object_part_swallow(import->bg_obj, "e.swallow.buttons", o);
|
||||
elm_object_part_content_set(import->bg_obj, "e.swallow.buttons", o);
|
||||
|
||||
edje_object_size_min_calc(import->bg_obj, &w, &h);
|
||||
evas_object_resize(import->bg_obj, w, h);
|
||||
evas_object_resize(win, w, h);
|
||||
evas_object_size_hint_min_set(win, w, h);
|
||||
evas_object_size_hint_max_set(win, 99999, 99999);
|
||||
evas_object_show(win);
|
||||
e_win_client_icon_set(win, "preferences-imc");
|
||||
|
||||
|
@ -144,14 +141,15 @@ e_int_config_imc_import(E_Config_Dialog *parent)
|
|||
return win;
|
||||
}
|
||||
|
||||
void
|
||||
e_int_config_imc_import_del(Evas_Object *win)
|
||||
static void
|
||||
_imc_import_cb_delete(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Import *import;
|
||||
|
||||
import = evas_object_data_get(win, "imc_win");
|
||||
import = evas_object_data_get(obj, "imc_win");
|
||||
if (!import) return;
|
||||
|
||||
evas_object_del(win);
|
||||
evas_object_del(import->win);
|
||||
e_int_config_imc_import_done(import->parent);
|
||||
|
||||
E_FREE(import->cfdata->file);
|
||||
|
@ -161,12 +159,6 @@ e_int_config_imc_import_del(Evas_Object *win)
|
|||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
_imc_import_cb_delete(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
e_int_config_imc_import_del(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_imc_import_cb_wid_focus(void *data, Evas_Object *obj)
|
||||
{
|
||||
|
@ -294,13 +286,13 @@ _imc_import_cb_ok(void *data, void *data2 EINA_UNUSED)
|
|||
}
|
||||
}
|
||||
|
||||
e_int_config_imc_import_del(import->win);
|
||||
evas_object_del(import->win);
|
||||
}
|
||||
|
||||
static void
|
||||
_imc_import_cb_close(void *data, void *data2 EINA_UNUSED)
|
||||
{
|
||||
e_int_config_imc_import_del(data);
|
||||
evas_object_del(data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -390,8 +390,11 @@ _cb_rel_to_set(void *data, Evas_Object *obj, void *event)
|
|||
if (it == event)
|
||||
{
|
||||
E_Config_Randr2_Screen *cs2 = _config_screen_n_find(cfdata, i);
|
||||
if (cs2)
|
||||
{
|
||||
printf("find cs = %p\n", cs2);
|
||||
printf("cs id = %s\n", cs2->id);
|
||||
}
|
||||
if (cs2 == cs) return;
|
||||
if (cs2)
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ struct _E_Config_Dialog_Data
|
|||
int always_click_to_focus;
|
||||
int focus_last_focused_per_desktop;
|
||||
int focus_revert_on_hide_or_close;
|
||||
int focus_revert_allow_sticky;
|
||||
int pointer_slide;
|
||||
int disable_all_pointer_warps;
|
||||
double pointer_warp_speed;
|
||||
|
@ -75,6 +76,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
e_config->focus_last_focused_per_desktop;
|
||||
cfdata->focus_revert_on_hide_or_close =
|
||||
e_config->focus_revert_on_hide_or_close;
|
||||
cfdata->focus_revert_allow_sticky =
|
||||
e_config->focus_revert_allow_sticky;
|
||||
cfdata->pointer_slide = e_config->pointer_slide;
|
||||
cfdata->disable_all_pointer_warps = e_config->disable_all_pointer_warps;
|
||||
cfdata->pointer_warp_speed = e_config->pointer_warp_speed;
|
||||
|
@ -181,6 +184,8 @@ _advanced_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
|
|||
cfdata->focus_last_focused_per_desktop;
|
||||
e_config->focus_revert_on_hide_or_close =
|
||||
cfdata->focus_revert_on_hide_or_close;
|
||||
e_config->focus_revert_allow_sticky =
|
||||
cfdata->focus_revert_allow_sticky;
|
||||
e_config->pointer_slide = cfdata->pointer_slide;
|
||||
e_config->disable_all_pointer_warps = cfdata->disable_all_pointer_warps;
|
||||
e_config->pointer_warp_speed = cfdata->pointer_warp_speed;
|
||||
|
@ -205,6 +210,7 @@ _advanced_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *
|
|||
(e_config->always_click_to_focus != cfdata->always_click_to_focus) ||
|
||||
(e_config->focus_last_focused_per_desktop != cfdata->focus_last_focused_per_desktop) ||
|
||||
(e_config->focus_revert_on_hide_or_close != cfdata->focus_revert_on_hide_or_close) ||
|
||||
(e_config->focus_revert_allow_sticky != cfdata->focus_revert_allow_sticky) ||
|
||||
(e_config->pointer_slide != cfdata->pointer_slide) ||
|
||||
(e_config->disable_all_pointer_warps != cfdata->disable_all_pointer_warps) ||
|
||||
(fabs(e_config->pointer_warp_speed - cfdata->pointer_warp_speed) > DBL_EPSILON) ||
|
||||
|
@ -361,6 +367,9 @@ _advanced_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_D
|
|||
ob = e_widget_check_add(evas, _("Refocus last window on desktop switch"),
|
||||
&(cfdata->focus_last_focused_per_desktop));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Allow focusing of sticky windows when reverting focus"),
|
||||
&(cfdata->focus_revert_allow_sticky));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Focus last focused window on lost focus"),
|
||||
&(cfdata->focus_revert_on_hide_or_close));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
|
|
@ -857,6 +857,12 @@ _e_fwin_icon_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *even
|
|||
evas_object_geometry_set(fwin->popup, px, py, mw, mh);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_fwin_popup_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
evas_object_event_callback_del(data, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _e_fwin_icon_hints);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_fwin_icon_popup(void *data)
|
||||
{
|
||||
|
@ -888,6 +894,8 @@ _e_fwin_icon_popup(void *data)
|
|||
fwin->popup_icon->label : fwin->popup_icon->file);
|
||||
|
||||
list = e_widget_list_add(e_comp->evas, 0, 0);
|
||||
if (fwin->win)
|
||||
evas_object_event_callback_add(fwin->win, EVAS_CALLBACK_DEL, _e_fwin_popup_del, list);
|
||||
|
||||
o = e_widget_filepreview_add(e_comp->evas, mw, mh, 0);
|
||||
e_widget_filepreview_clamp_video_set(o, fileman_config->tooltip.clamp_size);
|
||||
|
@ -1934,24 +1942,20 @@ _e_fwin_cb_key_down(void *data,
|
|||
}
|
||||
|
||||
static void
|
||||
_e_fwin_cb_page_obj_del(void *data,
|
||||
_e_fwin_cb_page_obj_del(void *data EINA_UNUSED,
|
||||
Evas *evas EINA_UNUSED,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
Evas_Object *obj,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
E_Fwin_Page *page;
|
||||
|
||||
page = data;
|
||||
|
||||
evas_object_smart_callback_del(page->fm_obj, "dir_changed",
|
||||
evas_object_smart_callback_del(obj, "dir_changed",
|
||||
_e_fwin_changed);
|
||||
evas_object_smart_callback_del(page->fm_obj, "dir_deleted",
|
||||
evas_object_smart_callback_del(obj, "dir_deleted",
|
||||
_e_fwin_deleted);
|
||||
evas_object_smart_callback_del(page->fm_obj, "selected",
|
||||
evas_object_smart_callback_del(obj, "selected",
|
||||
_e_fwin_selected);
|
||||
evas_object_smart_callback_del(page->fm_obj, "selection_change",
|
||||
evas_object_smart_callback_del(obj, "selection_change",
|
||||
_e_fwin_selection_change);
|
||||
evas_object_event_callback_del(page->fm_obj, EVAS_CALLBACK_DEL,
|
||||
evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
|
||||
_e_fwin_cb_page_obj_del);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,21 @@ _e_fileman_dbus_daemon_free(E_Fileman_DBus_Daemon *d)
|
|||
free(d);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_fileman_dbus_call_rate_limit(void)
|
||||
{
|
||||
static double last_call = 0.0;
|
||||
static unsigned long long last_calls = 0;
|
||||
double t = ecore_time_get();
|
||||
|
||||
if ((t - last_call) < 0.5) last_calls++;
|
||||
else last_calls = 0;
|
||||
last_call = t;
|
||||
// if we get more than 10 requests over 0.5 sec - rate limit
|
||||
if (last_calls > 10) return EINA_TRUE;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_fileman_dbus_daemon_open_directory_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
|
@ -64,6 +79,12 @@ _e_fileman_dbus_daemon_open_directory_cb(const Eldbus_Service_Interface *iface E
|
|||
char *dev, *to_free = NULL;
|
||||
E_Zone *zone;
|
||||
|
||||
|
||||
if (_e_fileman_dbus_call_rate_limit())
|
||||
{
|
||||
fprintf(stderr, "EFM remote call rate limiting to avoid DOS attacks");
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
if (!eldbus_message_arguments_get(msg, "s", &directory))
|
||||
{
|
||||
fprintf(stderr, "Error: getting arguments of OpenDirectory call.\n");
|
||||
|
@ -159,6 +180,11 @@ _e_fileman_dbus_daemon_open_file_cb(const Eldbus_Service_Interface *iface EINA_U
|
|||
char *real_file, *to_free = NULL;
|
||||
E_Zone *zone;
|
||||
|
||||
if (_e_fileman_dbus_call_rate_limit())
|
||||
{
|
||||
fprintf(stderr, "EFM remote call rate limiting to avoid DOS attacks");
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
if (!eldbus_message_arguments_get(msg, "s", ¶m_file))
|
||||
{
|
||||
fprintf(stderr, "ERROR: getting arguments of OpenFile call.\n");
|
||||
|
|
|
@ -127,7 +127,8 @@ _config_set(Emix_Config *config)
|
|||
void
|
||||
emix_config_init(emix_config_backend_changed cb, const void *userdata)
|
||||
{
|
||||
const Eina_List *l;
|
||||
const Eina_List *backends, *l;
|
||||
const char *s;
|
||||
|
||||
EINA_SAFETY_ON_FALSE_RETURN(emix_init());
|
||||
_emix_config_dd_new();
|
||||
|
@ -135,9 +136,25 @@ emix_config_init(emix_config_backend_changed cb, const void *userdata)
|
|||
if (!_config)
|
||||
{
|
||||
_config = E_NEW(Emix_Config, 1);
|
||||
l = emix_backends_available();
|
||||
if (l)
|
||||
_config->backend = eina_stringshare_add(l->data);
|
||||
backends = emix_backends_available();
|
||||
// prefer pulseaudio as a packend if it exists as this is generally
|
||||
// more useful, and a superset of ALSA. so if pulse is there, alsa
|
||||
// is too - so choosing alsa if pulse is available is wrong (as a
|
||||
// default) and leads to brokenness. in the case pulse is not
|
||||
// around, alsa will then work
|
||||
EINA_LIST_FOREACH(backends, l, s)
|
||||
{
|
||||
if (!strcmp(s, "PULSEAUDIO"))
|
||||
{
|
||||
_config->backend = eina_stringshare_add(s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!_config->backend)
|
||||
{
|
||||
if (backends)
|
||||
_config->backend = eina_stringshare_add(backends->data);
|
||||
}
|
||||
}
|
||||
|
||||
if (_config->save == 0) _config->save = 1;
|
||||
|
|
|
@ -102,7 +102,7 @@ _notify(const int val)
|
|||
icon = "audio-volume-muted";
|
||||
else if ((val > 33) && (val < 66))
|
||||
icon = "audio-volume-medium";
|
||||
else if (val < 33)
|
||||
else if (val <= 33)
|
||||
icon = "audio-volume-low";
|
||||
else
|
||||
icon = "audio-volume-high";
|
||||
|
|
|
@ -672,7 +672,7 @@ _subscribe_cb(pa_context *c, pa_subscription_event_type_t t,
|
|||
}
|
||||
|
||||
static Eina_Bool _pulse_connect(void *data);
|
||||
static void _disconnect_cb();
|
||||
static void _disconnect_cb(void);
|
||||
|
||||
static void
|
||||
_pulse_pa_state_cb(pa_context *context, void *data)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "e_mod_main.h"
|
||||
|
||||
/* actual module specifics */
|
||||
static Eina_Array* ifaces = NULL;
|
||||
static Eina_Array *ifaces = NULL;
|
||||
|
||||
/* module setup */
|
||||
E_API E_Module_Api e_modapi =
|
||||
|
@ -13,21 +13,23 @@ E_API E_Module_Api e_modapi =
|
|||
E_API void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
ifaces = eina_array_new(5);
|
||||
|
||||
ifaces = eina_array_new(10);
|
||||
msgbus_lang_init(ifaces);
|
||||
msgbus_desktop_init(ifaces);
|
||||
msgbus_audit_init(ifaces);
|
||||
|
||||
msgbus_module_init(ifaces);
|
||||
msgbus_profile_init(ifaces);
|
||||
msgbus_window_init(ifaces);
|
||||
return m;
|
||||
}
|
||||
|
||||
E_API int
|
||||
e_modapi_shutdown(E_Module *m EINA_UNUSED)
|
||||
{
|
||||
Eldbus_Service_Interface* iface;
|
||||
Eldbus_Service_Interface *iface;
|
||||
Eina_Array_Iterator iter;
|
||||
size_t i;
|
||||
|
||||
EINA_ARRAY_ITER_NEXT(ifaces, i, iface, iter)
|
||||
eldbus_service_interface_unregister(iface);
|
||||
eina_array_free(ifaces);
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
void msgbus_lang_init(Eina_Array *ifaces);
|
||||
void msgbus_desktop_init(Eina_Array *ifaces);
|
||||
void msgbus_audit_init(Eina_Array *ifaces);
|
||||
void msgbus_module_init(Eina_Array *ifaces);
|
||||
void msgbus_profile_init(Eina_Array *ifaces);
|
||||
void msgbus_window_init(Eina_Array *ifaces);
|
||||
|
||||
/**
|
||||
* @addtogroup Optional_Control
|
||||
|
|
|
@ -19,11 +19,9 @@ cb_audit_timer_dump(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
|
||||
tmp = ecore_timer_dump();
|
||||
if (!tmp)
|
||||
eldbus_message_arguments_append(reply, "s",
|
||||
"Not enable, recompile Ecore with ecore_timer_dump.");
|
||||
else
|
||||
eldbus_message_arguments_append(reply, "s", tmp);
|
||||
|
||||
eldbus_message_arguments_append
|
||||
(reply, "s", "Not enable, recompile Ecore with ecore_timer_dump.");
|
||||
else eldbus_message_arguments_append(reply, "s", tmp);
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
@ -48,6 +46,5 @@ void msgbus_audit_init(Eina_Array *ifaces)
|
|||
}
|
||||
|
||||
iface = e_msgbus_interface_attach(&audit);
|
||||
if (iface)
|
||||
eina_array_push(ifaces, iface);
|
||||
if (iface) eina_array_push(ifaces, iface);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ cb_virtual_desktops(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
e_config->zone_desks_y_count);
|
||||
DBG("GetVirtualCount: %d %d",
|
||||
e_config->zone_desks_x_count, e_config->zone_desks_y_count);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
@ -40,7 +39,6 @@ cb_desktop_show(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
zone = e_zone_current_get();
|
||||
DBG("show desktop %d,%d from zone %p.", x, y, zone);
|
||||
e_zone_desk_flip_to(zone, x, y);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
@ -82,7 +80,6 @@ cb_desktop_lock(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
{
|
||||
DBG("desklock requested");
|
||||
e_desklock_show(EINA_FALSE);
|
||||
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
||||
|
@ -92,7 +89,6 @@ cb_desktop_unlock(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
{
|
||||
DBG("deskunlock requested");
|
||||
e_desklock_hide();
|
||||
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
||||
|
@ -104,19 +100,17 @@ cb_desktop_bgadd(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
const char *path;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "iiis", &zone, &desk_x,
|
||||
&desk_y, &path))
|
||||
if (!eldbus_message_arguments_get(msg, "iiis", &zone,
|
||||
&desk_x, &desk_y, &path))
|
||||
{
|
||||
ERR("could not get Add arguments");
|
||||
return reply;
|
||||
}
|
||||
|
||||
DBG("add bg zone=%d, pos=%d,%d path=%s",
|
||||
zone, desk_x, desk_y, path);
|
||||
DBG("add bg zone=%d, pos=%d,%d path=%s", zone, desk_x, desk_y, path);
|
||||
e_bg_add(zone, desk_x, desk_y, path);
|
||||
e_bg_update();
|
||||
e_config_save_queue();
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
@ -127,19 +121,16 @@ cb_desktop_bgdel(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
int zone, desk_x, desk_y;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "iii", &zone, &desk_x,
|
||||
&desk_y))
|
||||
if (!eldbus_message_arguments_get(msg, "iii", &zone, &desk_x, &desk_y))
|
||||
{
|
||||
ERR("could not get Del arguments");
|
||||
return reply;
|
||||
}
|
||||
|
||||
DBG("del bg zone=%d, pos=%d,%d",
|
||||
zone, desk_x, desk_y);
|
||||
DBG("del bg zone=%d, pos=%d,%d", zone, desk_x, desk_y);
|
||||
e_bg_del(zone, desk_x, desk_y);
|
||||
e_bg_update();
|
||||
e_config_save_queue();
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
@ -152,12 +143,10 @@ cb_desktop_bglist(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
Eldbus_Message_Iter *main_iter, *array;
|
||||
|
||||
if (!reply)
|
||||
return NULL;
|
||||
if (!reply) return NULL;
|
||||
|
||||
main_iter = eldbus_message_iter_get(reply);
|
||||
if (!main_iter)
|
||||
return reply;
|
||||
if (!main_iter) return reply;
|
||||
|
||||
if (!eldbus_message_iter_arguments_append(main_iter, "a(iiiis)", &array))
|
||||
return reply;
|
||||
|
@ -166,10 +155,7 @@ cb_desktop_bglist(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
{
|
||||
Eldbus_Message_Iter *s;
|
||||
|
||||
if (!bg || !bg->file)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!bg || !bg->file) continue;
|
||||
DBG("Background zone=%d pos=%d,%d path=%s",
|
||||
bg->zone, bg->desk_x, bg->desk_y, bg->file);
|
||||
eldbus_message_iter_arguments_append(array, "(iiiis)", &s);
|
||||
|
@ -179,28 +165,21 @@ cb_desktop_bglist(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
eldbus_message_iter_container_close(array, s);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static const Eldbus_Method desktop_methods[] = {
|
||||
{ "GetVirtualCount", NULL, ELDBUS_ARGS({"i", "desk_x"}, {"i", "desk_y"}),
|
||||
cb_virtual_desktops, 0 },
|
||||
{ "Show", ELDBUS_ARGS({"i", "desk_x"}, {"i", "desk_y"}), NULL,
|
||||
cb_desktop_show, 0 },
|
||||
{ "ShowByName", ELDBUS_ARGS({"s", "desk_name"}), NULL,
|
||||
cb_desktop_show_by_name, 0 },
|
||||
{ "GetVirtualCount", NULL, ELDBUS_ARGS({"i", "desk_x"}, {"i", "desk_y"}), cb_virtual_desktops, 0 },
|
||||
{ "Show", ELDBUS_ARGS({"i", "desk_x"}, {"i", "desk_y"}), NULL, cb_desktop_show, 0 },
|
||||
{ "ShowByName", ELDBUS_ARGS({"s", "desk_name"}), NULL, cb_desktop_show_by_name, 0 },
|
||||
{ "Lock", NULL, NULL, cb_desktop_lock, 0 },
|
||||
{ "Unlock", NULL, NULL, cb_desktop_unlock, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
static const Eldbus_Method background_methods[] = {
|
||||
{ "Add",
|
||||
ELDBUS_ARGS({"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}, {"s", "path"}),
|
||||
NULL, cb_desktop_bgadd, 0 },
|
||||
{ "Del", ELDBUS_ARGS({"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}),
|
||||
NULL, cb_desktop_bgdel, 0 },
|
||||
{ "Add", ELDBUS_ARGS({"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}, {"s", "path"}), NULL, cb_desktop_bgadd, 0 },
|
||||
{ "Del", ELDBUS_ARGS({"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}), NULL, cb_desktop_bgdel, 0 },
|
||||
{ "List", ELDBUS_ARGS({"a(iiis)", "array_of_bg"}), NULL, cb_desktop_bglist, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0 }
|
||||
};
|
||||
|
@ -224,10 +203,7 @@ void msgbus_desktop_init(Eina_Array *ifaces)
|
|||
EINA_LOG_ERR("could not register msgbus_desktop log domain!");
|
||||
}
|
||||
iface = e_msgbus_interface_attach(&desktop);
|
||||
if (iface)
|
||||
eina_array_push(ifaces, iface);
|
||||
iface = NULL;
|
||||
if (iface) eina_array_push(ifaces, iface);
|
||||
iface = e_msgbus_interface_attach(&bg);
|
||||
if (iface)
|
||||
eina_array_push(ifaces, iface);
|
||||
if (iface) eina_array_push(ifaces, iface);
|
||||
}
|
||||
|
|
|
@ -31,14 +31,11 @@ cb_langs(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
eldbus_message_iter_basic_append(array, 's', str);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static const Eldbus_Method methods[] = {
|
||||
{
|
||||
"List", NULL, ELDBUS_ARGS({"as", "langs"}), cb_langs, 0
|
||||
},
|
||||
{ "List", NULL, ELDBUS_ARGS({"as", "langs"}), cb_langs, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
|
@ -49,6 +46,7 @@ static const Eldbus_Service_Interface_Desc lang = {
|
|||
void msgbus_lang_init(Eina_Array *ifaces)
|
||||
{
|
||||
Eldbus_Service_Interface *iface;
|
||||
|
||||
if (_log_dom == -1)
|
||||
{
|
||||
_log_dom = eina_log_domain_register("msgbus_lang", EINA_COLOR_BLUE);
|
||||
|
@ -57,6 +55,5 @@ void msgbus_lang_init(Eina_Array *ifaces)
|
|||
}
|
||||
|
||||
iface = e_msgbus_interface_attach(&lang);
|
||||
if (iface)
|
||||
eina_array_push(ifaces, iface);
|
||||
if (iface) eina_array_push(ifaces, iface);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,156 @@
|
|||
#include "e_mod_main.h"
|
||||
|
||||
static int _log_dom = -1;
|
||||
#undef DBG
|
||||
#undef WARN
|
||||
#undef INF
|
||||
#undef ERR
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
|
||||
#define WARN(...) EINA_LOG_DOM_WARN(_log_dom, __VA_ARGS__)
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
|
||||
|
||||
static Eldbus_Message *_e_msgbus_module_load_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_unload_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_enable_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_disable_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_module_list_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static const Eldbus_Method module_methods[] = {
|
||||
{ "Load", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_load_cb, 0 },
|
||||
{ "Unload", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_unload_cb, 0 },
|
||||
{ "Enable", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_enable_cb, 0 },
|
||||
{ "Disable", ELDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_disable_cb, 0 },
|
||||
{ "List", NULL, ELDBUS_ARGS({"a(si)", "modules"}), _e_msgbus_module_list_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc module = {
|
||||
"org.enlightenment.wm.Module", module_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
/* Modules Handlers */
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_load_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *mod;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &mod)) return reply;
|
||||
|
||||
if (!e_module_find(mod))
|
||||
{
|
||||
e_module_new(mod);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_unload_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *mod;
|
||||
E_Module *m;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &mod)) return reply;
|
||||
|
||||
if ((m = e_module_find(mod)))
|
||||
{
|
||||
e_module_disable(m);
|
||||
e_object_del(E_OBJECT(m));
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_enable_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *mod;
|
||||
E_Module *m;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &mod)) return reply;
|
||||
|
||||
if ((m = e_module_find(mod)))
|
||||
{
|
||||
e_module_enable(m);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_disable_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *mod;
|
||||
E_Module *m;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &mod)) return reply;
|
||||
|
||||
if ((m = e_module_find(mod)))
|
||||
{
|
||||
e_module_disable(m);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_module_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Module *mod;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
Eldbus_Message_Iter *main_iter, *array;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
|
||||
main_iter = eldbus_message_iter_get(reply);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(main_iter, reply);
|
||||
|
||||
eldbus_message_iter_arguments_append(main_iter, "a(si)", &array);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(array, reply);
|
||||
|
||||
EINA_LIST_FOREACH(e_module_list(), l, mod)
|
||||
{
|
||||
Eldbus_Message_Iter *s;
|
||||
const char *name;
|
||||
int enabled;
|
||||
|
||||
name = mod->name;
|
||||
enabled = mod->enabled;
|
||||
|
||||
eldbus_message_iter_arguments_append(array, "(si)", &s);
|
||||
if (!s) continue;
|
||||
eldbus_message_iter_arguments_append(s, "si", name, enabled);
|
||||
eldbus_message_iter_container_close(array, s);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
void msgbus_module_init(Eina_Array *ifaces)
|
||||
{
|
||||
Eldbus_Service_Interface *iface;
|
||||
|
||||
if (_log_dom == -1)
|
||||
{
|
||||
_log_dom = eina_log_domain_register("msgbus_module", EINA_COLOR_BLUE);
|
||||
if (_log_dom < 0)
|
||||
EINA_LOG_ERR("could not register msgbus_module log domain!");
|
||||
}
|
||||
|
||||
iface = e_msgbus_interface_attach(&module);
|
||||
if (iface) eina_array_push(ifaces, iface);
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
#include "e_mod_main.h"
|
||||
|
||||
static int _log_dom = -1;
|
||||
#undef DBG
|
||||
#undef WARN
|
||||
#undef INF
|
||||
#undef ERR
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
|
||||
#define WARN(...) EINA_LOG_DOM_WARN(_log_dom, __VA_ARGS__)
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
|
||||
|
||||
static Eldbus_Message *_e_msgbus_profile_set_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_get_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_list_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_add_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_profile_delete_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
|
||||
static const Eldbus_Method profile_methods[] = {
|
||||
{ "Set", ELDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_set_cb, 0 },
|
||||
{ "Get", NULL, ELDBUS_ARGS({"s", "profile"}), _e_msgbus_profile_get_cb, 0 },
|
||||
{ "List", NULL, ELDBUS_ARGS({"as", "array_profiles"}), _e_msgbus_profile_list_cb, 0 },
|
||||
{ "Add", ELDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_add_cb, 0 },
|
||||
{ "Delete", ELDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_delete_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc profile = {
|
||||
"org.enlightenment.wm.Profile", profile_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
/* Profile Handlers */
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_set_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *prof;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &prof))
|
||||
return reply;
|
||||
|
||||
e_config_save_flush();
|
||||
e_config_profile_set(prof);
|
||||
e_config_profile_save();
|
||||
e_config_save_block_set(1);
|
||||
e_sys_action_do(E_SYS_RESTART, NULL);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_get_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
const char *prof;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
|
||||
prof = e_config_profile_get();
|
||||
eldbus_message_arguments_append(reply, "s", prof);
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eina_List *l;
|
||||
char *name;
|
||||
Eldbus_Message *reply;
|
||||
Eldbus_Message_Iter *array, *main_iter;
|
||||
|
||||
reply = eldbus_message_method_return_new(msg);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
|
||||
|
||||
main_iter = eldbus_message_iter_get(reply);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(main_iter, reply);
|
||||
|
||||
eldbus_message_iter_arguments_append(main_iter, "as", &array);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(array, reply);
|
||||
|
||||
l = e_config_profile_list();
|
||||
EINA_LIST_FREE(l, name)
|
||||
{
|
||||
eldbus_message_iter_basic_append(array, 's', name);
|
||||
free(name);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_add_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *prof;
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &prof))
|
||||
return reply;
|
||||
e_config_profile_add(prof);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_profile_delete_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
char *prof;
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "s", &prof))
|
||||
return eldbus_message_method_return_new(msg);
|
||||
if (!strcmp(e_config_profile_get(), prof))
|
||||
return eldbus_message_error_new(msg,
|
||||
"org.enlightenment.DBus.InvalidArgument",
|
||||
"Can't delete active prof");
|
||||
e_config_profile_del(prof);
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
||||
void msgbus_profile_init(Eina_Array *ifaces)
|
||||
{
|
||||
Eldbus_Service_Interface *iface;
|
||||
|
||||
if (_log_dom == -1)
|
||||
{
|
||||
_log_dom = eina_log_domain_register("msgbus_profile", EINA_COLOR_BLUE);
|
||||
if (_log_dom < 0)
|
||||
EINA_LOG_ERR("could not register msgbus_profile log domain!");
|
||||
}
|
||||
|
||||
iface = e_msgbus_interface_attach(&profile);
|
||||
if (iface) eina_array_push(ifaces, iface);
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
#include "e_mod_main.h"
|
||||
|
||||
static int _log_dom = -1;
|
||||
#undef DBG
|
||||
#undef WARN
|
||||
#undef INF
|
||||
#undef ERR
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
|
||||
#define WARN(...) EINA_LOG_DOM_WARN(_log_dom, __VA_ARGS__)
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
|
||||
|
||||
#define E_MSGBUS_WIN_ACTION_CB_PROTO(NAME) \
|
||||
static Eldbus_Message * _e_msgbus_window_##NAME##_cb(const Eldbus_Service_Interface * iface, const Eldbus_Message * msg)
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(list);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(close);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(kill);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(focus);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(iconify);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(uniconify);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(maximize);
|
||||
E_MSGBUS_WIN_ACTION_CB_PROTO(unmaximize);
|
||||
|
||||
static const Eldbus_Method window_methods[] = {
|
||||
{ "List", NULL, ELDBUS_ARGS({"a(si)", "array_of_window"}), _e_msgbus_window_list_cb, 0 },
|
||||
{ "Close", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_close_cb, 0 },
|
||||
{ "Kill", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_kill_cb, 0 },
|
||||
{ "Focus", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_focus_cb, 0 },
|
||||
{ "Iconify", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_iconify_cb, 0 },
|
||||
{ "Uniconify", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_uniconify_cb, 0 },
|
||||
{ "Maximize", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_maximize_cb, 0 },
|
||||
{ "Unmaximize", ELDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_unmaximize_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc window = {
|
||||
"org.enlightenment.wm.Window", window_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
/* Window handlers */
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_window_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
const Eina_List *l;
|
||||
E_Client *ec;
|
||||
Eldbus_Message *reply;
|
||||
Eldbus_Message_Iter *main_iter, *array;
|
||||
|
||||
reply = eldbus_message_method_return_new(msg);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(reply, NULL);
|
||||
|
||||
main_iter = eldbus_message_iter_get(reply);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(main_iter, reply);
|
||||
|
||||
eldbus_message_iter_arguments_append(main_iter, "a(si)", &array);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(array, reply);
|
||||
|
||||
EINA_LIST_FOREACH(e_comp->clients, l, ec)
|
||||
{
|
||||
Eldbus_Message_Iter *s;
|
||||
|
||||
if (e_client_util_ignored_get(ec)) continue;
|
||||
|
||||
eldbus_message_iter_arguments_append(array, "(si)", &s);
|
||||
if (!s) continue;
|
||||
eldbus_message_iter_arguments_append(s, "si", ec->icccm.name,
|
||||
e_client_util_win_get(ec));
|
||||
eldbus_message_iter_container_close(array, s);
|
||||
}
|
||||
eldbus_message_iter_container_close(main_iter, array);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
#define E_MSGBUS_WIN_ACTION_CB_BEGIN(NAME) \
|
||||
static Eldbus_Message * \
|
||||
_e_msgbus_window_##NAME##_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, \
|
||||
const Eldbus_Message *msg) { \
|
||||
E_Client *ec; \
|
||||
int xwin; \
|
||||
if (!eldbus_message_arguments_get(msg, "i", &xwin)) \
|
||||
return eldbus_message_method_return_new(msg); \
|
||||
ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, xwin); \
|
||||
if (ec) {
|
||||
#define E_MSGBUS_WIN_ACTION_CB_END \
|
||||
} \
|
||||
return eldbus_message_method_return_new(msg); \
|
||||
}
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(close)
|
||||
e_client_act_close_begin(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(kill)
|
||||
e_client_act_kill_begin(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(focus)
|
||||
e_client_activate(ec, 1);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(iconify)
|
||||
e_client_iconify(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(uniconify)
|
||||
e_client_uniconify(ec);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(maximize)
|
||||
e_client_maximize(ec, e_config->maximize_policy);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
E_MSGBUS_WIN_ACTION_CB_BEGIN(unmaximize)
|
||||
e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
|
||||
E_MSGBUS_WIN_ACTION_CB_END
|
||||
|
||||
void msgbus_window_init(Eina_Array *ifaces)
|
||||
{
|
||||
Eldbus_Service_Interface *iface;
|
||||
|
||||
if (_log_dom == -1)
|
||||
{
|
||||
_log_dom = eina_log_domain_register("msgbus_window", EINA_COLOR_BLUE);
|
||||
if (_log_dom < 0)
|
||||
EINA_LOG_ERR("could not register msgbus_window log domain!");
|
||||
}
|
||||
|
||||
iface = e_msgbus_interface_attach(&window);
|
||||
if (iface) eina_array_push(ifaces, iface);
|
||||
}
|
|
@ -953,7 +953,7 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params)
|
|||
sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y);
|
||||
}
|
||||
|
||||
shm = e_comp_wl->wl.shm ?: ecore_wl_shm_get();
|
||||
shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(ewd);
|
||||
|
||||
EINA_LIST_FOREACH(_outputs, l, output)
|
||||
{
|
||||
|
@ -1258,31 +1258,19 @@ static Ecore_Event_Handler *wl_global_handler;
|
|||
static Eina_Bool
|
||||
_wl_init()
|
||||
{
|
||||
Eina_Inlist *globals;
|
||||
Ecore_Wl_Global *global;
|
||||
Eina_Iterator *itr;
|
||||
Ecore_Wl2_Global *global;
|
||||
struct wl_registry *reg;
|
||||
void *data;
|
||||
|
||||
reg = e_comp_wl->wl.registry ?: ecore_wl_registry_get();
|
||||
if (e_comp_wl->wl.registry)
|
||||
globals = e_comp_wl->wl.globals;
|
||||
else
|
||||
globals = ecore_wl_globals_get();
|
||||
if (!globals)
|
||||
reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd);
|
||||
itr = ecore_wl2_display_globals_get(ewd);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
if (!wl_global_handler)
|
||||
{
|
||||
if (e_comp_wl->wl.registry)
|
||||
wl_global_handler = ecore_event_handler_add(E_EVENT_WAYLAND_GLOBAL_ADD,
|
||||
(Ecore_Event_Handler_Cb)_wl_init, NULL);
|
||||
else
|
||||
wl_global_handler = ecore_event_handler_add(ECORE_WL_EVENT_INTERFACES_BOUND,
|
||||
(Ecore_Event_Handler_Cb)_wl_init, NULL);
|
||||
}
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
EINA_INLIST_FOREACH(globals, global)
|
||||
{
|
||||
if ((!_wl_screenshooter) && (!strcmp(global->interface, "screenshooter")))
|
||||
global = (Ecore_Wl2_Global *)data;
|
||||
|
||||
if ((!_wl_screenshooter) &&
|
||||
(!strcmp(global->interface, "screenshooter")))
|
||||
{
|
||||
_wl_screenshooter =
|
||||
wl_registry_bind(reg, global->id,
|
||||
|
@ -1312,6 +1300,8 @@ _wl_init()
|
|||
}
|
||||
}
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -82,7 +82,7 @@ static Eina_Bool _tasks_cb_event_client_uniconify(void *data, int type, void
|
|||
static Eina_Bool _tasks_cb_event_client_icon_change(void *data, int type, void *event);
|
||||
static Eina_Bool _tasks_cb_event_client_title_change(void *data, int type, void *event);
|
||||
static Eina_Bool _tasks_cb_event_client_zone_set(void *data, int type, void *event);
|
||||
static Eina_Bool _tasks_cb_event_client_desk_set(void *data, int type, void *event);
|
||||
static Eina_Bool _tasks_cb_event_client_desk_set(void *data, int type, E_Event_Client *ev);
|
||||
static Eina_Bool _tasks_cb_window_focus_in(void *data, int type, void *event);
|
||||
static Eina_Bool _tasks_cb_window_focus_out(void *data, int type, void *event);
|
||||
static Eina_Bool _tasks_cb_event_desk_show(void *data, int type, void *event);
|
||||
|
@ -91,6 +91,8 @@ static Eina_Bool _tasks_cb_event_client_urgent_change(void *data, int type, v
|
|||
static E_Config_DD *conf_edd = NULL;
|
||||
static E_Config_DD *conf_item_edd = NULL;
|
||||
|
||||
static Ecore_Timer *task_refill_timer;
|
||||
|
||||
Config *tasks_config = NULL;
|
||||
|
||||
/* module setup */
|
||||
|
@ -439,12 +441,31 @@ _tasks_refill(Tasks *tasks)
|
|||
e_gadcon_client_min_size_set(tasks->gcc, 0, 0);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_refill_timer(void *d EINA_UNUSED)
|
||||
{
|
||||
if (e_drag_current_get()) return EINA_TRUE;
|
||||
|
||||
_tasks_refill_all();
|
||||
task_refill_timer = NULL;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_tasks_refill_all(void)
|
||||
{
|
||||
const Eina_List *l;
|
||||
Tasks *tasks;
|
||||
|
||||
if (e_drag_current_get())
|
||||
{
|
||||
if (task_refill_timer)
|
||||
ecore_timer_reset(task_refill_timer);
|
||||
else
|
||||
task_refill_timer = ecore_timer_add(0.5, _refill_timer, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(tasks_config->tasks, l, tasks)
|
||||
{
|
||||
_tasks_refill(tasks);
|
||||
|
@ -967,8 +988,9 @@ _tasks_cb_event_client_zone_set(void *data EINA_UNUSED, int type EINA_UNUSED, vo
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_tasks_cb_event_client_desk_set(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
|
||||
_tasks_cb_event_client_desk_set(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Client *ev)
|
||||
{
|
||||
if (!ev->ec->sticky)
|
||||
_tasks_refill_all();
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ Name=Temp
|
|||
Name[ca]=Temp.
|
||||
Name[de]=Temporäre Daten
|
||||
Name[eo]=Dumtempaj
|
||||
Name[fi]=Lämpötila
|
||||
Name[fi]=Väliaikaiset
|
||||
Name[fr]=Temporaires
|
||||
Name[gl]=Temporais
|
||||
Name[ja]=気温
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "wayland-util.h"
|
||||
|
||||
extern const struct wl_interface xdg_surface_interface;
|
||||
|
||||
static const struct wl_interface *types[] = {
|
||||
&xdg_surface_interface,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message draw_modes_requests[] = {
|
||||
{ "set_available_draw_modes", "oa", types + 0 },
|
||||
};
|
||||
|
||||
WL_EXPORT const struct wl_interface draw_modes_interface = {
|
||||
"draw_modes", 1,
|
||||
1, draw_modes_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
#ifndef ZWP_DRAW_MODES_SERVER_PROTOCOL_H
|
||||
#define ZWP_DRAW_MODES_SERVER_PROTOCOL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "wayland-server.h"
|
||||
|
||||
struct wl_client;
|
||||
struct wl_resource;
|
||||
|
||||
struct draw_modes;
|
||||
|
||||
extern const struct wl_interface draw_modes_interface;
|
||||
|
||||
#ifndef DRAW_MODES_STATE_ENUM
|
||||
#define DRAW_MODES_STATE_ENUM
|
||||
/**
|
||||
* draw_modes_state - the surface has CSD without dropshadow
|
||||
* @DRAW_MODES_STATE_DRAW_NOSHADOW: CSD with no dropshadow
|
||||
*
|
||||
* The surface contains a CSD region which does not include a dropshadow.
|
||||
*/
|
||||
enum draw_modes_state {
|
||||
DRAW_MODES_STATE_DRAW_NOSHADOW = 0x2000,
|
||||
};
|
||||
#endif /* DRAW_MODES_STATE_ENUM */
|
||||
|
||||
struct draw_modes_interface {
|
||||
/**
|
||||
* set_available_draw_modes - advertise optional draw modes for
|
||||
* the window
|
||||
* @surface: (none)
|
||||
* @states: (none)
|
||||
*
|
||||
* Inform the compositor of optional draw modes which are
|
||||
* available for the window.
|
||||
*
|
||||
* Calling this after an xdg_surface's first commit is a client
|
||||
* error.
|
||||
*
|
||||
* Required modes are implemented by all clients and are not
|
||||
* present in this array. If set_available_draw_modes is not
|
||||
* called, only required modes are available.
|
||||
*/
|
||||
void (*set_available_draw_modes)(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
struct wl_resource *surface,
|
||||
struct wl_array *states);
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -2,6 +2,7 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
#include "e_desktop_shell_protocol.h"
|
||||
#include "draw-mode.h"
|
||||
|
||||
#define XDG_SERVER_VERSION 5
|
||||
|
||||
|
@ -98,6 +99,7 @@ _e_shell_surface_destroy(struct wl_resource *resource)
|
|||
/* get the client for this resource */
|
||||
if ((ec = wl_resource_get_user_data(resource)))
|
||||
{
|
||||
if (!e_object_unref(E_OBJECT(ec))) return;
|
||||
if (e_object_is_del(E_OBJECT(ec))) return;
|
||||
|
||||
if (ec->comp_data)
|
||||
|
@ -572,6 +574,8 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso
|
|||
&_e_shell_surface_interface,
|
||||
ec, _e_shell_surface_cb_destroy);
|
||||
|
||||
e_object_ref(E_OBJECT(ec));
|
||||
|
||||
cdata->shell.configure_send = _e_shell_surface_configure_send;
|
||||
cdata->shell.configure = _e_shell_surface_configure;
|
||||
cdata->shell.ping = _e_shell_surface_ping;
|
||||
|
@ -620,6 +624,8 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges
|
|||
_e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_RESIZING);
|
||||
if (ec->focused)
|
||||
_e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_ACTIVATED);
|
||||
if (ec->comp_data->shell.draw_mode_noshadow)
|
||||
_e_xdg_surface_state_add(resource, &states, DRAW_MODES_STATE_DRAW_NOSHADOW);
|
||||
|
||||
if (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU)
|
||||
{
|
||||
|
@ -1120,6 +1126,8 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour
|
|||
&_e_xdg_surface_interface, ec,
|
||||
_e_shell_surface_cb_destroy);
|
||||
|
||||
e_object_ref(E_OBJECT(ec));
|
||||
|
||||
cdata->shell.configure_send = _e_xdg_shell_surface_configure_send;
|
||||
cdata->shell.configure = _e_xdg_shell_surface_configure;
|
||||
cdata->shell.ping = _e_xdg_shell_surface_ping;
|
||||
|
@ -1207,6 +1215,8 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource
|
|||
wl_resource_set_implementation(cdata->shell.surface,
|
||||
&_e_xdg_popup_interface, ec, NULL);
|
||||
|
||||
e_object_ref(E_OBJECT(ec));
|
||||
|
||||
cdata->shell.configure_send = _e_xdg_shell_surface_configure_send;
|
||||
cdata->shell.configure = _e_xdg_shell_surface_configure;
|
||||
cdata->shell.ping = _e_xdg_shell_surface_ping;
|
||||
|
@ -1255,6 +1265,23 @@ _e_xdg_shell_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resource *r
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_draw_modes_cb_set_available_draw_modes(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, struct wl_resource *surface, struct wl_array *modes)
|
||||
{
|
||||
E_Client *ec;
|
||||
uint32_t *m;
|
||||
|
||||
ec = wl_resource_get_user_data(surface);
|
||||
|
||||
wl_array_for_each(m, modes)
|
||||
switch (*m)
|
||||
{
|
||||
case DRAW_MODES_STATE_DRAW_NOSHADOW:
|
||||
ec->comp_data->shell.draw_mode_noshadow = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct wl_shell_interface _e_shell_interface =
|
||||
{
|
||||
_e_shell_cb_shell_surface_get
|
||||
|
@ -1269,12 +1296,23 @@ static const struct xdg_shell_interface _e_xdg_shell_interface =
|
|||
_e_xdg_shell_cb_pong
|
||||
};
|
||||
|
||||
static const struct draw_modes_interface _e_draw_modes_interface =
|
||||
{
|
||||
_e_draw_modes_cb_set_available_draw_modes,
|
||||
};
|
||||
|
||||
static void
|
||||
_e_xdg_shell_cb_unbind(struct wl_resource *resource EINA_UNUSED)
|
||||
{
|
||||
e_comp_wl->shell_interface.xdg_shell = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_draw_modes_cb_unbind(struct wl_resource *resource EINA_UNUSED)
|
||||
{
|
||||
e_comp_wl->shell_interface.draw_modes = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
_e_xdg_shell_cb_dispatch(const void *implementation EINA_UNUSED, void *target, uint32_t opcode, const struct wl_message *message EINA_UNUSED, union wl_argument *args)
|
||||
{
|
||||
|
@ -1316,7 +1354,7 @@ _e_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t vers
|
|||
{
|
||||
struct wl_resource *res;
|
||||
|
||||
if (!(res = wl_resource_create(client, &wl_shell_interface, MIN(version, 1), id)))
|
||||
if (!(res = wl_resource_create(client, &wl_shell_interface, version, id)))
|
||||
{
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
|
@ -1333,7 +1371,7 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t
|
|||
{
|
||||
struct wl_resource *res;
|
||||
|
||||
if (!(res = wl_resource_create(client, &xdg_shell_interface, MIN(version, 1), id)))
|
||||
if (!(res = wl_resource_create(client, &xdg_shell_interface, version, id)))
|
||||
{
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
|
@ -1344,6 +1382,23 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t
|
|||
e_comp->wl_comp_data, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_draw_modes_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t version, uint32_t id)
|
||||
{
|
||||
struct wl_resource *res;
|
||||
|
||||
if (!(res = wl_resource_create(client, &draw_modes_interface, version, id)))
|
||||
{
|
||||
wl_client_post_no_memory(client);
|
||||
return;
|
||||
}
|
||||
|
||||
e_comp_wl->shell_interface.draw_modes = res;
|
||||
wl_resource_set_implementation(res, &_e_draw_modes_interface,
|
||||
e_comp->wl_comp_data,
|
||||
_e_draw_modes_cb_unbind);
|
||||
}
|
||||
|
||||
E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" };
|
||||
|
||||
E_API void *
|
||||
|
@ -1373,6 +1428,12 @@ e_modapi_init(E_Module *m)
|
|||
ERR("Could not create xdg_shell global: %m");
|
||||
return NULL;
|
||||
}
|
||||
if (!wl_global_create(e_comp_wl->wl.disp, &draw_modes_interface, 1,
|
||||
e_comp->wl_comp_data, _e_draw_modes_cb_bind))
|
||||
{
|
||||
ERR("Could not create draw_modes global: %m");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef HAVE_WL_TEXT_INPUT
|
||||
if (!e_input_panel_init())
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "e.h"
|
||||
#include <Ecore_Fb.h>
|
||||
#include <Ecore_Wayland.h>
|
||||
/* #include <Ecore_Wayland.h> */
|
||||
|
||||
E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_FB" };
|
||||
|
||||
|
@ -39,8 +39,8 @@ e_modapi_init(E_Module *m)
|
|||
e_comp_canvas_init(w, h);
|
||||
e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
|
||||
|
||||
ecore_wl_init(NULL);
|
||||
ecore_wl_server_mode_set(1);
|
||||
/* ecore_wl_init(NULL); */
|
||||
/* ecore_wl_server_mode_set(1); */
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ struct weekeyboard
|
|||
{
|
||||
E_Module *module;
|
||||
Ecore_Evas *ee;
|
||||
Ecore_Wl_Window *win;
|
||||
Ecore_Wl2_Window *win;
|
||||
Evas_Object *edje_obj;
|
||||
const char *ee_engine;
|
||||
char **ignore_keys;
|
||||
|
@ -41,8 +41,17 @@ _wkb_insert_text(const char *text, uint32_t offset, const char *insert)
|
|||
char *new_text = malloc(strlen(text) + strlen(insert) + 1);
|
||||
uint32_t text_len = 0;
|
||||
|
||||
if ((!text) || (!insert))
|
||||
if (!new_text)
|
||||
{
|
||||
ERR("out of memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((!text) || (!insert))
|
||||
{
|
||||
free(new_text);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
text_len = strlen(text);
|
||||
if (offset > text_len)
|
||||
|
@ -72,11 +81,14 @@ _wkb_commit_preedit_str(struct weekeyboard *wkb)
|
|||
return;
|
||||
|
||||
wl_input_method_context_cursor_position(wkb->im_ctx, 0, 0);
|
||||
wl_input_method_context_commit_string(wkb->im_ctx, wkb->serial, wkb->preedit_str);
|
||||
wl_input_method_context_commit_string(wkb->im_ctx, wkb->serial,
|
||||
wkb->preedit_str);
|
||||
|
||||
if (wkb->surrounding_text)
|
||||
{
|
||||
surrounding_text = _wkb_insert_text(wkb->surrounding_text, wkb->surrounding_cursor, wkb->preedit_str);
|
||||
surrounding_text =
|
||||
_wkb_insert_text(wkb->surrounding_text, wkb->surrounding_cursor,
|
||||
wkb->preedit_str);
|
||||
free(wkb->surrounding_text);
|
||||
wkb->surrounding_text = surrounding_text;
|
||||
wkb->surrounding_cursor += strlen(wkb->preedit_str);
|
||||
|
@ -97,13 +109,16 @@ _wkb_send_preedit_str(struct weekeyboard *wkb, int cursor)
|
|||
unsigned int index = strlen(wkb->preedit_str);
|
||||
|
||||
if (wkb->preedit_style)
|
||||
wl_input_method_context_preedit_styling(wkb->im_ctx, 0, strlen(wkb->preedit_str), wkb->preedit_style);
|
||||
wl_input_method_context_preedit_styling(wkb->im_ctx, 0,
|
||||
strlen(wkb->preedit_str),
|
||||
wkb->preedit_style);
|
||||
|
||||
if (cursor > 0)
|
||||
index = cursor;
|
||||
|
||||
wl_input_method_context_preedit_cursor(wkb->im_ctx, index);
|
||||
wl_input_method_context_preedit_string(wkb->im_ctx, wkb->serial, wkb->preedit_str, wkb->preedit_str);
|
||||
wl_input_method_context_preedit_string(wkb->im_ctx, wkb->serial,
|
||||
wkb->preedit_str, wkb->preedit_str);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -185,7 +200,8 @@ _cb_wkb_on_key_down(void *data, Evas_Object *obj EINA_UNUSED, const char *emissi
|
|||
{
|
||||
_wkb_commit_preedit_str(wkb);
|
||||
wl_input_method_context_keysym(wkb->im_ctx, wkb->serial, 0,
|
||||
XKB_KEY_Return, WL_KEYBOARD_KEY_STATE_PRESSED, 0);
|
||||
XKB_KEY_Return,
|
||||
WL_KEYBOARD_KEY_STATE_PRESSED, 0);
|
||||
goto end;
|
||||
}
|
||||
else if (eina_streq(key, "space"))
|
||||
|
@ -213,12 +229,14 @@ _wkb_ui_setup(struct weekeyboard *wkb)
|
|||
if (!wkb->edje_obj)
|
||||
{
|
||||
Evas *evas;
|
||||
|
||||
ecore_evas_alpha_set(wkb->ee, EINA_TRUE);
|
||||
ecore_evas_title_set(wkb->ee, "Weekeyboard");
|
||||
|
||||
evas = ecore_evas_get(wkb->ee);
|
||||
wkb->edje_obj = edje_object_add(evas);
|
||||
edje_object_signal_callback_add(wkb->edje_obj, "key_down", "*", _cb_wkb_on_key_down, wkb);
|
||||
edje_object_signal_callback_add(wkb->edje_obj, "key_down", "*",
|
||||
_cb_wkb_on_key_down, wkb);
|
||||
}
|
||||
|
||||
// hard coded
|
||||
|
@ -232,7 +250,7 @@ _wkb_ui_setup(struct weekeyboard *wkb)
|
|||
|
||||
if (eina_streq(wkb->theme, "default"))
|
||||
{
|
||||
ecore_wl_screen_size_get(&w, &h);
|
||||
ecore_wl2_display_screen_size_get(ewd, &w, &h);
|
||||
DBG("Screen size: w=%d, h=%d", w, h);
|
||||
if (w >= 1080)
|
||||
w = 1080;
|
||||
|
@ -244,7 +262,8 @@ _wkb_ui_setup(struct weekeyboard *wkb)
|
|||
DBG("Using default_%d theme", w);
|
||||
}
|
||||
|
||||
snprintf(path, PATH_MAX, "%s/%s_%d.edj", e_module_dir_get(wkb->module), wkb->theme, w);
|
||||
snprintf(path, PATH_MAX, "%s/%s_%d.edj",
|
||||
e_module_dir_get(wkb->module), wkb->theme, w);
|
||||
INF("Loading edje file: '%s'", path);
|
||||
|
||||
if (!edje_object_file_set(wkb->edje_obj, path, "main"))
|
||||
|
@ -277,8 +296,9 @@ _wkb_ui_setup(struct weekeyboard *wkb)
|
|||
{
|
||||
int rx, ry, rw, rh;
|
||||
|
||||
edje_object_part_geometry_get(wkb->edje_obj, "background", &rx, &ry, &rw, &rh);
|
||||
ecore_wl_window_input_region_set(wkb->win, rx, ry, rw, rh);
|
||||
edje_object_part_geometry_get(wkb->edje_obj, "background",
|
||||
&rx, &ry, &rw, &rh);
|
||||
ecore_wl2_window_input_region_set(wkb->win, rx, ry, rw, rh);
|
||||
}
|
||||
|
||||
ignore_keys = edje_file_data_get(path, "ignore-keys");
|
||||
|
@ -304,7 +324,8 @@ _wkb_im_ctx_surrounding_text(void *data, struct wl_input_method_context *im_ctx,
|
|||
|
||||
EINA_SAFETY_ON_NULL_RETURN(text);
|
||||
|
||||
DBG("im_context = %p text = '%s' cursor = %d anchor = %d", im_ctx, text, cursor, anchor);
|
||||
DBG("im_context = %p text = '%s' cursor = %d anchor = %d",
|
||||
im_ctx, text, cursor, anchor);
|
||||
|
||||
free(wkb->surrounding_text);
|
||||
|
||||
|
@ -390,7 +411,8 @@ _wkb_im_ctx_commit_state(void *data, struct wl_input_method_context *im_ctx, uin
|
|||
wkb->serial = serial;
|
||||
|
||||
wl_input_method_context_language(im_ctx, wkb->serial, "en");
|
||||
wl_input_method_context_text_direction(im_ctx, wkb->serial, WL_TEXT_INPUT_TEXT_DIRECTION_LTR);
|
||||
wl_input_method_context_text_direction(im_ctx, wkb->serial,
|
||||
WL_TEXT_INPUT_TEXT_DIRECTION_LTR);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -451,7 +473,8 @@ _wkb_im_activate(void *data, struct wl_input_method *input_method EINA_UNUSED, s
|
|||
|
||||
/* hard coded */
|
||||
wl_input_method_context_language(im_ctx, wkb->serial, "en");
|
||||
wl_input_method_context_text_direction(im_ctx, wkb->serial, WL_TEXT_INPUT_TEXT_DIRECTION_LTR);
|
||||
wl_input_method_context_text_direction(im_ctx, wkb->serial,
|
||||
WL_TEXT_INPUT_TEXT_DIRECTION_LTR);
|
||||
|
||||
wkb->context_changed = EINA_TRUE;
|
||||
evas_object_show(wkb->edje_obj);
|
||||
|
@ -478,32 +501,41 @@ static const struct wl_input_method_listener wkb_im_listener = {
|
|||
static Eina_Bool
|
||||
_wkb_setup(struct weekeyboard *wkb)
|
||||
{
|
||||
Eina_Inlist *globals;
|
||||
Eina_Iterator *itr;
|
||||
Ecore_Wl2_Global *global;
|
||||
struct wl_registry *registry;
|
||||
Ecore_Wl_Global *global;
|
||||
struct wl_input_panel_surface *ips;
|
||||
void *data;
|
||||
|
||||
globals = ecore_wl_globals_get();
|
||||
registry = ecore_wl_registry_get();
|
||||
EINA_INLIST_FOREACH(globals, global)
|
||||
registry = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd);
|
||||
itr = ecore_wl2_display_globals_get(ewd);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
global = (Ecore_Wl2_Global *)data;
|
||||
|
||||
DBG("interface: <%s>", global->interface);
|
||||
if (eina_streq(global->interface, "wl_input_panel"))
|
||||
{
|
||||
wkb->ip = wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1);
|
||||
wkb->ip =
|
||||
wl_registry_bind(registry, global->id,
|
||||
&wl_input_panel_interface, 1);
|
||||
DBG("binding wl_input_panel");
|
||||
}
|
||||
else if (eina_streq(global->interface, "wl_input_method"))
|
||||
{
|
||||
wkb->im = wl_registry_bind(registry, global->id, &wl_input_method_interface, 1);
|
||||
wkb->im =
|
||||
wl_registry_bind(registry, global->id,
|
||||
&wl_input_method_interface, 1);
|
||||
DBG("binding wl_input_method, id = %d", global->id);
|
||||
}
|
||||
else if (eina_streq(global->interface, "wl_output"))
|
||||
{
|
||||
wkb->output = wl_registry_bind(registry, global->id, &wl_output_interface, 1);
|
||||
wkb->output =
|
||||
wl_registry_bind(registry, global->id, &wl_output_interface, 1);
|
||||
DBG("binding wl_output");
|
||||
}
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
|
||||
if ((!wkb->ip) || (!wkb->im) || (!wkb->output))
|
||||
return EINA_FALSE;
|
||||
|
@ -513,11 +545,14 @@ _wkb_setup(struct weekeyboard *wkb)
|
|||
|
||||
/* Set input panel surface */
|
||||
DBG("Setting up input panel");
|
||||
wkb->win = ecore_evas_wayland_window_get(wkb->ee);
|
||||
ecore_wl_window_type_set(wkb->win, ECORE_WL_WINDOW_TYPE_NONE);
|
||||
wkb->surface = ecore_wl_window_surface_create(wkb->win);
|
||||
|
||||
wkb->win = ecore_evas_wayland_window_get2(wkb->ee);
|
||||
ecore_wl2_window_type_set(wkb->win, ECORE_WL2_WINDOW_TYPE_NONE);
|
||||
|
||||
wkb->surface = ecore_wl2_window_surface_get(wkb->win);
|
||||
ips = wl_input_panel_get_input_panel_surface(wkb->ip, wkb->surface);
|
||||
wl_input_panel_surface_set_toplevel(ips, wkb->output, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
|
||||
wl_input_panel_surface_set_toplevel(ips, wkb->output,
|
||||
WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
|
||||
|
||||
/* Input method listener */
|
||||
DBG("Adding wl_input_method listener");
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
EINTERN void dnd_init(void);
|
||||
EINTERN void dnd_shutdown(void);
|
||||
E_API int e_modapi_shutdown(E_Module *m EINA_UNUSED);
|
||||
|
||||
E_API void *e_modapi_init(E_Module *m);
|
||||
|
||||
/* local structures */
|
||||
typedef struct _E_XWayland_Server E_XWayland_Server;
|
||||
|
@ -252,6 +255,14 @@ fail:
|
|||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
static void
|
||||
xwayland_fatal(void *d EINA_UNUSED)
|
||||
{
|
||||
/* on xwayland fatal, attempt to restart it */
|
||||
e_modapi_shutdown(NULL);
|
||||
e_modapi_init(NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
xnotify(void *d EINA_UNUSED, Ecore_Thread *eth EINA_UNUSED, void *disp)
|
||||
{
|
||||
|
@ -263,6 +274,7 @@ xnotify(void *d EINA_UNUSED, Ecore_Thread *eth EINA_UNUSED, void *disp)
|
|||
assert(ecore_x_init_from_display(disp));
|
||||
e_comp_x_init();
|
||||
dnd_init();
|
||||
ecore_x_io_error_handler_set(xwayland_fatal, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue