Compare commits

...

668 Commits

Author SHA1 Message Date
Simon Lees 973b16091d
21.11 NEWS 2017-11-03 13:14:49 +10:30
Simon Lees 28f8fc8409
21.11 Release 2017-11-03 13:14:29 +10:30
Mike Blumenkrantz 75269b188c add event for xwayland init 2017-11-02 07:22:06 -04:00
Mike Blumenkrantz 54965b9d2c Revert "handle x11 shaped input under xwayland"
This reverts commit eb20eb1bd9.
2017-11-02 07:19:28 -04:00
Mike Blumenkrantz b68fef5d37 explicitly free client animation agent object during fullscreen operation
ensure that animations do not persist after fullscreen state has been set
2017-10-31 12:11:47 -04:00
Mike Blumenkrantz d6c46e4885 handle more mouse buttons under wayland
this was incorrectly referenced from weston's x11 compositor, which directly
uses xcb events and sends them as wl_pointer events. efl translates all input
events to use the same button scheme numbering, coincidentally enabling the use
of this code for all backends
2017-10-31 12:11:45 -04:00
Mike Blumenkrantz 379edcefbe block wl modal window destructor from intercepting xwl modal windows
failing to pass these to the xwl destructor breaks the xserver

ref T5593
2017-10-31 12:11:44 -04:00
Mike Blumenkrantz f05c1999ae unset xwayland client changes.pos flag during xwl->wl switch if client is unplaced
fixes some initial client positioning issues
2017-10-31 12:11:41 -04:00
Carsten Haitzler bf52e1db38 nvidia driver workaround atexit handlers for pam auth
this works around an apparently atexit() handler in nvidia drivers
that if you fork() a parent and do NOT exec() then the child process
will end up messing with the parent processes access to the nvidia
devices/display/whatever i believe via an atexit() handler because
moving from exit() to _exit() solves the issue. fixes T6197

@fix
2017-10-31 12:11:37 -04:00
Carsten Haitzler 6062204900 e main - xdg runtime dir fixup - dont overwrite same buffer
this path i never saw triggered before on linux because xdg runtime
dir is set... but if it isn't... dont mess up the runtime dir path

@fix
2017-10-31 12:11:29 -04:00
Mike Blumenkrantz 16454431ca send wl pointer leave for deleted clients if viable 2017-10-31 12:11:23 -04:00
Mike Blumenkrantz 68a3cee2af unset client's mouse-in state on mouse out even while fullscreen or deleted
the state should always be updated regardless of these attributes
2017-10-31 12:11:17 -04:00
Derek Foreman e91dcec870 Fix crash on wayland logout if xwayland hasn't started yet
If xwayland hasn't started yet then the root window id is 0, which is
invalid, so we crash in e_comp_x_shutdown.
2017-10-31 12:10:54 -04:00
Derek Foreman 89e0308fd2 Clear stored root window id when shutting down X
Currently e_comp_util_has_x() will still return true after the X
machinery is shut down - this can lead to crashes on logout under
wayland when xwayland apps are running.  Clearing the root window
id resolves this.

@ref T5593
2017-10-31 12:10:50 -04:00
Mike Blumenkrantz fb5922e97c move x11 compositor cleanup into shutdown function 2017-10-31 12:10:41 -04:00
Derek Foreman 384a71c658 Fix xwayland related crash when mousing out of a window
XWayland likes to set a buffer on the cursor surface then delete it before
we release it.  I'm pretty sure when a client does that we're within spec
to just kill it, but users will likely find this response ungratifying.

So, instead, just gracefully fail to render the undefined surface.

@ref T5593
2017-10-31 12:10:36 -04:00
Mike Blumenkrantz 6c3c7325db cancel wl selections after removing destroy listener
cancel may destroy the selection source, resulting in invalid access

==10735== Invalid write of size 8
==10735==    at 0x87C8095: wl_list_remove (wayland-util.c:56)
==10735==    by 0x2EE745: _e_comp_wl_data_device_selection_set (e_comp_wl_data.c:506)
==10735==    by 0x2EF241: _e_comp_wl_data_device_cb_selection_set (e_comp_wl_data.c:714)
==10735==    by 0x1021F037: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x1021EA99: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x87C70C0: wl_closure_invoke (connection.c:935)
==10735==    by 0x87C13C8: wl_client_connection_data (wayland-server.c:406)
==10735==    by 0x87C4483: wl_event_source_fd_dispatch (event-loop.c:90)
==10735==    by 0x87C4DE4: wl_event_loop_dispatch (event-loop.c:423)
==10735==    by 0x85AE346: _cb_create_data (ecore_wl2_display.c:399)
==10735==    by 0x946857A: _ecore_call_fd_cb (ecore_private.h:347)
==10735==    by 0x946AE51: _ecore_main_fd_handlers_call (ecore_main.c:2015)
==10735==    by 0x946B823: _ecore_main_loop_iterate_internal (ecore_main.c:2403)
==10735==    by 0x946935E: ecore_main_loop_begin (ecore_main.c:1308)
==10735==    by 0x151139: main (e_main.c:1088)
==10735==  Address 0x222ca980 is 16 bytes inside a block of size 136 free'd
==10735==    at 0x4C2CE1B: free (vg_replace_malloc.c:530)
==10735==    by 0x2F076F: e_comp_wl_clipboard_source_unref (e_comp_wl_data.c:1291)
==10735==    by 0x214C6A09: _xwayland_send_cancelled (dnd.c:149)
==10735==    by 0x2EE71D: _e_comp_wl_data_device_selection_set (e_comp_wl_data.c:504)
==10735==    by 0x2EF241: _e_comp_wl_data_device_cb_selection_set (e_comp_wl_data.c:714)
==10735==    by 0x1021F037: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x1021EA99: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x87C70C0: wl_closure_invoke (connection.c:935)
==10735==    by 0x87C13C8: wl_client_connection_data (wayland-server.c:406)
==10735==    by 0x87C4483: wl_event_source_fd_dispatch (event-loop.c:90)
==10735==    by 0x87C4DE4: wl_event_loop_dispatch (event-loop.c:423)
==10735==    by 0x85AE346: _cb_create_data (ecore_wl2_display.c:399)
==10735==    by 0x946857A: _ecore_call_fd_cb (ecore_private.h:347)
==10735==    by 0x946AE51: _ecore_main_fd_handlers_call (ecore_main.c:2015)
==10735==    by 0x946B823: _ecore_main_loop_iterate_internal (ecore_main.c:2403)
==10735==    by 0x946935E: ecore_main_loop_begin (ecore_main.c:1308)
==10735==    by 0x151139: main (e_main.c:1088)
==10735==  Block was alloc'd at
==10735==    at 0x4C2DC05: calloc (vg_replace_malloc.c:711)
==10735==    by 0x2F0520: e_comp_wl_clipboard_source_create (e_comp_wl_data.c:1231)
==10735==    by 0x214C71C9: _xwl_selection_notify (dnd.c:286)
==10735==    by 0x946130C: _ecore_call_handler_cb (ecore_private.h:331)
==10735==    by 0x94626BC: _ecore_event_call (ecore_events.c:629)
==10735==    by 0x946B83E: _ecore_main_loop_iterate_internal (ecore_main.c:2408)
==10735==    by 0x946935E: ecore_main_loop_begin (ecore_main.c:1308)
==10735==    by 0x151139: main (e_main.c:1088)
2017-10-31 12:10:21 -04:00
Mike Blumenkrantz 32b2561306 null wl clipboard+selection source pointers when destroying clipboard source
fix T6242
2017-10-31 12:10:16 -04:00
Mike Blumenkrantz 2afb298b75 set null input regions for surfaces upon calling set_cursor or start_drag
these surfaces have no input region according to spec
2017-10-31 12:10:12 -04:00
Mike Blumenkrantz d15c72417c ignore set_input_region requests for wl surfaces which are cursors or drags
according to spec this is correct behavior
2017-10-31 12:10:08 -04:00
Mike Blumenkrantz 854ead5027 do not unqueue render when deleting a client's render update
a render loop may run for reasons other than rendering a specific client
2017-10-31 12:10:02 -04:00
Mike Blumenkrantz 01de5c785f add client refs for the nocomp client
this client may be referenced after deletion during render loop

fix T6151
2017-10-31 12:09:57 -04:00
Carsten Haitzler b6df125850 battery modules - actually set ac power flag based on ac presence
this should fix T3649

@fix
2017-10-31 12:09:15 -04:00
Mike Blumenkrantz e5362e3f4a add render update when showing clients if damages exist
ensure that these clients render as expected

ref T5593
2017-10-31 12:08:41 -04:00
Mike Blumenkrantz 716ab4b43f recreate x11 root pointer when changing application<->enlightenment theme
force new visual to be applied immediately instead of requiring a compositor
restart
2017-10-12 10:47:28 -04:00
Mike Blumenkrantz 6b0b742ace always use e cursor theme for canvas pointers
canvas pointer = wl compositor pointer = always use e theme since there is no
loader for x11 cursors
2017-10-12 10:47:22 -04:00
Mike Blumenkrantz 1e1129e006 check for non-wl compositor when forcing application cursors onto pointers
comp_type is not set during initial pointer creation on startup but will be set at
the point of xwl startup, so use a check which will succeed

fix T6157
ref 2b8c70fe98
2017-10-12 10:47:17 -04:00
Mike Blumenkrantz ce0e22b131 move cursor theme options into separate frame 2017-10-12 10:45:50 -04:00
Mike Blumenkrantz 0710965e1f do not show cursor theme options in wayland compositor mode
this isn't how wayland works, so don't let users footgun themselves
2017-10-12 10:45:45 -04:00
Mike Blumenkrantz 8a97b08145 move 'show cursor' option in mouse settings inside frame 2017-10-12 10:45:42 -04:00
Mike Blumenkrantz 440157e108 Revert "disable option for mouse to use Application theme if we are running in Wayland"
This reverts commit 9e3b8b7528.

this only affects runtime in wayland-only environments while not preventing the option
from taking effect, meaning it affects nobody and prevents nothing
2017-10-12 10:45:38 -04:00
Mike Blumenkrantz c0265690a5 set default cursor on root window for xwl pointer
ref T5593

 #TheDisappointer
2017-10-12 10:45:31 -04:00
Mike Blumenkrantz eb20eb1bd9 handle x11 shaped input under xwayland 2017-10-12 10:45:25 -04:00
Mike Blumenkrantz ccf5a29e47 add max size input rects for wl clients on creation
according to spec, surfaces begin with infinite input area
2017-10-12 10:45:21 -04:00
Mike Blumenkrantz 28b19e8a2e set comp object alpha state when applying native surface
ensure that alpha is set accurately for the native surface
2017-10-12 10:45:12 -04:00
Mike Blumenkrantz cf97d96f22 block gadget configuration unconditionally while desklock is active 2017-10-12 10:45:06 -04:00
Mike Blumenkrantz 613ff4f496 deduplicate global gadget handler variables
ref T6125, T4648
2017-10-12 10:45:00 -04:00
Mike Blumenkrantz 40f7047745 redo bryce eventing
post events are way harder and I don't know why I didn't do this in the
first place?

fix T5974
2017-10-12 10:44:54 -04:00
Mike Blumenkrantz b383539a27 do ecore-x shutdown on xwayland shutdown 2017-10-12 10:44:50 -04:00
Mike Blumenkrantz d84cdbc4e9 defer wl startup apps until after xwayland init completes
startup apps may require x11 connections, so ensure this is available

fix T6122
2017-10-12 10:43:48 -04:00
Mike Blumenkrantz 8e6a91fd9c don't show xwayland clients unconditionally on commit
ensure that the client's desk is visible

fix T6024
2017-10-12 10:43:42 -04:00
Stephen 'Okra' Houston f8743ae323 E Exe: Semi revert 2082bb51d3. The ref count was off to begin with. 2017-10-12 10:43:04 -04:00
Mike Blumenkrantz 689ad82857 emit E_EVENT_EXEC_NEW_CLIENT with phony exes
partially fix T6071
2017-10-12 10:43:04 -04:00
Mike Blumenkrantz 69593aa4be use client geometry for visibility effect geometry, not comp object geometry
clients may defer object geometry setting, resulting in unreliable values here
2017-10-12 10:43:04 -04:00
Mike Blumenkrantz a678414abb remove input-only client fastpath to resize crashes
ref T6023
2017-10-12 10:43:04 -04:00
Mike Blumenkrantz 42e720a7ed don't perform zone updates on client resize
zone updates should probably only happen on client moves, not resizes

ref T6023
2017-10-12 10:39:34 -04:00
Chidambar Zinnoury 3a3b78a58f e menu: Fix missing realize when using key-activation to the right.
See commit 474463ef6c, SVN r39698.
2017-10-12 10:39:26 -04:00
Carsten Haitzler 09ef528897 tiling - ensure notification struct is 0'd before use
this should fix the last 3 crashdumps reported in T6023

@fix
2017-10-12 10:39:16 -04:00
Chidambar Zinnoury 80f802276f e remote: Fix script’s execution rights. 2017-10-12 10:39:00 -04:00
Mike Blumenkrantz e8e93eaa7d remove fdo interfaces from music control dbus xml 2017-10-12 10:38:48 -04:00
Mike Blumenkrantz 2ffa0f23dc fix clickable edge binding activation with other mouse buttons
check for the button specified in the binding, not whether the event
contains a click

fix T4510
2017-10-12 10:38:23 -04:00
Mike Blumenkrantz 8a7ee06aab flag zone/edge mouse binding activation with ON_HOLD
ensure multiple bindings aren't triggered by the same event
2017-10-12 10:37:34 -04:00
Mike Blumenkrantz 0bbd01b6db handle unmovable gadgets in gadget move action
a gadget which refuses to create a duplicate of itself can be considered
immobile

fix T5998
2017-10-12 10:37:29 -04:00
Mike Blumenkrantz 4432299947 block recursive mouse eventing in bryce action handlers
ensure that only the outermost event adds a post callback to avoid
triggering actions multiple times
2017-10-12 10:37:23 -04:00
Mike Blumenkrantz 72144e49c1 hide clients again after show in idler if clients are on hidden desk
clients need initial show to correctly handle mirror visibility but should
then be hidden again

ref 0ee8cc896e
fix T6024
2017-10-12 10:36:59 -04:00
Mike Blumenkrantz 667cb72323 use EC_CHANGED when setting changed flag in client idler 2017-10-12 10:36:53 -04:00
Mike Blumenkrantz 301edff286 resolve desktop spec issues with emixer.desktop
fix T5076
2017-10-12 10:36:31 -04:00
Carsten Haitzler d8753a3c72 e start - fix path prepend/append if already in path assuming clue
"
I have a directory at the head of my PATH that contains alternate
versions of command line utils like grep, ls, etc., but E puts
/usr/bin ahead of it, overriding my tools of choice with the system
defaults.

If my understanding is correct, the only way currently to have
directories that E prepends to your PATH appended instead is to use
-i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it.
I'd like to see a more sane option if there isn't one already.
Alternatively, I wonder if it wouldn't be a better idea to only
prepend directories to PATH if they aren't already contained within
it--thereby preserving the user's desired search order.
"

this should fix T5953

@fix
2017-10-12 10:36:25 -04:00
Mike Blumenkrantz 82e095e8b0 handle shade <-> unshade toggling in same frame
this should result in a no-op instead of a fail-op

fix T6006
2017-10-12 10:35:38 -04:00
Mike Blumenkrantz 378b49f7c5 use animator del function to delete comp object animators 2017-10-12 10:35:30 -04:00
Carsten Haitzler 6ddf1ee961 fix up window+screen positioning fixup so it doesnt catch other clients
so some other clients like mpv also try to explicitly position their
windows (like centering on screen 0 ALWAYS) and this now gets caught
up in trying to detect libreoffice doing the same thing for
presentations. so only support this is the app has explicitly
requested initial positionin explicitly and then use pending configures.
2017-10-12 10:34:26 -04:00
Derek Foreman 8ca6f02914 Fix crash when processing a wayland client cursor set after death
It looks like the only way we can get here with NULL resource data
is when we explicitly cleared it in the del hook, meaning the client
is dead to us.  In this case it's ok to ignore the cursor set request.

ref T4988
2017-10-12 10:33:39 -04:00
Simon Lees 4cd2a7b47d
21.10 NEWS Updates 2017-09-26 10:25:14 +09:30
Simon Lees 0a71414837
21.10 Release 2017-09-26 09:36:15 +09:30
Mike Blumenkrantz e2d35d9b77 remove fullscreen clients from vdesk clients list when toggling sticky state
fix T5988
2017-09-07 14:16:01 -04:00
Mike Blumenkrantz 7af9ab44a6 handle first time desk setting for fullscreen clients without crashing
ref T5988
2017-09-07 14:15:57 -04:00
Mike Blumenkrantz 976ec828b5 apply pointer focus to existing config dialogs from settings window
this should be more consistent with expected behaviors
2017-09-07 14:15:52 -04:00
Mike Blumenkrantz 3fc4c39bb4 warp pointer to center of internal dialog on show if dialog has focus
ensure that pointer-based focus policies do not experience unexpected focus
changes when a dialog changes from basic<->advanced

ref T1931
2017-09-07 14:15:48 -04:00
Mike Blumenkrantz 92b23f0d6d block all desk flips during window resize
this breaks *

fix T5984
2017-09-07 14:15:30 -04:00
Mike Blumenkrantz 0bbff0664a reset zone edge objects after comp canvas update
fix T5969
2017-09-01 13:55:43 -04:00
Carsten Haitzler 06dbb255c8 batget - fix warnings about buffer sizes
not an actual bug but too much warning noise.
2017-09-01 13:51:39 -04:00
Mike Blumenkrantz d46de408c7 add time config event rects to gadget popups list
attempt to preserve event propagation for sites in different environments
2017-09-01 13:46:37 -04:00
Mike Blumenkrantz 57593564c3 stack gadgets below site event rect when reparenting gadget 2017-09-01 13:46:26 -04:00
Mike Blumenkrantz d7ad6e027b don't update clock timer for time gadgets when deleting a non-advanced gadget
if the deleted gadget won't affect timers then don't update timers

ref T4648
2017-09-01 13:46:21 -04:00
Mike Blumenkrantz a6589188f2 set shaped client image alpha after setting image data
avoid triggering render sync with old image data

fix T5957
2017-09-01 13:46:13 -04:00
Mike Blumenkrantz 9ac1b433b1 use correct string for randr screen fuzzy matching
using the full edid string results in infinite recursion
2017-09-01 13:46:09 -04:00
Mike Blumenkrantz b4574be2bc check for matching '/' in screen edid before fuzzy matching in randr init
if no / exists then this function is pointless
2017-09-01 13:46:04 -04:00
Mike Blumenkrantz 12fc4286a6 avoid adding render updates on client resize while shading the client
this results in a blank render

fix T5929
2017-09-01 13:45:49 -04:00
Mike Blumenkrantz 6c93f1fedd return during client pixel callback if pixmap is dirty and no updates exist
this probably indicates a client update is needed in order to complete the
render, so the existing data should be reused since nothing will render now
2017-09-01 13:45:44 -04:00
Mike Blumenkrantz e88bfc6fd3 move pending client render queue in pixel callback to before render call
no functional changes
2017-09-01 13:45:40 -04:00
Mike Blumenkrantz 007dbf04c6 do not reset existing client damage on resize if tiler size matches pixmap size
this probably indicates a case where the client wasn't actually resized and the
compositor is doing something like shading a window
2017-09-01 13:45:32 -04:00
Mike Blumenkrantz 4c4016ad02 track gadget ctxpopups and reposition within zone on resize
this attempts to shift the ctxpopup content vertically and horizontally to
keep it on the same screen that the gadget is on

fix T5945
2017-09-01 13:45:11 -04:00
Mike Blumenkrantz 19f45ab1c9 use focus_set_with_pointer to focus from clients menu (middle click)
fixes pointer warping for this case
2017-09-01 13:45:01 -04:00
Mike Blumenkrantz 6406c2c1b6 use int array for client maximize hint state update
CID 1379946
2017-08-25 14:57:38 -04:00
Mike Blumenkrantz 1cb85fbe26 initialize stack variables
CIDs 1379939, 1379943
2017-08-25 14:57:30 -04:00
Mike Blumenkrantz 2d6f01a18d force client render on mirror show for clients which have not yet been rendered
this is the same mechanism in e_comp_object_dirty() which applies now if a
mirror is created for a previously-dirty client

fix T5937
2017-08-25 14:57:17 -04:00
Mike Blumenkrantz 97b22aaa91 Revert "handle updates_full when adding comp object update regions"
This reverts commit fac907e0c5.

this was already handled and I'm dumb.
2017-08-25 14:57:12 -04:00
Mike Blumenkrantz 0adffef016 Revert "force recalc on bryce scroller when doing recalc on gadget site"
This reverts commit 87515abd2a.

this breaks scaling since the min size must be reset in order to trigger a
resize
2017-08-25 14:57:02 -04:00
Mike Blumenkrantz 4da9016bff track setxkbmap processes and allow only one to run at a time
fix T5188
2017-08-25 14:56:29 -04:00
Mike Blumenkrantz df69508d89 handle bryce setup when theme is broken
fix T5889
2017-08-25 14:55:59 -04:00
Mike Blumenkrantz 939e3d8f20 handle xdg "autostart" directories in apps dialogs
a valid autostart directory can exist in any xdg data/config directory
according to spec, so ensure we check everywhere when listing them
2017-08-25 14:55:52 -04:00
Mike Blumenkrantz e386143e43 use clone of remembers list in window remember config
this modifies the remember list and guarantees a crash if sorting occurs
2017-08-25 14:55:29 -04:00
Mike Blumenkrantz 914aef57d7 do not rescale override x11 clients during hint fetching 2017-08-25 14:55:24 -04:00
Mike Blumenkrantz 6e522f8026 perform client zone updates on canvas move/resize when not ignored
overrides still need zone updates here
2017-08-25 14:55:15 -04:00
Mike Blumenkrantz f2579fbc5b use client frame for internal win geometry setting on show
calling these functions on the elm_win has no effect here
2017-08-25 14:55:05 -04:00
Mike Blumenkrantz adf2f8597f use evas size hints for image widget internals if internal obj is not edje obj 2017-08-25 14:54:50 -04:00
Mike Blumenkrantz 33ec02061b use client geometry for fileman popup positioning instead of win object geometry
window objects don't return accurate geometry under wayland

fix T3842
2017-08-25 14:54:45 -04:00
Mike Blumenkrantz 27a0b9b0a6 fix color class dialog sizing
ref T3682
2017-08-25 14:54:40 -04:00
Mike Blumenkrantz 602e93651f destroy dropped gadgets after drop operation completes
the gadget object is used during the drop callback, so destroying it
before the callback breaks the drop operation
2017-08-25 14:54:38 -04:00
Mike Blumenkrantz 56f6c0f950 perform gadget site layout before calling drop callback
calling this inside the drop callback resets the dropped gadget's position
and causes the drop operation to fail
2017-08-25 14:54:30 -04:00
Mike Blumenkrantz 9dac9c7946 set moving gadgets in pointer site to have moving state
prevent spurious resizes during layout
2017-08-25 14:54:25 -04:00
Mike Blumenkrantz 673195a6ac handle gadget ctxpopup placement for desktop gadgets
fix T5877
2017-08-25 14:54:19 -04:00
Mike Blumenkrantz 43dd2c1166 always use client geometry for comp object centering functions
this should always be more accurate than the object geometry, which may
or may not have been applied at any given time
2017-08-25 14:53:44 -04:00
Mike Blumenkrantz 13f3072172 force min size calc on dialog show
this resolves a number of dialog sizing issues where text or content could
be clipped due to deferred sizing
2017-08-25 14:53:15 -04:00
Carsten Haitzler 6c7cd33cf3 xsettings - fix warning for buffer that could be a bit small
warnings of buffer being a little small in theory. fix.
2017-08-25 14:52:55 -04:00
Carsten Haitzler 3aa8f2f1f7 filepreview - properly set min size on cells not in a broken way
this should fix T5891
2017-08-25 14:52:34 -04:00
Mike Blumenkrantz d770c06840 batch x11 maximize state change requests
if an app wants to set both horizontal and vertical, set both at the same
time to improve performance and accuracy
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 091d49d936 don't set gadman overlay gadgets as editing if overlay not visible
this screws up mover visibility

fix T3291
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 6246da93b7 check imc exe existence before showing in imc dialog list
don't show things which will definitely fail

fix T1526
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 81b05723b7 remove invalid framelist call on frametable object in imc dialog 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 961129bb59 temporarily cache x11 configure requests which reposition hidden windows
when an app tries to position itself before being shown, attempt to store this
and apply it in order to effectively handle cases where an app attempts to show
on a specific screen, e.g., presentation apps which show a console on one monitor
and the presentation on a different monitor

fix T1571
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz b6df8639a4 only set new clients to current desk if desk has not yet been set
placement policies can override setting windows onto the current desk
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 1c9f9bd32c use menu item geometry to determine whether menu item is onscreen
fix T2126
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz fbbccfc346 lock menu eventing during menu idler positioning
ensure moving menus doesn't trigger menu item activation
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz c870923716 replace existing resize pointer mode for x11 client-initiated resizes
ensure there is no mismatch between pointer modes when pushing/popping modes

fix T4893
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz a8fc231d67 handle focus reverting correctly when using desk flip all actions
perform the focus revert once the last desk has finished flipping and based
on all available visible windows

fix T3495
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 7fc3d6e094 only update wl client window size on commit if no pending resize exists
this breaks pending resizes

fix T4189
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz f9f75df309 clamp xsettings font size to 12 when size is 0
font class config does not require the user to select a size, so do
extra clamping here when a size isn't set

fix T3093
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz e89f94d505 re-select previously selected font+size in font class config 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 2e7e988555 avoid hiding->showing->hiding->etc submenus for active menu items 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz a4d9574307 use EC_CHANGED for client menu attr changes 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 95831a19e1 block updating window remembers while applying them
some attrs (e.g., desk setting) change the position/size of a window before
another attr is set, changing the original value

fix T5295
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 1e0c07489b only pop a single dialog to notify about all fail themes in theme dialog
popping a million dialogs is super annoying
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 4ad464d746 send theme signal for dialogs when no buttons are present 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 514446e620 always align ibar inner box to the left
fix T5041
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz a4e0c5a836 use xwindow check to determine whether to check icccm accept/take focus attrs 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 33e8bf0a49 don't force xwl drag client motion for override drag clients
this should improve dnd visuals a bit

ref T5593
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 339020b8e4 end xdnd operations on window hide if no FINISHED event is received
fix T5886
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 90d70f8dc0 set gadget ctxpopup priority based on anchor
fix T5877
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz b24df63860 make menu autoplacement more consistent by preferring DOWN placement 2017-08-18 16:51:02 -04:00
Marcel Hollerbach 7aaa20f219 everything:declare this object as const
The object is not meant to be moved, we only subscribe click events on
it, this isnt really changing the context where the api wants to declare
it const, so for now safe it everywhere as const and register /
unregister the callbacks with casts.
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 8545fc08be capture zone for newly-added bryces based on name
the last number is always the zone number
2017-08-18 16:51:02 -04:00
Marcel Hollerbach 7d2fdfa880 tiling: give a better error message if a client doesnt fit 2017-08-18 16:51:02 -04:00
Marcel Hollerbach e32fab8b8e mixer: find a better name
if pa does not provide the name via the proplist we can just use the
information from name if the name exists
2017-08-18 16:51:02 -04:00
Marcel Hollerbach b1a64b290f everything: use correct edje api
everything used here edje_object_part_swallow_get, which is somehow
wrong, since we dont really know if the everything theme gives the type
swallow, using the plain object_get of edje is the solution here. Its
returning a alias object that is hiding the internal edje object.
2017-08-18 16:51:02 -04:00
Marcel Hollerbach 70a33bcbe9 tiling: show notification if a client cannot be tiled
this at least tells the user that the client could not be tiled and not
just mysterically putting it under floating.
2017-08-18 16:51:02 -04:00
Al Poole 73a78b5a1a Efm: file properties, fix widget sizing issue.
Summary: This fixes the erroneous sizing of labels in Efm preview dialogues.

Reviewers: zmike!

Subscribers: stephenmhouston, cedric, raster

Differential Revision: https://phab.enlightenment.org/D5093
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 0361db9fd5 handle case where eglBindWaylandDisplay fails during wl init 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz d4179fea54 avoid object hide animations during shutdown 2017-08-18 16:51:02 -04:00
Derek Foreman 7f89c3a4e8 Remove ecore_drm support
ecore_drm2 supersedes this, ecore_drm is deprecated, and we depend on
an efl version newer than the deprecation, so none of this code should
ever be built.
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz c4a3c648d9 destroy gadget configs when deleting a gadget site 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 1727098387 set clock gadget id on creation
fix T5851
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 04436da412 clamp internal win min/max size hints to 0
ref T5845
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 4034bd97be do not defer wl gl init 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 5964b2cf41 make mouse-activated menus function as expected with 0 passed as activate time 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz d5251d3b5a don't arbitrarily bind version=1 for wl extension resources 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 4ba2333344 rescale x11 clients after fetching hints
ensure that clients initially respect useful geometry after size hints
have been fetched
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz e09cd065e2 apply client hints when rescaling a client
ensure rescales obey hints
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 7d1edcadf7 do not add delete/kill request smart callbacks for non-internal wl clients
this is not functional for other windows
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz ceb402d404 use explicit rounding for bryce scaling 2017-08-18 16:51:02 -04:00
Mike Blumenkrantz b705ac1c9e clamp vertical bryce size to useful zone geometry
this should improve layouts when vertical and horizontal layouts are mixed
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz 672d052501 do not reposition new bryces after using editor
this is now handled more accurately by bryce internals
2017-08-18 16:51:02 -04:00
Mike Blumenkrantz c650f60aea reject gadget site layout attempts only when it would be impossible
a site with orient set is expected to fill using only one axis, so a size
of 0xH or Wx0 is valid in some cases

fix T5806
2017-08-18 16:51:02 -04:00
Marcel Hollerbach 761e5e7461 e_startup: check for efreet errors
for the case efreet does not come up with any event, give a error to the
  user
2017-08-18 16:51:02 -04:00
Carsten Haitzler 5b24293a8f e - fix eet image format test to actually use key when loading
fix complaint from eet format test ... was failing because we didnt
use a key

@fix
2017-08-18 16:51:02 -04:00
Carsten Haitzler f206194fea wireless module - dont segv e if connman daemon restarts
so i get a new service of type WIRELESS_SERVICE_TYPE_NONE that's going
to suck when accessing arrays by type like wireless does like
array[cs->type] ... so check type value and if its invalid kill off
the cs as we can't do much useful with it. this fixes an actual segv e
gets if you restart the connamn daemon while e runs.
2017-08-18 16:51:01 -04:00
Simon Lees 7aef6c7040
21.9 NEWS Updates 2017-08-04 17:01:43 +09:30
Simon Lees ae87b44cf0
21.9 Release 2017-08-04 16:49:35 +09:30
Mike Blumenkrantz 4ae1b5b1fc Revert "reset comp object update regions when a render occurs"
This reverts commit e6ab84ffd5.

fix T5817
2017-08-03 10:21:39 -04:00
Mike Blumenkrantz 30e160a083 remove left/right maximize before removing vertical maximize
ensure maximize states are removed accurately and in the right order

ref b48419c577
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 7b8757997b set client opacity any time netwm hint has changed in fetch
fix T5370
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 893b7af664 continue to fetch netwm opacity hint if it changed since the last fetch
some apps (e.g., wine) do not trigger any event when changing this property,
and they use the property in order to simulate window fade in/out

ref T5370
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz e6ab84ffd5 reset comp object update regions when a render occurs
allow saving the current update regions in case evas decides not to render
this object
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 92671f2624 handle updates_full when adding comp object update regions
this flag means that the entire surface should be redrawn

ref T5370
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 7375a4beef use ecore_x_netwm_opacity_get() for x11 opacity checking
this makes the check for opacity more accurate since it returns a bool
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz efcb9a308d return updates_full state from e_comp_object_damage_exists() 2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 39963066ae show clients immediately after pixmap refresh if visibility is pending 2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 689a78533c return immediately when setting a null gadget style if current style is null 2017-07-28 16:21:32 -04:00
Mike Blumenkrantz a35844724e abort gadget site layouts if the gadget site has not been sized
this triggers infinite loops, and a resize on the site will trigger a layout
automatically
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 30be540c8a apply gadget aspects with greater precision
aspect ratio is not an integer, rounding it prematurely loses precision
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 8ff0925613 reject invalid comp object resizes
interceptors are called before any of the normal evas object geometry
validations, so ensure that invalid sizes are not applied
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz e79d5e3a1d don't create xwl receive pipe for SelectionRequest when getting the selection
this seems to sneak in sometimes even though it's totally wrong?
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 5896caa394 add text/plain;charset=utf-8 to xwl-created wl clipboard data source
UTF8_STRING is not an accepted mime type, use wl equivalent
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz d953ba43ff set xwl-originating data source dnd actions during source creation 2017-07-28 16:21:32 -04:00
Mike Blumenkrantz bef1a5f428 free xwl selection atom names after creating selection source 2017-07-28 16:21:32 -04:00
Mike Blumenkrantz 19c5da9e5c handle xwl data source cleanup more effectively
ensure source is freed and references to it are unset when changing selection
2017-07-28 16:21:32 -04:00
Mike Blumenkrantz bd53c0d8f5 focus x11 root window on init when starting with xwayland
comp canvas does not have a valid xwindow and is unfocusable
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz af82318bd7 add special case for xwl-originating drags to set dnd actions
there are no protocol methods received for setting actions, so fill them
in from the xwl source
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz 499cd346a8 save xwindow of x11 selection owner, not client
gtk uses non-application xwindows for managing selections, so this would always
fail when bridging selections from gtk apps
2017-07-28 16:21:31 -04:00
Derek Foreman ff915f92f2 Fix geometry for drm outputs
It appears that config.geom.x and config.geom.y specify the corner of
an output in global space, but ecore_drm2_output_mode_set's x and y
are offsets into the framebuffer for the corner of the display.

Just pass 0, 0 and everything will be ok.
2017-07-28 16:21:31 -04:00
Carsten Haitzler 23eb5fb3ba randr - discovered new output names that are display panels in laptops
add to the list like lvds, edp etc. ... adding DSI/dsi
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz 4029124cf5 resize comp bg_blank_object on zone update
various things hook this to check when the compositor is resized
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz b57cfe8476 rework internal win centering
call resize before attempting to center to ensure accurate positioning
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz d28ff92e6b do not use elm api to unset centered flag during resize
this triggers a full eval which resizes the window and breaks the compositor
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz d9d1130bc0 perform immediate move on bryce during autosize
ensure that positioning doesn't animate across zones and break config

fix T5666
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz ebb5f6061a use e_util env functions in time module
ref T4648
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz c19d2495c4 do not set e_comp log level 2017-07-28 16:21:31 -04:00
Mike Blumenkrantz 3fed3162b5 use real sizing for screen config mode list, not 1xheight 2017-07-28 16:21:31 -04:00
Mike Blumenkrantz 1169c7f5cc use more descriptive label than '???' for unconfigured outputs in scren config 2017-07-28 16:21:31 -04:00
Mike Blumenkrantz ce4e7ed5a7 hide pointer cursor clients when unsetting them
ensure the pointer remains hidden even if the client does not unmap its surface

 #TheDisappointer
2017-07-28 16:21:31 -04:00
Mike Blumenkrantz b59cbfc494 check for different types of load errors during startup image load tests
in the case where files are not found (possibly not installed/corrupted),
attempt to continue starting and not brick a running session
2017-07-28 16:08:50 -04:00
Derek Foreman 34b3b41ebd Don't block wayland client updates during screen saver fade out
We stop allowing client updates when the screensaver is on to save power,
however this happens at the start of the fade-out.  On wayland this stops
any visible client change.

If we wait until after the canvas is set to manual render instead then
we get similar benefit but don't lose display updates while they're
still visible.

Fix T5714
2017-07-28 16:08:31 -04:00
Mike Blumenkrantz 78e6ecd95e don't free x11 clipboard source immediately
ref T5738
2017-07-28 16:08:01 -04:00
Mike Blumenkrantz 11dfe64736 only store the compositor's own data manager resource to e_comp_wl->mgr.resource 2017-07-28 16:07:06 -04:00
Mike Blumenkrantz 3f915ae6a8 prune unconfigured gadgets from comp object sites upon site del
automatically created sites shouldn't trigger wizards upon show
2017-07-28 16:06:03 -04:00
Mike Blumenkrantz cb3284cfe5 freeze pointer animations while screensaver is active 2017-07-28 16:05:54 -04:00
Mike Blumenkrantz 7cba1a3bf4 disable clock+time gadget updating during dpms 2017-07-28 16:05:48 -04:00
Mike Blumenkrantz c45b2165f6 rename clock+time module event handler lists
this is no longer what it used to be...
2017-07-28 16:05:35 -04:00
Mike Blumenkrantz badd1b0293 only set qt theme override env vars if option to do theme matching is enabled 2017-07-28 16:05:27 -04:00
Mike Blumenkrantz 44b619036f update time gadget date string during clock timer
fix T5700
2017-07-28 16:05:15 -04:00
Mike Blumenkrantz 7e46b933ea move gadget del callbacks to AFTER priority
ensure gadget internals have longer lifetime than external callbacks on
gadget objects

ref 27091c510c

fix T5601, T5693
2017-07-28 16:05:07 -04:00
Mike Blumenkrantz 0281f617ff unset gadget site's layout pointer after destroying gadgets
ensure this persists through gadget del callbacks

ref T5693
2017-07-28 15:58:32 -04:00
Derek Foreman 7ce0a22729 Fix xwayland selection crash
When creating the data manager source, passing an id of 1 overwrites
the wl_display's id in the map, causing crashes the next time the
client tries to interact with that object.  The client in this case
is Xwayland.  Bad things happen.

Instead pass 0 which just chooses an available map slot.

Fix T5738
2017-07-28 15:58:28 -04:00
Jean-Philippe Andre 457843b005 pulse: do not leak strbuf
See also ac92ff5256.
- eina_strbuf_string_get() returns the internally stored string as
  a const char *, and does not free the strbuf itself
- eina_strbuf_string_steal() returns the internal string as a
  char *, giving ownership to the caller, and frees the strbuf
  itself
- eina_stringshare_add() takes a const char * as input and makes a
  copy of the string

As a consequence, ss_add(sb_string_steal()) leaks the internal
string from the strbuf, while ss_add(sb_string_get()) leaks the
strbuf structure.

A one liner here would require either an eina_slstr based API or
an API in stringshare to take ownership of a given string. Both
would be useful APIs :)
2017-07-28 15:57:57 -04:00
Marcel Hollerbach 1b49006b52 mixer: do not leak a allocated string
this fixes a leak, thank you jp!

@fix
2017-07-28 15:57:48 -04:00
Amitesh Singh 3bec9c1343 e widget entry: fix the compilation warning
src/bin/e_widget_entry.c:269:16: warning:
unused variable ‘text’ [-Wunused-variable]
2017-07-28 15:57:25 -04:00
Mike Blumenkrantz 52e59069df use kbd focus resource's client instead of "focused" client in data device 2017-07-28 15:57:11 -04:00
Mike Blumenkrantz 7c6a712151 unset DISPLAY in mixer when performing pulseaudio operations under wl 2017-07-07 16:33:16 -04:00
Mike Blumenkrantz 889c8c3167 add "focus" mode for render debug 2017-07-07 16:33:04 -04:00
Derek Foreman 836a99619b Make wayland clients render when only visible from mirrors
Under some circumstances we can defer frame callbacks forever for clients
that are only visible on desk mirrors.

I'm not certain those circumstances should actually occur (Ref T5678) but
at least for now this is a trivial and harmless workaround.

Fix T5654
2017-07-07 16:32:47 -04:00
Marcel Hollerbach 333298b5bd mixer: the name has to be a stringshare 2017-07-07 16:32:27 -04:00
Marcel Hollerbach d016800c51 emixer: use a better name for the sink inputs
it seems applications are using a higher quality name with the property
PA_PROP_APPLICATION_NAME.

ref T5664
2017-07-07 16:32:21 -04:00
Carsten Haitzler bd60a1ea0a e - fix entry wrapper - e entry was plain. elm is markup. do it properly
convert to/from utf8 plain/markup in e widget entry wrapper.... this
fixes broken results if you enter escapable text like " or < or > or &
... etc.

@fix
2017-07-07 16:32:14 -04:00
Mike Blumenkrantz e2ba10b7db only call old ecore_drm2 functions if built and run against < 1.20 efl 2017-06-30 15:41:55 -04:00
Mike Blumenkrantz 755f03fd65 simplify drm output update event by using randr screen refresh queuing
also moves all the output add/del into e_comp_wl
2017-06-30 15:41:45 -04:00
Mike Blumenkrantz d4f74e24d9 don't crash in randr module when using fake xinerama screens 2017-06-30 15:27:43 -04:00
Mike Blumenkrantz 53a4d264ed try redirecting failed clients again during resize
it seems like this is a good place to try, and this seems to resolve
some render updating issues on restart, such as with maximized chrome
windows

ref T5599
2017-06-30 15:27:32 -04:00
Mike Blumenkrantz 26e3b2204d only unredirect clients during comp update after 3 failures
tfw your conditional is backwards
2017-06-30 15:27:29 -04:00
Mike Blumenkrantz 56d9df831f don't call comp object cleanup functions for clients without comp objects 2017-06-30 15:27:19 -04:00
Mike Blumenkrantz b7c36b3b81 don't force shm for xwayland launch and enable gl
fix T5606
2017-06-30 15:27:10 -04:00
Mike Blumenkrantz 7789ed0087 don't run x11 focus (un)set callbacks for override clients
this is unnecessary in x11 and broken in xwayland
2017-06-30 15:27:07 -04:00
Mike Blumenkrantz 2e4207027d use xwayland check for clients when checking whether to reset focus to root
checking base pixmap returns false for xwayland clients
2017-06-30 15:27:03 -04:00
Mike Blumenkrantz 7295699c09 make e_comp_object_frame_allowed() return false for ignored clients 2017-06-30 15:26:50 -04:00
Mike Blumenkrantz afcb0e79a0 check exit status from auth subprocess
if the process doesn't exit then auth didn't succeed and this is a system issue

ref T5604
2017-06-30 15:26:32 -04:00
Mike Blumenkrantz c5f6bbafa5 multiply pointer axis values by 10 for wl clients
wayland clients expect this multiplier, so now scrolling speed should be
back to normal
2017-06-30 15:26:28 -04:00
Mike Blumenkrantz 6849ba1364 perform move after resize during comp object show
in the case where an object is being shown before it has been moved or
resized, a move operation will trigger a series of callbacks which force the
compositor to attempt an illegal operation (recursive show before resize)

fix T5521
2017-06-30 15:26:19 -04:00
Derek Foreman 53f10f0da9 Test dmabuf via native_surface_set even in software render
This is necessary to verify the the attributes struct is the same
version EFL can process, before we commit to displaying it.

@fix
2017-06-30 15:25:53 -04:00
Mike Blumenkrantz 47a09b739f block "user" client resizes during comp client updating phase
resizing objects triggers clip resizes and further event feeding which
can propagate mouse events such that clients try to resize themselves
during the update phase, resulting in illegal compositor behavior
2017-06-30 15:25:33 -04:00
Mike Blumenkrantz 79080cea2d use safe list iterating when clearing a gadget site during shutdown
demo gadgets are immediately removed when deleted, leading to list
corruption unless a safe iterator is used
2017-06-30 15:24:13 -04:00
Mike Blumenkrantz 679ab13c94 use seat0 as default seat name instead of default 2017-06-30 15:23:39 -04:00
Mike Blumenkrantz 5642ed47e8 update gadget position during a resize from top/left edge 2017-06-30 15:23:23 -04:00
Mike Blumenkrantz d3e4caa57d if gadget wizard returns a zero id, remove gadget from site and destroy 2017-06-30 15:23:08 -04:00
Mike Blumenkrantz bd89873d65 print object type if name is null during shape debug 2017-06-30 15:22:50 -04:00
Mike Blumenkrantz 93ae4e4dee set pass events on shape debug rects 2017-06-30 15:22:43 -04:00
Mike Blumenkrantz 96c3bd7c96 try only 1 reconnect to pulse when mixer fails to init
this causes huge lag on failure with no termination case. if it fails
on the reconnect attempt then odds are it's never going to succeed
2017-06-30 15:22:38 -04:00
Derek Foreman d6826b1c20 Initialize the Evas_Native_Surface to 0 for dmabuf tests
ref e6f17dee5d

Should probably clear this one too, though the recent native surface api
changes won't cause any breakage here, future ones might.
2017-06-30 15:22:29 -04:00
Derek Foreman 75b2cdfd65 Clear the native surface structure before initializing it
Since the native surface "API" is isomorphic with pain and suffering, we
should be extra careful when we touch it.
2017-06-30 15:22:07 -04:00
Mike Blumenkrantz 63caec26eb reject client mouse move if coords match previous position
ensure that random event feeds don't accidentally trigger unwanted
move/resize attempts which can break the compositor
2017-06-16 15:06:12 -04:00
Mike Blumenkrantz ef891ae105 use fake xinerama screens when initializing wl outputs
always ignore physical screens if fake ones are present
2017-06-16 15:05:22 -04:00
Mike Blumenkrantz 56437be3a0 hook client object unref callback to cleanup comp object internals
ensure cleanup occurs before client object is freed
2017-06-16 15:05:12 -04:00
Mike Blumenkrantz 8e9b530582 don't null pointer after deleting internal win during wl delete request
this is invalid during a logout
2017-06-16 15:05:05 -04:00
Mike Blumenkrantz de3bb9e7cf only remove left/right maximize when removing vertical if left/right is set
avoid accidentally removing horizontal maximizes
2017-06-16 15:04:55 -04:00
Mike Blumenkrantz 17d9379ba1 do not trigger events/bindings on zone object events with timestamp==0
these are internal event feeds and should not trigger additional actions
2017-06-09 20:28:00 -04:00
Mike Blumenkrantz 2393e6aeed delete client raise timer when beginning a move/resize operation
this breaks things in subtle ways
2017-06-09 20:27:51 -04:00
Mike Blumenkrantz ba9c8ab2c1 perform client raise before triggering move/resize BEGIN client hook
hooks may further modify stacking, so ensure any changes are done before
that point
2017-06-09 20:27:44 -04:00
Mike Blumenkrantz f97b157bca another fix for e_comp_wl->ptr.x/y coords being wl_fixed instead of ints
ref 2c7e91d38f
2017-06-09 20:26:06 -04:00
Derek Foreman f006caaee7 clean up some code
remove write-only variable in the pixmap struct
2017-06-09 20:25:47 -04:00
Derek Foreman 7396c05b52 Fix unused var compiler warning in wl_drm
Unused variable after my session activation cleanup
2017-06-09 20:25:40 -04:00
Derek Foreman 4088e035c6 Remove some duplicate operations
the native surface version was set outside of the switch statement,
so we don't need to re-set it to the same thing here.
2017-06-09 20:25:18 -04:00
Mike Blumenkrantz f41e5a9050 use FOREACH_SAFE when walking client list during logout
internal clients can be instantly destroyed and removed from the list
2017-06-09 20:25:11 -04:00
Derek Foreman db46a8557c Fix wl_drm session (de)activation callback
I missed this in my last commit - we probably shouldn't be calling
e_comp_render_queue or e_comp_shape_queue_block() after hiding the
ecore_evas anyway - and by removing the e_comp_shape_queue_block()
in the activation callback I made things asymmetrical.  Ungood.
2017-06-09 20:25:05 -04:00
Derek Foreman b8b5cb6d77 Fix wl_drm session activation callback
The code intended to force evas to redraw when we switch back from
another virtual console is failing to do so.  Remove it and replace
it with simpler code that successfully forces a redraw.
2017-06-09 20:25:04 -04:00
Derek Foreman f76fb2d558 Don't require dmabuf buffers to be writeable
Compositor doesn't need to write to this buffer, and most clients won't
allocate them in a way that the compositor can.  Relax the test criteria.
2017-06-09 20:24:53 -04:00
Mike Blumenkrantz 3593fe3856 do not perform zone updates on ignored clients during evas callbacks
ignored clients should not have a zone or a desk
2017-06-09 20:24:28 -04:00
Mike Blumenkrantz ecc5d49b9a force client pixmap refresh immediately during resize if nocomp is active
in the case where this path was reached during x11 nocomp, the client's pixmap
refresh would be deferred until the end of nocomp, even when the refresh would
otherwise end the nocomp. instead, force the refresh immediately.

fix T4887
2017-06-09 20:24:21 -04:00
Mike Blumenkrantz d4849f792f add error messages when symbols fail to resolve in xwl init
ref T5258
2017-06-09 20:24:11 -04:00
Mike Blumenkrantz 54a062b7bf don't dup fds during xwl bridged selection transfer, this happens in libwayland 2017-06-09 20:23:22 -04:00
Mike Blumenkrantz d0b6ff11fa unset wl selection target client if that client is deleted
the frame deletion callback would trigger far too late, allowing
crashes to occur if the selection target client exited between the
time of the drop event and the selection send event
2017-06-09 20:23:17 -04:00
Mike Blumenkrantz 43157cb1f5 unset wl button mask when beginning a move/resize operation
ensure that clients do not receive a release event for any pressed
buttons
2017-06-09 20:23:12 -04:00
Mike Blumenkrantz cf9605ffca check efm path existence before using it during dnd selections
CID 1374484
2017-06-09 20:23:03 -04:00
Simon Lees 317a566df9
21.8 NEWS Updates 2017-05-18 10:07:30 +09:30
Simon Lees c430bbf9ca
21.8 Release 2017-05-18 10:06:39 +09:30
Simon Lees 35c0c3ed19
Update .po files 2017-05-18 09:55:49 +09:30
Carsten Haitzler a0322f4b00 further fixes to screensaver/banking with window states like fullscreen
this is a further fix for T5464 to actually make the intended option
work at all. what was there was broken. now it works. init order was
wrong - screensaver was relying on event id's from e_client socde that
were not initted yet AND the handlers didnt account for "dont blank
when fullscreen window is there" at all. @fix
2017-05-08 06:54:02 -04:00
Carsten Haitzler 5730203d60 fix fullscreen no blank logic in e's dpms code
while this is still the wrong place and has other bugs, this fixes
T5464 ... but different things to fix now. @fix
2017-05-08 06:53:25 -04:00
Mike Blumenkrantz 0d7abc11b8 do not show iconic x11 clients on on icccm hint change
this is supposed to handle the case of state changing from withdrawn
to normal, but attempting to show an iconic client in this case results
in dead windows on screen

fix T5444
2017-05-05 10:37:03 -04:00
Mike Blumenkrantz 7439b6ed9d better handling for iconify during comp object show/hide
in the case where effects are disabled, no animation is started for iconify
operations, so this should fall through to the normal hide/show paths

ref T5444
2017-05-05 10:37:02 -04:00
Mike Blumenkrantz 8b9ef06ef1 check image load error when checking dmabuf viability in gl
ref T5418
2017-04-28 15:41:57 -04:00
Mike Blumenkrantz e83aea9106 set initial x11 window geometry for windows which do not have wm hints
fixes case where a non-override window has no hints and must be shown on
startup
2017-04-28 15:41:57 -04:00
Mike Blumenkrantz d832fb5b30 avoid refocusing deleted wl clients during comp input ungrabbing
this is an error
2017-04-28 15:41:57 -04:00
Mike Blumenkrantz 10537060fd explicitly set nested wl output canvas as a toplevel window
this is not an elm win so it needs to be set by the module
2017-04-28 15:41:57 -04:00
Mike Blumenkrantz 519bdd9c6c make SHAPE_DEBUG activate with E_SHAPE_DEBUG env var
this is useful for debugging and the option to recompile is not always
available
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 1d14c6b283 make RENDER_DEBUG activate with E_RENDER_DEBUG env var
this is useful for debugging and the option to recompile is not always
available
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 905607dbc1 set pass events on efm icons when deleting files
ensure that if a delete op is executing the icon cannot be clicked

probably fix T5340
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 9e303d329e re-set list of default desklock bgs when changing to custom bg in config
this list of bgs gets freed a lot, including in this case, which results in
the apply() function failing later after the bg has been changed

fix T5288
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 822879c1a1 remove uuid references from e_pixmap.c
I don't know what these are for?
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz a7f20c7929 add cache for dead x11 manager windows
in the case where an app unmaps and maps its window very quickly, this
allows detection of the maprequest event which will occur with the just-deleted
manager window so that the window can be correctly managed again

fix T5348
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz d25c5d31c9 support clients as positioner objects in e_comp_object_util_center_on() 2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 63be7d3b3f do not arbitrarily center "lost" child windows, center them on the parent
if the parent is also lost, it will eventually be rescued and thus all children
will also be saved

 #WeirdCommitLogs
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 34e6f6ab79 add a client's children to the skiplist during place routine
these should be ignored since they will be positioned relative to the parent
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz e298d4341d re-set backlight level when resuming from suspend
on some hw/systems, suspend sets brightness to maximum
2017-04-28 15:41:56 -04:00
Carsten Haitzler c23d0c578a e randr2 - fix freeing of stringshare by making it a stringshare
cs->id was strduped but freed as a stringshare... so actually add it
as a stringshare.
2017-04-28 15:41:56 -04:00
Al Poole b7813d381f Add user to AUTHORS.
Summary:
Have been on phab > 1 1/4 yr and active since last March, with patches.

Hopefully this isn't too rude or presumptive.

Would be nice tho!?

Test Plan: Run EFL and E (git) on OpenBSD :-)

Reviewers: raster, cedric, zmike!

Differential Revision: https://phab.enlightenment.org/D4753
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 9381f8961f call "maximize" smart callback before "maximize_pre"
this callback induces ssd changes which affect the resulting geometry
and so it must be called before any size calculations are made
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 9cd6632904 adjust size for frame geometry in no-animation maximize path
this is based on window size, not surface size

also ignore coords if the size matches, animating just a positional
change looks dumb
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 39f3215fe7 only center internal windows once
these shouldn't re-center on every resize
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 8920894de0 force animationless re-maximize when unfullscreening
animating here results in the window resizing to its original (smaller)
size, then growing back to its maximized size
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 00cf30470e check pixmap size before triggering maximize animation
if pixmap size matches animation size then avoid animation calls since
this will look stupid
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz 26e2a96d1f slightly optimize maximize -> fullscreen protocol comms for wl clients
this is a no-op since a configure will be sent later
2017-04-28 15:41:56 -04:00
Mike Blumenkrantz af66d18d88 force e_client_unmaximize() to complete during fullscreen operation
it doesn't matter if the current client size doesn't match the unmax
size in this case since the size will be changed to fullscreen anyway

fixes maximize -> fullscreen transition
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 5049ab02b3 always set E_Client->need_fullscreen when fullscreening
provide a method for determining whether a client is about to become
fullscreen during callbacks
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 3483d045a6 disable client maximize anims when unmaximizing before a fullscreen
this ensures accurate positioning of windows about to be fullscreened
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 543666790f account for late object setup when adding ssd mouse in/out callbacks
internal windows have a different setup order in which the frame is created
before any of the other internal objects in a comp object
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz bd23b9c19b do not attempt to set window hidden hints on non-internal x11 windows
this causes a BadWindow error
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 84091de515 block x11 focus eventing under xwayland
ensure that focus changes come from the compositor and not from clients
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 081ab309cd always feed mouse events for wl client move events
better handling for xwayland case of moving pointer into ssd region
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz a47a9a73a1 use even more accurate wl callbacks for detecting ssd mouse in/out events
ensure that any wl client with ssd hits the ssd mouse eventing path
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz d23584856e do not send mouse events to ssd wl clients if mouse is within ssd region 2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 8bfbf90d13 Revert "Stop sending wayland motion events when the mouse is grabbed"
This reverts commit 0a91a24573.

this should be resolved in a more readable way now
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 4354a94305 compare against e_client_action_get() for rejecting wl mouse events
signal actions do not set the cur_mouse_action pointer, but the return
of this function will still match the client for a more accurate heuristic
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 9e06da7e75 set signal move/resize clients as action_client internally
technically action_client is used to indicate that an e_action is
active, but functionally it really just means "this client is moving or
resizing" and the compositor makes certain adjustments based on this
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 70d5ebb66e send wl client resize edges during focus-in/out send_configure
avoid prematurely terminating resize operations
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz b6d90beee4 add wrappers for elm_win util create functions
avoid deadlocking in gl init by forcing sw
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 772738d944 set dialog and tooltip flags for internal clients
fixes handling of internal wl windows which are set as dialogs
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz fec6121b02 only re-set comp object position during show if client has been placed
avoid accidentally placing an unplaced client
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz fa1a17cefc handle window icons from elm for internal wins
fixes appearance of icons set with elm_win_icon_name_set()
2017-04-28 15:41:55 -04:00
Mike Blumenkrantz 0b5f65d4a8 always use jobs to create bryce menus
ensure that menus can never be created during a post event callback in
order to avoid crashes

ref T3144
fix T5262
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 5f0cf3d36b only set toolbar icon min size if icon exists 2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 73bc0bfc52 handle nested compositor delete requests
the previous implementation of this using ee callbacks broke during
elm integration since elm overrides all of those callbacks
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 451d1253fe only hide wl clients on surface destroy when surface is mapped
fixes some cases where hide animations would not be visible
2017-04-28 15:41:54 -04:00
Al Poole 7e743918d9 E keyboard settings - use the same icon as the keyboard settings dialog
Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4716
2017-04-28 15:41:54 -04:00
Al Poole 6501c42fd3 Fix compiler type warnings (snprintf)
Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4715
2017-04-28 15:41:54 -04:00
Al Poole 9eb847977b Fix macro namings in relation to endianness.
Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4714
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz cc0317ac71 don't set minw for keyboard layout dialog
somehow this causes the dialog to size crazily for a couple seconds
before growing to its final size
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 691fb103b3 handle null E_Comp->screen during randr2 shutdown
some output modules have no screen iface (e.g., buffer, wl_wl, wl_x11)
and so this will always be null
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz f958317bf5 call e_randr2_shutdown in comp shutdown
this should always be called, not just in comp_x
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz ad0b867aae move x11 iconic window init from e_hints -> comp_x initial fetch
this reflects the order in which the client passes through these functions
and fixes handling of iconic clients on startup
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz bc5172b96b force iconic state for iconic x11 clients during shutdown
this may or may not have been set previously if client mirrors are present,
but it should definitely be set during shutdown since there are no mirrors
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 5870c75a77 call wl/x compositor shutdown functions directly during comp shutdown 2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 1ab1d82904 do not start xwayland repeatedly
ref 0534c7ae6f
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 45683d3fcd check changes.pos during client maximize/fullscreen and adjust window coords
using these coords when the changes.pos flag is set should result in more accurate
results for positioning when removing the state
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz db62cf1020 only save client size info on maximize/fullscreen when protocol visible
a client which begins in one of these states must set its size again when
removing the state
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 171aebbff1 perform frame adjustments before applying wm spec hints during unmaximize
e_client_resize_limit removes frame adjustments before performing calcs,
so ensure that the geometry passed is pre-adjusted to account for this
2017-04-28 15:41:54 -04:00
Mike Blumenkrantz 804bf20c72 return during comp object pixels function if client was deleted during render 2017-04-28 15:41:08 -04:00
Mike Blumenkrantz 93b32faabd show x11 parent windows during reparent only if not withdrawn
iconic windows are still shown
2017-04-28 15:41:08 -04:00
Mike Blumenkrantz 6e2d71f132 do not force comp objects to render for their proxies if real_hid is set
this flag indicates that the object cannot be rendered
2017-04-28 15:41:08 -04:00
Mike Blumenkrantz 012a7d492e do not use saved e_randr screens if fake screens have been added 2017-04-28 15:12:05 -04:00
Mike Blumenkrantz 434a3c8d38 add handler for EFREET_EVENT_DESKTOP_CACHE_BUILD to e_order init
it's possible that during startup there will never be a CACHE_UPDATE
event, so ensure that an attempt to read occurs by watching this event too
2017-04-28 15:10:46 -04:00
Mike Blumenkrantz 7d77918f6c set ON_HOLD when activating start gadget 2017-04-28 15:10:41 -04:00
Mike Blumenkrantz dc3e882383 defer menu activation mouse-up feed
ensure that this is not triggered from an evas post event callback

ref T3144
2017-04-28 15:10:25 -04:00
Mike Blumenkrantz de624b7ca4 unset deskmirror client's client pointer upon client deletion
prevent invalid access after client deletion
2017-04-28 15:09:25 -04:00
Mike Blumenkrantz 6b946c897f add all wl client frame callbacks with priority AFTER
ensure that these occur after all other callbacks since they can affect
the lifetime of the client object
2017-04-28 15:07:31 -04:00
Mike Blumenkrantz 5d89a8a993 better protect comp object internals from dereferencing freed clients
animating comp objects persist after the lifetime of their client, so
ensure that functions which are likely to be called after the client's free
will not attempt to access client struct members
2017-04-28 15:07:22 -04:00
Mike Blumenkrantz 2931d01523 comment out inlist member of E_Comp_Object struct
this was unused
2017-04-28 15:07:08 -04:00
Mike Blumenkrantz bb30294f66 hide wl clients before deleting them on surface destroy
==13853== Invalid read of size 8
==13853==    at 0x5C7C56: _e_comp_wl_surface_destroy (e_comp_wl.c:1804)
==13853==    by 0xA999971: destroy_resource (wayland-server.c:611)
==13853==    by 0xA9A06F4: for_each_helper (wayland-util.c:374)
==13853==    by 0xA9A073F: wl_map_for_each (wayland-util.c:387)
==13853==    by 0xA999C87: wl_client_destroy (wayland-server.c:763)
==13853==    by 0xA999216: wl_client_connection_data (wayland-server.c:283)
==13853==    by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853==    by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853==    by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853==    by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853==    by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853==    by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853==    by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853==    by 0x441DA9: main (e_main.c:1089)
==13853==  Address 0x30ba5d90 is 176 bytes inside a block of size 1,424 free'd
==13853==    at 0x4C2ED4A: free (vg_replace_malloc.c:530)
==13853==    by 0x4603D6: _e_client_free (e_client.c:588)
==13853==    by 0x5475A8: e_object_free (e_object.c:119)
==13853==    by 0x5477C4: e_object_unref (e_object.c:152)
==13853==    by 0x5473D7: e_object_del (e_object.c:60)
==13853==    by 0x5C7C51: _e_comp_wl_surface_destroy (e_comp_wl.c:1803)
==13853==    by 0xA999971: destroy_resource (wayland-server.c:611)
==13853==    by 0xA9A06F4: for_each_helper (wayland-util.c:374)
==13853==    by 0xA9A073F: wl_map_for_each (wayland-util.c:387)
==13853==    by 0xA999C87: wl_client_destroy (wayland-server.c:763)
==13853==    by 0xA999216: wl_client_connection_data (wayland-server.c:283)
==13853==    by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853==    by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853==    by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853==    by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853==    by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853==    by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853==    by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853==    by 0x441DA9: main (e_main.c:1089)
==13853==  Block was alloc'd at
==13853==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==13853==    by 0x5471A4: e_object_alloc (e_object.c:20)
==13853==    by 0x467AD5: e_client_new (e_client.c:2596)
==13853==    by 0x5C7F11: _e_comp_wl_compositor_cb_surface_create (e_comp_wl.c:1858)
==13853==    by 0xADBDC57: ffi_call_unix64 (in /usr/lib64/libffi.so.6.0.2)
==13853==    by 0xADBD6B9: ffi_call (in /usr/lib64/libffi.so.6.0.2)
==13853==    by 0xA99EEED: wl_closure_invoke (connection.c:935)
==13853==    by 0xA999581: wl_client_connection_data (wayland-server.c:371)
==13853==    by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853==    by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853==    by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853==    by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853==    by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853==    by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853==    by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853==    by 0x441DA9: main (e_main.c:1089)
2017-04-28 15:07:04 -04:00
Simon Lees 4f267f8090
21.7 NEWS Updates 2017-03-07 19:35:43 +10:30
Simon Lees 48e8fb28b5
21.7 Release 2017-03-07 19:35:27 +10:30
Mike Blumenkrantz c28a455ccb include dlfcn.h for e_alert_main.c 2017-03-07 19:33:47 +10:30
Mike Blumenkrantz f220fa8d29 define E_EFL_VERSION_MINIMUM in e_alert_main.c 2017-03-07 19:33:29 +10:30
Mike Blumenkrantz 5e70f64b75 add -ldl to wl build when needed 2017-02-28 11:10:01 -05:00
Mike Blumenkrantz 1ada1b3e73 Revert "e - wl mode - stop consuming 100 percent cpu"
This reverts commit cd3490f35c.

this breaks many windows by preventing deferred resizing from occurring.
a window which is unable to resize at the time of this call must be queued
for a deferred resize, otherwise it may never resize at all and thus will
never be rendered

test case: screenshot dialog
2017-02-27 14:43:12 -05:00
Mike Blumenkrantz 9dff5b81e5 show already-visible comp util objects when changing frame type
ensure internal clipper state matches object visibility state
2017-02-24 14:47:41 -05:00
Mike Blumenkrantz 48437f930a only move new bryces to zone on create, not existing ones
this resolves an issue where not changing any position-related attrs
would stick the bryce in the wrong location until restart
2017-02-24 14:47:41 -05:00
Mike Blumenkrantz 099b50859a save config when toggling option to disable startup splash
broken since 2013
2017-02-24 14:47:41 -05:00
Marcel Hollerbach 50ca940e08 tiling: dont use floating state when toggling
when someone toggles a client he usally doesnt want to have it again in
toggle state, so make sure its vertical or horizontal.
2017-02-24 14:47:41 -05:00
Carsten Haitzler dc99898798 efm - fix nuisance warning about enlightenment 2017-02-24 14:47:41 -05:00
Carsten Haitzler 4ce6757c0d efx - fix unaligned ptr fill that is actually a bug
warning found a bug - filling in chr fileds with an api that expects
ptrs to ints - this is doing really bad things like unaligned writes
and it's overiting adjacent memory. fix
2017-02-24 14:47:41 -05:00
Carsten Haitzler 6749fa3589 tiling module - fix some warnings with casts and alignment
alignment warnings are anal and seem to not like casting allocated
structs nicely ... but they are noise that hides real issues, so
silence these as these casts/ptrs are ok after inspection.
2017-02-24 14:47:41 -05:00
Carsten Haitzler 428454bff2 e comp - quiet some warnings for casts that are ok
add soem void 8 casts for casts that are ok alignment-wise but that
generate warnings
2017-02-24 14:47:41 -05:00
Carsten Haitzler 1cf0555f73 e comp - fix stupid cast to from eina rect* to char* to eina rect* again
just causes warnings and makes no sense...
2017-02-24 14:47:41 -05:00
Carsten Haitzler c07093817c e comp object - fix warning where a void cast is as goos as the old one
we did cast to Evas_Native_Surface * but this just causes warnings due
to the input ptr being char * from memcup. as this will be aligned due
to allocation, we're ok, so use a void * cast instead
2017-02-24 14:47:41 -05:00
Carsten Haitzler 9489d57d91 e mixer pulse backened -f ix warning about use of uninit var
display really isn't uninitialized due to the logic, but compielr is
kind of right in theory... but less warnings is better so we fix the
real problems more easily. fix.
2017-02-24 14:47:41 -05:00
Carsten Haitzler 18f754be0e evry module - fix warning about comparing signed to unsigned
harmless warning - use a cast to keepit quiet.
2017-02-24 14:47:41 -05:00
Carsten Haitzler 279bea35e4 efm - fix warnings for progress time display
the code is right - data is aligned, but gcc doesn't know this, so
silence it with void * cast
2017-02-24 14:47:41 -05:00
Carsten Haitzler a2ce9c054a e notification - silence alignment warning
the code is ok - it's aligned data from evas and we can address it by
int ptrs, but the warning is noise, so simply add a void * cast in there
2017-02-24 14:47:41 -05:00
Carsten Haitzler 1693daeb66 e comp - wl - add void cast to reduce warnings
we're pointer playing anyway so types here are not really useful. we
have to get our ptrs right - including alignment, and these warnings
are not useful and just noise.
2017-02-24 14:47:41 -05:00
Carsten Haitzler c080a171ee e xsettings - fix warnings about unaligned ptr access
this moves access to byte by byte memcpy's to avoid potential
unaligned access.
2017-02-24 14:47:41 -05:00
Carsten Haitzler 0bc055d19c e comp x - fix property fetch to use int ptr from the start
this clears up soem warnings and do the cast on providing the pointer
to ecore_x_window_prop_property_get() which since it has to allocate
the data will be fine for alignment anyway, so a void * cast will do.
2017-02-24 14:47:41 -05:00
Carsten Haitzler 737eabe0c3 efm ipc - fix unaligned int read on ipc decode
warning was right - this is an unaligned read. fix.
2017-02-24 14:47:41 -05:00
Carsten Haitzler f34d5dd159 e ptr cast via void fix to reduce warnings
so we cast a lot of ptrs to other types as that is then the actual
type of the object. all these objects are allocated by malloc nad
friends so this is ok. but gcc on arm is not happy and warns. maybe it
assume this ptr could be to an element in an array of structs of this
type and so on thus will have specific alignment enforced by compiler
but our casting may disturb it? anyway. cast via void first fixes it.
we can focus on other real warnings and errors instead.
2017-02-24 14:47:41 -05:00
Carsten Haitzler b6af56b0b2 e theme conf config - fix casting char fileds to int ptrs
we're casting ptrs to char fields to int * which is actually wrong as
we break alignment guarantees. fix.
2017-02-24 14:47:41 -05:00
Carsten Haitzler 664432e363 e fileman config - fix definite alignment bug with cast char to int ptr
we're casting ptrs to char fields to int * which is actually wrong as
we break alignment guarantees. fix.
2017-02-24 14:47:41 -05:00
Carsten Haitzler d425b38e56 e ervything md5 code - fix warnings about alignment
gcc on arm is actually validly complaining about us using int * ptrs
to point to char * data and thus it likely be unaligned, so work in
reverse. make the data int * aligned and when needed mess with it as
char * data byte by byte. warnings gone.
2017-02-24 14:47:41 -05:00
Mike Blumenkrantz 34eebbb4cc ignore all non-NORMAL type wl windows in e_place
this catches subsurfaces, drags, and popups, which were erroneously being
handled like obstacles during placement
2017-02-24 14:47:41 -05:00
Mike Blumenkrantz a0a9605d30 always set E_Client->placed when successfully moving a comp object
enforce this for all cases
2017-02-24 14:47:41 -05:00
Mike Blumenkrantz 808c0681db future-proof client hook inlist initialization
manually initializing this meant it needed to be kept in sync with the
header, something that I'm unlikely to check every time client hooks are
added/removed
2017-02-24 14:47:41 -05:00
Mike Blumenkrantz 0eeb0607e6 fix return code checking for errors when generating wl key events 2017-02-24 14:47:41 -05:00
Mike Blumenkrantz 3a83c9db9e more correctly handle dnd completion for wl
* always send cancel when drag is !accepted
* always null e_comp_wl->drag_source
2017-02-24 14:47:41 -05:00
Mike Blumenkrantz 10b1ba2b23 simplify _e_comp_wl_data_device_drag_finished() slightly 2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 49c18095c2 move wl data device focus-change handling to data device leave() fn
leave() is always called before enter(), meaning that this will handle
window1 -> window2 as well as window1 -> null
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 6d14a6492f add specific handling for xwl cursor unsetting on mouse-out to ssd
xwl clients will attempt to unset the cursor when mousing out of the surface,
but this can happen after evas events are triggered for the ssd due to
latency

if the given surface has mouse.in set, but the mouse is not inside the surface
area, assume that the mouse has just entered the compositor canvas

 #TheDisappointer
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 5a69750ba9 reset compositor pointer cursor if wl surface destroy is the current cursor
this should never happen and is only included as a failsafe

 #TheDisappointer
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 6616fa2510 Revert "attempt to re-set wl surface pointer when popping back to "default" pointer type"
This reverts commit e42b072f38.

this is broken according to spec, clients should re-set their pointers manually
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz f74862e9ea force mouse-out on wl clients during delete if mouse.in is set
#TheDisappointer
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 239dad4ec9 only unset current pointer cursor object if new one is being set
#TheDisappointer
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 2e7e1f0893 start xwayland process 2.0s after module load
this avoids conflicts with efl internals, which will break entirely
when DISPLAY is set under wayland, and xwayland internals, which will
abort immediately when efl tries to connect to it during its init phase
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz b005919ea9 ref clients during exe_inst deletion to avoid invalid access after free
in the case where clients are deleted during the same loop that they are
added to an exe_inst, the client will be destroyed before the instance's
delete event returns

ref T4963
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 96c2ac0947 add note in doc for "gadget_destroyed" callback re: callback ordering 2017-02-24 14:47:40 -05:00
Carsten Haitzler 60e150aeb8 enlightenment_sys - eina_init BEFORE switching uid - safer
in case eina_init uses env vars, move it to befor setuid() so it can
detect. you normally would setuid only for a limited op and we do it
for "the rest of the running" as e_sys is fairly simple.
2017-02-24 14:47:40 -05:00
Derek Foreman f3e6f98889 Dispatch wayland frame callbacks in the correct order
The protocol says they should be dispatched in the order they're
registered, so switch to list append instead of list prepend.
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz bef7872a01 hide wl client cursors when set_pointer is passed a null surface 2017-02-24 14:47:40 -05:00
Mike Blumenkrantz d257d872dc use 1x1 for unsized (internal) clients
this was a typo
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 526052c5af simplify mouse-out cursor reset for wl clients
this is handled by e_pointer_object_set()
2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 9a3939d35c make e_pointer_object_set() a no-op when passing the existing cursor 2017-02-24 14:47:40 -05:00
Mike Blumenkrantz 02be57e7e5 Revert "re-enable getting and setting output rotations in wl_drm"
This reverts commit 54ecd5e56b.
2017-02-24 14:47:40 -05:00
Simon Lees 5771d4691b
21.6 NEWS Updates 2017-02-15 13:58:54 +10:30
Simon Lees 9c5ae9a47a
21.6 Release 2017-02-15 13:45:22 +10:30
Mike Blumenkrantz 72bfd182d1 add conditional updates for latest efl apis
ref dc2bad0fcd
2017-02-03 15:29:38 -05:00
Derek Foreman 17e66ed2b5 Stop sending wayland motion events when the mouse is grabbed
This stops the compositor from sending motion events to internal
windows while they're being moved or resized.
2017-02-03 10:49:54 -05:00
Carsten Haitzler 0a1733ba9a e dialog - fix unreszable dialogs to not be 1x1
so i see non-resizable dialogs end up 1x1... this fixes that.
2017-02-03 10:49:27 -05:00
Mike Blumenkrantz 1abdbe81b5 reset demo gadget id before deleting gadget object during drop operation
ensure that the gadget is marked as usable so that the config isn't deleted
2017-02-03 10:47:34 -05:00
Chris Michael 54ecd5e56b re-enable getting and setting output rotations in wl_drm
Small patch to re-enable the ability to query and set the rotation of
an output.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-03 10:42:09 -05:00
Carsten Haitzler f4243e1f5d e - wl mode - stop consuming 100 percent cpu
so on 1 intel laptop and my rpi i'm seeing 100% cpu usage in wayland
mode. it seems something is resizing to 0x0 and then causing a size
change which causes a property change which causes... another request
to 0x0 and repeat. dont set tyhe size changed flags if size actually
didnt change and this fixes that.
2017-02-03 10:41:25 -05:00
Mike Blumenkrantz 7608cebd85 handle pixmap_refresh() failure cases more accurately under wayland
non-usable pixmaps here are still valid in some cases, such as when
no buffer is attached
2017-02-03 10:41:10 -05:00
Mike Blumenkrantz 1644a7ec0a ensure that gadget internal del callbacks are handled before other callbacks 2017-02-03 10:41:04 -05:00
Mike Blumenkrantz bc9103ec68 use persistent clipping for comp object input rects
it's technically legal to set an input region larger than a surface,
then later expand the surface and expect that the input region will
also expand
2017-02-03 10:40:31 -05:00
Mike Blumenkrantz f2bfd957a1 do not perform frame coord adjustments for re_manage wayland clients
prevent mismatch of positions between restarts
2017-02-03 10:40:27 -05:00
Mike Blumenkrantz 5ab0d5be88 free configs for demo gadgets on object free
these are purely for demo purposes and should never be retained

I think this is right...
2017-02-03 10:40:05 -05:00
Chris Michael 0ba8bf56c5 Use proper coordinate adjustment
This seems like just some copy/paste that was never corrected, however
when calculating coordinate adjustments we should be using the proper
values here. Previous code was using e_comp_canvas_x_root_adjust for
the Y value. This patch uses e_comp_canvas_y_root_adjust for Y
coordinates.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-03 10:39:41 -05:00
Stephen 'Okra' Houston 0b3d519bd9 Enlightenment: Wireless gadget - place the ctxpopup after the size hints are set, not before 2017-02-03 10:39:07 -05:00
Stephen 'Okra' Houston 79342184b9 Enlightenment: Make gadget editor popup scrollable:
This fixes T5077
2017-02-03 10:38:58 -05:00
Carsten Haitzler 287b5ea0d9 ibar - fix seg with ibar icon task menus are up while desktop files change
segv if u go do make installs that install desktop files causing
efreet to recheck desktop files causing e to reset desktop files
causing ibar to refill icons but this causea a segv if a hover menu of
windows for that icon are up at the same time. this fixes that.

@fix
2017-02-03 10:36:28 -05:00
Carsten Haitzler 3c1bf5cc68 appmenu - make appmenu work with click+release and not hide on focus out
appmenu is annoying in that is hides on focus out whish is what
happens when a menu is popped up! fix this and make a qhick
click+release work as well! if we are going to have a global app menu
then let's make it vaguely decent... :)

also get menu positioning right with item geometry itself for the menu
not pointer position AND get menu pop direction correct based on
gadcon orientation.

@fix
2017-02-03 10:36:01 -05:00
Carsten Haitzler 99ecc6ad3d e bindings - fix warnings about possible use of undefined var 2017-02-03 10:35:03 -05:00
Carsten Haitzler 56789ef809 efm - fix ifs to be ifdef as they should be 2017-02-03 10:34:55 -05:00
Carsten Haitzler 2b5ea65981 efm - warning - change invalid #if toe #ifdef as this is right 2017-02-03 10:33:45 -05:00
Carsten Haitzler fa580ee748 tasks - calculate min width properly given a known height of a gadget
this also should apply to calculating height correctly given a known
width - ie horiz or vert taskbar in a shelf. without this you can't
calc min size correctly from the theme.

@fix
2017-02-03 10:33:35 -05:00
Andreas Metzler b6852b2120 10_typo_restore_LDFLAGS.diff: Fix typo in configure.ac (upstream), causing empty LDFLAGS.
Summary: typo spotted while packaging E 0.21.5 for Debian experimental

Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4507
2017-02-03 10:33:18 -05:00
Mike Blumenkrantz 83f64194ba remove extra SLEEP prints during startup on non-release builds
this was useful for startup profiling, but there are better methods available now

partially reverts 2850c28167
2017-02-03 10:32:46 -05:00
Derek Foreman 4b29b6aff1 Use a monotonic clock for frame callback times 2017-02-03 10:32:17 -05:00
Mike Blumenkrantz 08d96c67de plug iterator leak in e_comp_object_render()
==13307== 96 bytes in 1 blocks are definitely lost in loss record 6,598 of 11,698
==13307==    at 0x4C2DA60: calloc (vg_replace_malloc.c:711)
==13307==    by 0xCECA287: eina_tiler_iterator_new (eina_tiler.c:1299)
==13307==    by 0x46D13D: e_comp_object_render (e_comp_object.c:3966)
==13307==    by 0x46DB42: e_comp_object_dirty (e_comp_object.c:3923)
==13307==    by 0x46017D: _e_comp_client_update (e_comp.c:343)
==13307==    by 0x46017D: _e_comp_cb_update (e_comp.c:400)
==13307==    by 0xB34D4BA: _ecore_job_event_handler (ecore_job.c:98)
==13307==    by 0xB34909C: _ecore_call_handler_cb (ecore_private.h:317)
==13307==    by 0xB34909C: _ecore_event_call (ecore_events.c:518)
==13307==    by 0xB350527: _ecore_main_loop_iterate_internal (ecore_main.c:2359)
==13307==    by 0xB3508A6: ecore_main_loop_begin (ecore_main.c:1287)
==13307==    by 0x43C88A: main (e_main.c:1093)
2017-02-03 10:31:58 -05:00
Derek Foreman 84da1d45c7 Fix wayland frame callback times
ecore_time_unix_get() * 1000 is too big to fit in a uint32, so take the
time we instantiate the wayland pixmap hash and use that as a base.
2017-02-03 10:31:44 -05:00
Mike Blumenkrantz d5aceefc91 correctly set E_POINTER_RESIZE_BR mode for client keyboard resizing
typo from when this was refactored

fix T2452, T2579
2017-02-03 10:31:36 -05:00
Simon Lees caade0432a Merge branch 'enlightenment-0.21' of git+ssh://git.enlightenment.org/core/enlightenment into enlightenment-0.21 2016-12-12 08:00:11 +10:30
Mike Blumenkrantz f6292eb235 null out animator pointers in efx stop() operations 2016-12-08 11:21:21 -05:00
Simon Lees bad8619798
21.5 NEWS Updates 2016-12-08 11:33:33 +10:30
Simon Lees 06d7531019
21.5 Release 2016-12-08 11:22:18 +10:30
Derek Foreman a73d38dfc0 test dmabuf pixmaps properly
If we can't handle a dmabuf format we now properly tell the client instead
of accepting it anyway and falling apart later.
2016-12-07 11:18:28 -05:00
Mike Blumenkrantz 187076a0dd maintain "empty" object's size hints when ibar/ibox resizes
the sizing issue in all of these tickets was caused by the "empty" object
being deleted, thus allowing the box to reset to 0x0 size hints and
returning this value as the overall size during recalc; the result is that
all icons would be sized at 0x0 instead of using the preserved orient size
as expected

fix T4509, T4647, T4830, T4733, T4524
2016-12-07 11:18:25 -05:00
Mike Blumenkrantz b586409543 revert all sizing commits to ibar/ibox for the past year
the assumption that this code was making assumptions about elm_box
internals based on a shallow reading of the code was incorrect, and
the resulting "fix" (and subsequent attempts to bandaid it) has left these
gadgets in an unusable state for the past half year.

disappoint.jpg

this reverts the following commits:

f97f8f61ac
ebfa4a97cd
50030dc693
42aa6be359
504706d45a
b1f608c5e6
b107dc1cdc
3fc195cd9f
2016-12-07 11:18:23 -05:00
Mike Blumenkrantz 923f2e900f use better check for getting wl surface alpha from cursor pixmaps
ref 6ba85cf864
2016-12-07 11:18:17 -05:00
Mike Blumenkrantz 35530a546e fix internal wl windows to exit when border X is clicked 2016-12-07 11:18:03 -05:00
Mike Blumenkrantz 6aba66cee8 attempt to re-set wl surface pointer when popping back to "default" pointer type
this automatically handles the case where enlightenment has commandeered the
cursor temporarily and the active client has not unset+set a new cursor in the
meantime
2016-12-07 11:17:21 -05:00
Mike Blumenkrantz 28160ad450 set wl pointer surfaces to E_LAYER_CLIENT_PRIO during setup
these later get overridden onto the pointer layer, but setting a layer
here ensures that the pointer surface will always be the client
returned by e_client_top_get()
2016-12-07 11:17:09 -05:00
Mike Blumenkrantz 8d7cb8201e do not pop pointer types on client hide events if the client is pass_events
these clients cannot receive events and thus have no pointer to pop
2016-12-07 11:17:03 -05:00
Chris Michael 1942f89bf4 remove unused variables in e_comp_wl
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-07 11:16:26 -05:00
Derek Foreman e1120051d0 Stop sending key up/down events on focus change under wayland
We shouldn't be doing this, but there's a collective memory that
this was put in place to fix stuck modifier bugs.

If we run into stuck modifiers again because of this patch, then we
should be fixing them in a different way.

If anyone bisects to this point, I apologize - assign me a ticket.
2016-12-07 11:15:30 -05:00
Carsten Haitzler 6cd108513b e_util_defer_object_del - ensure order of deferred deletions are right
so since e_util_defer_object_del used a before idler this would
reverse deletion order vs the order submitted. this may cause issues.
not sure. chasing netstar's "animator stops" issue, but if defered
deletion if disabled seems to stop it from happening.

at least fix order if multiple deferred deletions are queued

@fix
2016-12-07 11:15:13 -05:00
Derek Foreman 51b25ecad4 More aggressively prune keyboard focus list
Even if a client is deleted we still need to get its resources off the
keyboard focus list.
2016-12-07 11:15:06 -05:00
Derek Foreman ea3afd11c1 Fix crash when exiting an xdg shell application
The focus in timer has been firing for deleted clients, this causes a
NULL pointer dereference.

Then again, maybe the timer should've been disabled by now...
2016-12-07 11:14:48 -05:00
Derek Foreman e2eec45e3b Fix keyboard tracking when leaving an xdg shell window
_parent_client_contains_pointer() shouldn't return true if there is no
parent client.  This could result in leaving stale resources in the
keyboard focus list and crash the compositor.
2016-12-07 11:14:34 -05:00
Mike Blumenkrantz a61f64f150 use more accurate determination for applying xdg-shell (un)maximize operations
fixes maximizing again
2016-12-07 11:13:11 -05:00
Mike Blumenkrantz 0eb453f39c stack subsurfaces above their parents upon creation
handles the case where no explicit stacking is set on the subsurface
2016-12-07 11:10:33 -05:00
Mike Blumenkrantz 7b7ba99c4d handle xdg-shell maximize/unmaximize calls correctly 2016-12-07 11:10:16 -05:00
Simon Lees 43b9258376
21.4 NEWS Updates 2016-11-29 11:39:15 +10:30
Simon Lees 39e6605bf1
21.4 Release 2016-11-29 11:29:54 +10:30
Al Poole 617ef1887e Add temperature support for DragonFly BSD.
Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4432
2016-11-28 10:59:50 -05:00
Romain Naour 157ab70673 E: fix Wayland without xwayland build
When building enlightement without xwayland, we need to provide
MESA_EGL_NO_X11_HEADERS in the CFLAGS to avoid including X11/Xlib.h.

This define is provided by WAYLAND_EGL_CFLAGS, so add it for E modules
and e_fm build.

Fixes:
In file included from /usr/include/EGL/egl.h:39:0,
                 from ./src/bin/e.h:108,
                 from src/modules/mixer/lib/backends/pulseaudio/pulse.c:1:
/usr/include/EGL/eglplatform.h:119:22: erreur fatale : X11/Xlib.h

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2016-11-28 10:59:49 -05:00
Mike Blumenkrantz 1e85ec4174 prevent divide by zero when calculating gadget aspect sizing 2016-11-28 10:59:48 -05:00
Mike Blumenkrantz e6efe45227 revise internal window session recovery blocking to compile with older efl
this is an important fix which should be active where available

ref 9673df56ee
2016-11-28 10:59:01 -05:00
Mike Blumenkrantz 37eb433a41 make fake mouse-out upon focus-out conditional on pending pointer warp
in the case where warping would not occur and a mouse-based focus policy was
not in use, this would break mouse eventing on wayland when a window lost focus
but the cursor remained inside the window

ref 3e6d6b348f
2016-11-22 11:33:50 -05:00
Mike Blumenkrantz 7c38e4edb4 clarify some wl surface checks to require elm wins
these should not apply to role-less surfaces
2016-11-22 11:33:40 -05:00
Mike Blumenkrantz a95d5ebd40 require an elm win to apply auto-visibility for internal wins in wl surface commit
other internal surfaces could be things like cursors, and these should not be made visible
before setting a role
2016-11-22 11:33:08 -05:00
Mike Blumenkrantz b4a3dc1f88 make confirm dialogs autoselect the confirm option
esc is already used for cancel, having an easier confirm makes sense (tm)
2016-11-18 11:46:37 -05:00
Mike Blumenkrantz 084aeebaa7 reject non-printable characters from lokker entry
previously characters such as tab would be injected into the entry when pressed.
this is the same check which is used in various other places in efl for string
validation
2016-11-18 11:46:35 -05:00
Mike Blumenkrantz 2c7e448fb2 disable bindings during desklock
hopefully nobody noticed this before now...
2016-11-18 11:46:32 -05:00
Chris Michael bd66d3e1bb fix missing definition of DRM_FORMAT_XRGB8888
As we do not compile-time link with libdrm inside Ecore_Drm2 anymore,
we need to include relivant bits of drm_fourcc header here in order to
define DRM_FORMAT_XRGB8888 else we fail to compile Enlightenment Wayland

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-18 11:46:27 -05:00
Carsten Haitzler 117e30310d wizard - do not set scale to 1.2 forcibly. use dpi as the def prof says
the default profiel is configureed to use dpi to scale. if dpi goes up
so does wizard scaling. setitng to 1.2 forcibly is just wrong. imagine
a uhd screen thats 13" or imagine an 8k display... at least if dpi can
be read correctly things work out find. think the base dpi of 90 is
too high - then adjust that in profile... but not in wizard code.

this has been here a while and i always thought this scaling bumping
was a dpi effect. it wasnt. it was hardcoded. bad bad.

@fix.
2016-11-18 11:46:23 -05:00
Mike Blumenkrantz c4339eb273 focus confirmation option in efm delete dialog
fix T4797
2016-11-18 11:46:19 -05:00
Mike Blumenkrantz 1c27386047 only unset cur_mouse_action on client menu delete for the right action
ref 50198ecdde

this still needs improving....
2016-11-18 11:46:14 -05:00
Mike Blumenkrantz 25ae14416c send orientation signal to bryce scroller theme 2016-11-18 11:46:05 -05:00
Mike Blumenkrantz d0419e937c unset cur_mouse_action upon deleting client menu
fix T4522
2016-11-18 11:46:01 -05:00
Mike Blumenkrantz bc5023326e keep bryce starting size unscaled 2016-11-18 11:45:54 -05:00
Mike Blumenkrantz 1acfb78e9b handle e_scale correctly in bryces 2016-11-18 11:45:52 -05:00
Mike Blumenkrantz a0fc71752d unalias internal wl client pixmaps in elm win hide trap callback
this seems to be the best place to remove the alias since it is initially
added in the corresponding show callback
2016-11-18 11:45:40 -05:00
Mike Blumenkrantz 638c3dfbe1 always free wl pixmap buffer list on non-cache image clear
this is only used when the pixmap is freed, after which point accessing
the list guarantees a crash
2016-11-18 11:45:37 -05:00
Mike Blumenkrantz 2108bee616 remove wl client pixmap aliasing on del
not sure why I added this but it was wrong
2016-11-18 11:45:35 -05:00
Mike Blumenkrantz e11aa970d3 unset wl client surface pointer on surface destroy
leaving this around after this point is dangerous and has a high probability
of crashing
2016-11-18 11:45:31 -05:00
Mike Blumenkrantz 8155b456fe reset initial internal wl client states when hiding (but not deleting)
ensure that these windows are not able to be shown again until commits occur
2016-11-18 11:45:24 -05:00
Mike Blumenkrantz 9b17e1079d break out repeated code from _e_place_desk_region_smart_area_calc() into separate function
no functional changes
2016-11-18 11:44:44 -05:00
Mike Blumenkrantz 5972d0369a break out e_place_desk_region_smart() area calcs into separate function
no functional changes
2016-11-18 11:44:41 -05:00
Mike Blumenkrantz 99a9312b52 clamp e_place calcs to zone geometry
fixes some cases where windows would place wrong due to placement code
checking offscreen coords
2016-11-18 11:44:39 -05:00
Mike Blumenkrantz 4c5528a018 use only zone coords when moving bryce to its zone during editing
prevent coords from accidentally resulting in offscreen placement

fix T4826
2016-11-18 11:44:25 -05:00
Mike Blumenkrantz efd0136d22 force bryce repositioning onto target zone during startup
ensure that subsequent operations do not accidentally the bryce's zone

fix T4784
2016-11-18 11:44:21 -05:00
maxerba ffc2706b49 Updating italian translation 2016-11-18 11:43:45 -05:00
Derek Foreman f3282a3748 Stop passing dimensions to _e_comp_wl_surface_state_init
The dimensions we passed were frequently wrong anyway, so let's stop
doing that.
2016-11-18 11:43:36 -05:00
Derek Foreman f856b20db5 Fix wayland opaque regions
Similar set of changes to the recent input region changes.  They may not
have been quite so broken to begin with, but it's probably less confusing
to treat both types of region the same way.
2016-11-18 11:43:31 -05:00
Derek Foreman d95e3a77e8 Fix massive wayland input region brokenness
It was impossible to set an empty input region.

Input regions were being clipped to the size of whatever buffer was
previously attached when they should really be clipped at commit
time to whatever buffer was attached in the commit.

The intersection operation created round off errors and
e_comp_object_input_area_set is clipping anyway, so we can simplify this
and retain precision.
2016-11-18 11:43:29 -05:00
Derek Foreman 805eb55628 Increase area of tilers for regions
We don't have any idea at this point what the region will be used for,
and tilers clip to their area on ingress.  If we're going to use tilers
for wayland regions we need to make them huge and clip them later.
2016-11-18 11:43:21 -05:00
Mike Blumenkrantz b858cf7b73 move bryces to E_LAYER_DESKTOP_TOP when not above windows
moderately sure this won't conflict with anything important...

fix T4819
2016-11-18 11:43:10 -05:00
Mike Blumenkrantz 0bf3a3d365 add special case for returning pixmap argb of unusable wl cursor pixmaps
this is usually called before the surface commits, so ensure that the
most likely case is returned as the default until the commit occurs

fixes black rect flickerings around the cursor
2016-11-18 11:43:06 -05:00
Mike Blumenkrantz 249cbe1d46 add more parens for previous pixmap commit 2016-11-18 11:43:00 -05:00
Mike Blumenkrantz 070eb16a17 avoid crash when calling e_pixmap_image_exists on wl pixmaps without buffers 2016-11-18 11:42:56 -05:00
Mike Blumenkrantz 1cbb0b2152 determine wl pixmap argb solely based on image_argb flag
the existence of a buffer does not mean that the pixmap can stop being
argb

fixes random black rects
2016-11-18 11:42:52 -05:00
Mike Blumenkrantz 9a0965ff02 return correct values from bryce post event callbacks
I referenced elm scrollable for this when writing it. past me was a moron
for using reference code instead of reading the underlying implementation.

fixes scrolling
2016-11-18 11:42:48 -05:00
Carsten Haitzler a27a03a989 cpufreq - move cpuinfo polling into thread to not block mainloop ever
on some devices asking the cpu for info like current frequency,
governors etc. seems to be expensive and if done in the mainloop can
block for multiple ms causing framerate hiccups, so move it to a
thread...
2016-11-18 11:42:38 -05:00
Mike Blumenkrantz ad1b8f224f force gadget site recalc from style object if gadget's hints change
ensure that these intermediate objects trigger recalcs as expected

fix T4809
2016-11-18 11:40:42 -05:00
Mike Blumenkrantz ef2112c7db feed mouse-up when dropping a gadget site before enabling events on the site
prevents unintentional activation of gadget actions during moves
2016-11-18 11:36:58 -05:00
Mike Blumenkrantz 6ec652a4ff add bool return for e_exec_phony_del() to return deletion success
CID 1181927
2016-11-18 11:36:46 -05:00
Al Poole c6a8a52c0d efm - fix popup if file is a fifo
this fixes T4815

@fix
2016-11-18 11:36:39 -05:00
Stephen okra Houston e0699c0640 Time Gadget: Change the calendar month on mouse wheel. 2016-11-18 11:36:23 -05:00
Mike Blumenkrantz b3db41fad7 do not return early from _bryce_position()
this causes the returned coords to be garbage values, likely leading to
the bryce being positioned or animating off to the upper-right corner
of the universe that exists beyond the canvas
2016-11-18 11:36:07 -05:00
Mike Blumenkrantz cb2ab91ea5 do not apply efx anchoring to move effects if a resize effect is not active
this is useless without an animator

fix T4810
2016-11-18 11:35:36 -05:00
Chris Michael d7527eb7a2 check if a client is internal or not before deleting
This fixes a crash where mousing back into internal windows would
cause a crash (from efl wayland mouse pointers).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-18 11:34:00 -05:00
Mike Blumenkrantz 1205dff03c attempt to recalc gadgets which overflow their container 2016-11-18 11:33:49 -05:00
Mike Blumenkrantz 8bd05d204c allow scaling gadgets using wheel events during initial placement 2016-11-18 11:33:37 -05:00
Mike Blumenkrantz be19203607 attempt to handle non-orient gadget resizes based on anchor corners 2016-11-18 11:33:31 -05:00
Mike Blumenkrantz 424c50077c center desktop gadget editor popups upon the zone they have activated 2016-11-18 11:33:18 -05:00
Mike Blumenkrantz ef7ac18322 do not modify bryce zone/name during startup
this breaks bryce init by moving all bryces to zone 0

fix T4784
2016-11-18 11:33:13 -05:00
Mike Blumenkrantz 3b6c033978 avoid potential divide by zero during bryce startup 2016-11-18 11:33:09 -05:00
Mike Blumenkrantz e0200dbd6a clamp bryce position to its parent zone
fixes case where large bryces could overflow their zones

ref T4784
2016-11-18 11:33:05 -05:00
Stefan Schmidt a35dc213c1 e_fm: remove unused variable 2016-11-18 11:32:37 -05:00
Stefan Schmidt 47fe43db82 e_fm: fix last commit to compile again with clang
Commit fd8d41a2a6 introduced a void return in a
non void function. On gcc this only produced a warnigns but it was a hard
error on clang and should be fixed.

00:25:24.906 src/bin/e_fm.c:1523:15: error: non-void function 'e_fm2_icon_file_get' should return a
value [-Wreturn-type]
00:25:24.950    if (!file) return;
2016-11-18 11:31:57 -05:00
Carsten Haitzler e8db328e99 e fm - fix popup to not crash by referring to possibly deleted data
fm icon info is transient because fm icons are transient. files may
get deleted, added or removed on the fly. keeping icon info around for
things like the popup is asking for tyrouble and does create  trouble.

so look it up each time based on filename string. safe!

this fixes T4716 and fixes T4798 (they are the same bug basically).
2016-11-18 11:31:52 -05:00
Mike Blumenkrantz 3b717abf2f fix use after free when renaming a bryce
fix T4784
2016-11-18 11:31:46 -05:00
Mike Blumenkrantz e7d5c0aa89 use eina_streq for string comparison in e_zone_for_id_get()
zone->randr2_id is not guaranteed to be non-null

crash--
2016-11-18 11:31:34 -05:00
Mike Blumenkrantz 64870691bf block remembers of e_sys windows
fix T2879
2016-11-18 11:31:27 -05:00
Mike Blumenkrantz 0513a56bc5 optimize out re-applying of borderless client theme 2016-11-18 11:31:22 -05:00
Mike Blumenkrantz e313c3fe13 allow client frame changes when switching from frame -> no frame
fix T4358
2016-11-18 11:31:18 -05:00
Marcel Hollerbach 534bdc32f6 mixer: do not set back the value from emix once the drag is finished
emix can still have wrong values from pa, and thus the value will jump
back and later come back to the right pos:

Here a video of what is happening:
http://omicron.homeip.net/filedump/mixer_gadget_bug.ogv

Thank you morluxus!
2016-11-18 11:31:09 -05:00
Michaël Bouchaud (yoz) 6390c982ab Revert "mixer: lock up the slider for the case a drag is in progress"
This reverts commit eed35d3c4f.

This is a bad workaround, I have fixed the issue so we don't need it
anymore.
2016-11-18 11:31:08 -05:00
Michaël Bouchaud (yoz) b4fbbbedf5 mixer: fix the volume conversion calc into pulseaudio backend
a get and a set don't give the same result

@fix
2016-11-18 11:30:33 -05:00
Mike Blumenkrantz 4bec06d4ac calc new gadget size based on ratio of size:target site size
no use case for this yet...
2016-11-18 11:28:39 -05:00
Mike Blumenkrantz 911555d932 copy gadget position from pointer gadget -> drop gadget when executing drop
fixes desync which would cause gadgets to move offscreen
2016-11-18 11:28:34 -05:00
Mike Blumenkrantz e258defd57 force gadget site recalc on gadget object creation to ensure sizing
fixes initial sizing for no-orient gadget sites
2016-11-18 11:28:31 -05:00
Mike Blumenkrantz 3af4bf4db2 handle no-orient gadget visibility based on site->events visibility 2016-11-18 11:28:22 -05:00
Mike Blumenkrantz c85de6f35b force recalc on bryce scroller when doing recalc on gadget site
should have no functional change
2016-11-18 11:28:19 -05:00
Mike Blumenkrantz 60fedb8613 add workarounds for ctxpopup geometry for use in input shape tiling
ref T4687
2016-11-18 11:28:08 -05:00
Derek Foreman ed8d373032 Remove EVAS_CALLBACK_HIDE on shelf when freeing
Prevents a use after free when an evas callback fires later.
2016-11-18 11:28:01 -05:00
Derek Foreman 9673df56ee Block session recovery for internal windows 2016-11-18 11:27:55 -05:00
Mike Blumenkrantz 6623fef580 force min size on wireless popup during show
box+list inside a ctxpopup may result in an unreliable min size at the time
of show, so force the size wanted at this time in order to avoid positioning
errors
2016-11-18 11:27:42 -05:00
Joshua McBeth 1fbc727146 add dbus message 'org.enlightenment.wm.Window.SendToDesktop'
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-11-18 11:27:30 -05:00
Mike Blumenkrantz 89e4882613 trigger zone geometry events when updating zone/desk obstacles 2016-11-18 11:27:19 -05:00
Mike Blumenkrantz ad62c1a549 reject successive zone_geometry_dirty() calls
no point in thrashing the compositor if events are already pending
2016-11-18 11:27:12 -05:00
Mike Blumenkrantz a6661d050c correctly handle applying of non-SR remember in remember config
fix T4512
2016-11-18 11:27:11 -05:00
Mike Blumenkrantz fd5ef0259f apply non-session recovery remember to client when creating recovery remember
ensure that the attributes get applied before engaging SR mode

ref T4512
2016-11-18 11:27:10 -05:00
Mike Blumenkrantz 513b095a32 only find the session recovery remember if ec->remember is not it
ref T4512
2016-11-18 11:26:00 -05:00
Mike Blumenkrantz 9931658f7f loop bryce autosize recalc when gadget site has not yet calculated its size
fixes moving of autosizing bryces
2016-11-18 11:25:57 -05:00
Mike Blumenkrantz e86e532dcd rename bryces when changing anchors 2016-11-18 11:25:50 -05:00
Alexander Pyhalov 1b7468bc9b actually check if PIE is supported for SUID
fix T4479
2016-11-18 11:25:46 -05:00
Mike Blumenkrantz 0dfc809b83 add gadget site sizing workaround to avoid elm box sizing desync
ref T4747

fix T4732
2016-11-18 11:25:40 -05:00
Mike Blumenkrantz c56b14538b avoid extra recalc when resizing a bryce on its oriented axis 2016-11-18 11:25:31 -05:00
Mike Blumenkrantz 1dd82a4cc7 set ON_HOLD flag more accurately when activating gadget actions
fixes handling of actions which have same binding as gadget site's container bindings
2016-11-18 11:25:25 -05:00
Mike Blumenkrantz 951edff8c6 fix bryce upgrade path from 0 -> 2 re:naming 2016-11-18 11:25:13 -05:00
Mike Blumenkrantz 6396055260 trigger bryce menus from right click if event has not been consumed 2016-11-18 11:25:10 -05:00
Mike Blumenkrantz 95696c6d7d remove unused attribute from used param 2016-11-18 11:25:07 -05:00
Mike Blumenkrantz 3ca3740f52 set ON_HOLD flag when triggering gadget mouse buttion actions
allow detection that this event is being consumed
2016-11-18 11:24:51 -05:00
Mike Blumenkrantz ef4cc47e11 handle gadget_popup smart callback on gadget's display object
fixes case where this signal was not accurately propagated

ref T4732
2016-11-18 11:24:24 -05:00
Mike Blumenkrantz 21c8af0c34 call gadget_popup smart callback when configuring gadgets
ensure visibility changes are received by containers

ref T4732
2016-11-18 11:24:10 -05:00
Mike Blumenkrantz efdeef7cc5 add gadget_site_(un)locked smart callbacks for forcing gadget site visibility
useful for cases where the gadget site has no popups to manage but visibility must
be maintained

ref T4732
2016-11-18 11:24:06 -05:00
Mike Blumenkrantz 1dfe41b392 force bryce visibility during editor activity
ref T4732
2016-11-18 11:23:50 -05:00
Mike Blumenkrantz d455f50210 add new flag for zone edge objects to allow shape cutting while repeating events
fixes case where edge binding would (possibly) trigger but then not allow input
to any canvas objects at the screen edge
2016-11-18 11:23:43 -05:00
Mike Blumenkrantz 7a54c3d0a7 also do full bryce rename when moving between zones 2016-11-18 11:23:31 -05:00
Mike Blumenkrantz 583b57470c further improve bryce portability across zones
also fix typo from yesterday which broke everything and was definitely not
noticed by anyone
2016-11-18 11:23:27 -05:00
Mike Blumenkrantz 66b31d30d8 do not check for shelf/bryce existence in opposing anchorages during bryce wizard
fixes false positives when detecting positions
2016-11-18 11:23:24 -05:00
Mike Blumenkrantz 8add85a636 add zone number to bryce names
fixes usage of bryces in identical setups on different zones
2016-11-18 11:23:21 -05:00
Mike Blumenkrantz 15a23bdd75 fix bryce check for shelf existence on orientation/anchor to break when expected
restores missing anchor points when adding/moving bryces
2016-11-18 11:23:16 -05:00
Mike Blumenkrantz ef57cd1559 add EINTERN function for renaming gadget sites 2016-11-18 11:21:10 -05:00
Mike Blumenkrantz ad15b38907 enforce bryce resizing when orientation changes
screens are not square, so this would never have worked
2016-11-18 11:20:57 -05:00
Marcel Hollerbach 4ee0a87d7b The potfile has changed,
so update the other translations
2016-11-18 11:20:47 -05:00
Marcel Hollerbach eb1b1b4056 update german translation
A few modules are now completly translated:

- The wizard

- Screensettings

- Mixer

- Packagemanager

- Calender
2016-11-18 11:20:33 -05:00
Marcel Hollerbach bed6054552 mixer: we changed that name when we merged the mixer in 2016-11-18 11:20:25 -05:00
Marcel Hollerbach fbaca5b307 wizard: make page 065 translatable
we should use here the translation for plural or singular, everything
else makes it hard to translate

This commit also adds the file to POTFILES so it gets recognized by the
pot file
2016-11-18 11:20:17 -05:00
Simon Lees bb6beca850
21.3 NEWS Updates 2016-10-07 16:40:03 +10:30
Simon Lees 0486176cf6
21.3 Release 2016-10-07 16:17:04 +10:30
Mike Blumenkrantz 194f31c27a force zone useful geometry recalc on desk flip if prev/next desk has obstacles
ensure that this gets calculated accurately any time it's applicable
2016-10-04 09:37:17 -04:00
Mike Blumenkrantz b79996c08e handle "unmaximize" smart callback differently depending on fullscreen state
this is a bit hacky, but it seems to provide accurate results to fix more maximize bugs

ref c29157189f
2016-10-04 09:37:17 -04:00
Carsten Haitzler 8e16b5bcfc explicitly use eina list types passing into EINA_LIST_FREE() 2016-10-04 09:37:17 -04:00
Mike Blumenkrantz a2e870870d clamp gadget util ctxpopups to E_LAYER_POPUP at the lowest
avoid having these be obscured by windows when the gadget is on a lower layer
2016-10-04 09:37:17 -04:00
Mike Blumenkrantz a182619fd3 print object type in shape debug if name does not exist 2016-10-04 09:37:17 -04:00
Mike Blumenkrantz ed3d1e70f2 force shape queue when gadget util ctxpopups change visibility
fixes some input region issues in x11
2016-10-04 09:37:16 -04:00
Mike Blumenkrantz 2ef318db8b do not show wireless gadget popups if desklock is active
this gadget may be allowed on lockscreen, but configuration should be disabled
2016-10-04 09:37:16 -04:00
Mike Blumenkrantz ed14a32590 remove (wrong) setting of layer for time's clock gadget popup
e_gadget_util_ctxpopup_place() already handles this correctly
2016-10-04 09:37:16 -04:00
Mike Blumenkrantz 07ceb2b92e add e_util_open(), unify all callers of enlightenment_open
ref adbba1042b
2016-10-04 09:37:16 -04:00
Mike Blumenkrantz 696974b6db do not consume key events in comp autoclose key callback if desklock is active
fix T4655
2016-10-04 09:37:16 -04:00
Carsten Haitzler 4c1a00fc2f po - upate 2016-10-04 09:37:16 -04:00
Carsten Haitzler c27e6ee3d4 e exec - fix exec of enlightenment_open to use actual e prefix
so this code path was using the COMPILED IN prefix like broken
old-school unix apps that cannopt be relocated. efl and e have runtime
prefix detection so use it properly. stop doing things the broken way
just because people have written broken code for 30+ years and
continue to. we don't do that in e/efl land.

@fix
2016-10-04 09:37:15 -04:00
Derek Foreman 1609b45411 Add myself to the AUTHORS file
#glorious
2016-10-04 09:37:15 -04:00
Derek Foreman 271b361464 NULL out xwayland fd handlers after deleting them
This fixes a valgrind error that can happen when we accidentally
free these again later because they still had non-NULL values.
2016-10-04 09:37:15 -04:00
Derek Foreman fd78d05100 Don't kill self during shutdown
When Xwayland is running we end up with a client with the same pid
as the compositor in the client list.  We need to avoid killing that
client, as it will interrupt the proper shutdown procedure.

fix T4439
2016-10-04 09:37:15 -04:00
maxerba c60d52a261 Updating slovenian translation 2016-10-04 09:37:15 -04:00
Derek Foreman c82d54a19a Fix xwayland binary location detection
We were trying to find it with pkg-config and failing, try
AC_PATH_PROG instead
2016-10-04 09:37:15 -04:00
Chris Michael 452ff6fe76 Update wayland readme file
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-04 09:37:15 -04:00
Mike Blumenkrantz a4a5b462f1 remove extraneous recalc trigger when deleting a gadget
CID 1362898
2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 34d94929f8 do not update bryce layer when restacking to a higher layer than CLIENT_ABOVE 2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 88f9f23ef1 always delete gadget's display object and ensure gadget object is null
fixes some object errors during container deletion
2016-10-04 09:37:15 -04:00
Cedric BAIL 8e90c421a3 fix text preview to use eina_strbuf_append_length that doesn't call strlen and crash. 2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 473e77d016 force bgpreview widget to resize after a wallpaper update
ref be1b11ca28

fix T4632
2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 3416640ca5 add gadget doc note for gadget_destroyed callback re:object lifetimes 2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 1f12bdf6b9 always use largest available size for free-oriented gadgets
ensure that gadgets don't unexpectedly clamp to minimum size
2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 520927f7e0 add backspace/delete for clearing all lockscreen gadgets
this was turning into a total wasteland
2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 552d0550d3 check visibility of gadget site 'events' member to determine drop availability
the layout object of a gadget site does not need to be visible since it may be
used for desktop gadgets or a transparent overlay
2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 33a396e74d adjust gadget drop coords for pointer offset
gadgets are centered on the pointer when moved, so the drop coord needs to
then be uncentered to avoid unintended movement
2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 5211b4637a attempt to retain gadget size when executing move operations 2016-10-04 09:37:15 -04:00
Mike Blumenkrantz 69afd70c82 force smart calc on gadget sites at key points during move operations
ensure that gadget info and visuals match up
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz ef5ba9f35e add separate codepath for handling layout of moving gadgets
these get sized and positioned in a passthrough manner, so avoid doing any calc
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz 30b07c6558 set gadget added flag any time a gadget is created or wizarded
ensure that desktop gadget editor doesn't exit when attempting to add
subsequent gadgets
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz 3ef09d6cc8 use same layer in bryce editor for "above window" setting 2016-10-04 09:37:14 -04:00
Mike Blumenkrantz b0c78ef37d clamp bryces to a lower canvas layer
note to self: if you remember why you had these at POPUP, annotate the reason
here...
2016-10-04 09:37:14 -04:00
YeongJong Lee 1214d62a0f fix korean translation mismatch
Summary:
other 'edge' is translated into '가장자리'.
but this one is translated into '테두리'

Test Plan:
Open Settings Panel - Input - Edge Bindings - Add
Select Left Edge

Reviewers: zmike!, Hermet

Reviewed By: Hermet

Subscribers: cedric, conr2d

Differential Revision: https://phab.enlightenment.org/D4297
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz 3b2a1fa456 always use compositor object stacking when performing internal drags
attempting to use a client window for any internal drag operation will always
yield wrong results and broken behavior

ref 1a982fd72a
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz 590a20fdd9 handle e_comp deref during e_dnd shutdown to avoid crash 2016-10-04 09:37:14 -04:00
Mike Blumenkrantz ade27e168a use comp canvas win by default for any drop handler with an E_Object
this is always going to be the case anyway
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz 47059d3a67 move 'unmaximize' smart callback to after geom calc in client_unmaximize
fixes some cases where geometry wouldn't be accurately calculated, such as when
fullscreening a flash video in a browser
2016-10-04 09:37:14 -04:00
Marcel Hollerbach ca238d0a56 mixer: lock up the slider for the case a drag is in progress
if you click on the slider in the gadget the slider jumps a back to the
old volume and then to the new volume, this is because a pulseaudio
update is sent while the last changed event was called, but not the
drag_stop callback.
2016-10-04 09:37:14 -04:00
Derek Foreman 98d204ede7 Fix error print when wl_wl fails to start
Probably copypastad from wl_drm, very confusing.
2016-10-04 09:37:14 -04:00
Simon Lees (SUSE) d4655bed9d More mailmapping 2016-10-04 09:37:14 -04:00
Simon Lees (SUSE) 48856d56e4 I should probably be in the Authors list 2016-10-04 09:37:14 -04:00
Simon Lees (SUSE) 4a638c8643 Also set QT_STYLE_OVERRIDE
Qt 5.7 has introduced an extra enviornment var for getting Qt/KDE
apps to follow gtk theming so we will export that alongside the
one that we already support.

Thanks to AJSlye for finding reporting and figuring this out.
2016-10-04 09:37:14 -04:00
Marcel Hollerbach a2f4be720e ibar: multiply size with scale
This fixes T4544.
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz 35d55dfa81 add docs for E_Comp struct members 2016-10-04 09:37:14 -04:00
Mike Blumenkrantz 9025732d39 do not attempt to populate gadgets during type_add if site has not yet been populated
mostly just fixes some ERRs on init
2016-10-04 09:37:14 -04:00
Mike Blumenkrantz e6361685cf add event handler for evry event type, not #define value
fix T4007
2016-10-04 09:37:14 -04:00
Chris Michael 96d12641cb add missing EINA_UNUSED for function parameter
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-04 09:37:14 -04:00
Chris Michael 874ab12b69 Remove unused variables from ibar_resize_handle function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-04 09:37:14 -04:00
Marcel Hollerbach d3af359c0f mixer: introduce emix_max_volume_get
This lets the module decide what its maximum value is.
Everything over 100% is considered overloading. And is protected by the
mixer and the gadget.
2016-10-04 09:37:14 -04:00
Marcel Hollerbach 0f3bac53a5 mixer: introduce Barrier checks
in this barrier checks the module checks that the user is explicit going
over the value of 100%
2016-10-04 09:37:13 -04:00
Marcel Hollerbach 1e44f4d26b tiling: be more accurate on the description
As user reported, this could be a bit missleading.

fixes T4499
2016-10-04 09:37:13 -04:00
Marcel Hollerbach f574ccaa17 tiling: place popup on the current active zone
Otherwise the popup will be where you are not looking at.

This patch adds a new function to e_comp_object where you can pass the
zone where you want to place the e_comp_object on.

ref T4499
2016-10-04 09:37:13 -04:00
Flavio Ceolin 6d23aa2461 emix: when in alsa mode only operate on master 2016-10-04 09:37:13 -04:00
Marcel Hollerbach 644a53bce8 ibar: try to get a better min size
There are two cases, on a shelf and on the desktop.
If on a shelf we are using the height setting of the self, since max.w
max.h are only set after a few calcuations, and the gadget does not get
moved on a shelf which does not fade out, so the first min size
calculation must be correct.
If we are on the desktop max.w and max.h are not always 0.
There were some cases when none of this conditions are met. So this
patch enforces a mimum size of 40x40 pixels.
2016-10-04 09:37:13 -04:00
Carsten Haitzler fda12404cc update e po files 2016-10-04 09:37:13 -04:00
Derek Foreman 3964eae17d Don't send keyboard leave events to unfocused clients
This fixes a problem when focus moves between two xwayland clients.

My testing of gtk applications shows no regressions, bug if xdg_shell
popups start behaving oddly again, look here first.
2016-10-04 09:37:12 -04:00
Mike Blumenkrantz 8647f87199 ignore xwl clients when flagging wl surfaces as internal
fix T4430
2016-10-04 09:37:12 -04:00
Mike Blumenkrantz 0ab755fe81 another case of stringshare misuse re:efreet_mime_type_get()
ref 1cb47b1411
2016-10-04 09:37:12 -04:00
Mike Blumenkrantz 20de9d844b use stringshare_add() for evry files plugin mime types
the return of this function is not guaranteed to be stringshared
2016-10-04 09:37:12 -04:00
Romain Naour 6a33b79f72 e_xkb: add guard around skip_new_keyboard
skip_new_keyboard is not available if HAVE_WAYLAND_ONLY is defined.

Fixes:
src/bin/e_xkb.c: Dans la fonction ‘_e_x_xkb_reconfig’:
src/bin/e_xkb.c:216:4: erreur : ‘skip_new_keyboard’ undeclared (first use in this function)
    skip_new_keyboard ++;

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2016-10-04 09:37:12 -04:00
Romain Naour e66ef6bb5a configure.ac: wayland only build fix
When only wayland is enabled, the build system is still looking for
ecore-x. When the following test is always true since have_wayland_only
has been initialed to "no".

if test "x${have_wayland_only}" != "xyes"; then
  PKG_CHECK_MODULES([ECORE_X], [ecore-x >= ${efl_version}])

Use e_cv_want_wayland_only instead.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2016-10-04 09:37:12 -04:00
Simon Lees 4000ac4e40
21.2 NEWS Updates 2016-08-21 16:40:05 +09:30
Simon Lees 06f7fd2b89
21.2 Release 2016-08-21 16:39:44 +09:30
Mike Blumenkrantz ec196f28e0 delete previous wireless popup when activating editor from connection list
fixes case where newly-created popup would be deleted upon show, breaking
interactions
2016-08-19 18:51:25 -04:00
Mike Blumenkrantz 16ae527c40 clean up some string leaks in wireless gadget popups 2016-08-19 18:51:23 -04:00
Mike Blumenkrantz 8140f8092c track current bryce geom, force recalc on gadget site upon change
elm scroller is very resistant to recalc, so it's necessary to trigger it
manually by resizing the scroller's contents

fix T4339
2016-08-19 18:51:22 -04:00
Mike Blumenkrantz bf35817287 Revert "track/manage size hints for zoomap child objects"
This reverts commit 7b07b03c21.

this seems to have been solving a problem in the wrong way and created
map issues in some corner cases

ref T4339
2016-08-19 18:51:20 -04:00
Simon Lees fc24049847 README.wayland --enable-elput is required for building wayland efl 2016-08-19 18:51:18 -04:00
Carsten Haitzler 860802f5d3 e ipc - fix cleanup of ipc socket on shutdown
e never deleted its ipc dir or socket on shutdown. kind of bad. that
means every e rstart meant a new socket dir and file. a bit of a leak
when this happens to be often in a ramdisk. this should fix that and
have the socket dir and content nicely shut down on a clean shutdown

@fix
2016-08-19 18:51:16 -04:00
maxerba 8767834cc6 Updating italian translation 2016-08-18 14:52:07 +02:00
JengHyun Kang dce955a123 e_comp_wl: break from meaningless loop
Summary:
kbd.keys are only added from e_comp_wl_key_down().
         And in that function, duplicated keys are not add in the list.
         So only one key is going to be in the list.

Test Plan: Watch kbd.keys list during key press / release.

Reviewers: raster, devilhorns, zmike!, ManMower

Reviewed By: ManMower

Subscribers: duna.oh, input.hacker, cedric

Differential Revision: https://phab.enlightenment.org/D4230
2016-08-17 10:23:08 -04:00
Mike Blumenkrantz 92ef626aae bump efl wayland req to 1.18 now that it's out 2016-08-17 07:31:38 -04:00
Mike Blumenkrantz 057a1c2556 add xwayland compat for efl 1.19+ 2016-08-17 07:31:38 -04:00
Mike Blumenkrantz 0653cff5f0 clear wl subsurface data during delete only if subsurface is not also deleted
fix T4297
2016-08-17 07:31:38 -04:00
Romain Naour c20a32b8b8 E: include uuid.h only when Wayland support is enabled.
libuuid is checked only when Wayland support is enabled and
uuid_t uuid is guarded by HAVE_WAYLAND.

So move include uuid.h below a HAVE_WAYLAND.

Signed-off-by: Romain Naour <romain.naour@gmail.com>

fix T4298
2016-08-17 07:31:38 -04:00
Mike Blumenkrantz 95d193b515 move new version of e_comp_top_window_at_xy_get() to dnd, restore old version
this resolves pointer-based focus issues introduced while attempting to
fix dnd-related bugs

ref a4a2f6b09e
ref 1a982fd72a
2016-08-17 07:31:38 -04:00
Mike Blumenkrantz ec5cb806d9 improve quickaccess relaunch help dialog text
fix T4216
2016-08-17 07:31:38 -04:00
Marcel Hollerbach bd5c107e46 xwayland: show the dialog after ecore_wl2 is in sync
otherwise ecore_wl2 could produce crashes.
2016-08-17 07:31:38 -04:00
Marcel Hollerbach ae47f0bbb2 e_dnd: move the ungrab to the object free
otherwise there are cases where the ungrabbing is not executing, and
blocking input.
2016-08-17 07:31:38 -04:00
Stefan Schmidt 09ba7db93c mailmap: sync updated file from efl repo 2016-08-17 07:31:38 -04:00
Marcel Hollerbach a63193a9e7 e_alert: define EFL_BETA_API_SUPPORT before any include
otherwise we can include half efl without api and the other parts with
beta api support, which leads to problems.

The current problem was that Eo.h was first included without the
EFL_BETA_API_SUPPORT, in Evas.h EFL_BETA_API_SUPPORT is defined, so the
header expects Eo_Callback_Priority to be defined.

@fix
2016-08-17 07:31:38 -04:00
Marcel Hollerbach 15eb6afa16 e_comp_wl: destroy e_drag when source disappears
Otherwise we are expecting a running dnd later, and accessing invalid
memory.
2016-08-17 07:31:38 -04:00
Carsten Haitzler 8a92d4b538 e comp - set alpha after setting native surface to avoid random crash
i noticed a crash on texture update with a previous garbage image data
ptr set before becoming a native suttface and so setting alpha would
cause a texture upload from a garbage pointer, so set native surface
then set alpha on or off so the data ptr is no longer used.

@fix
2016-08-17 07:31:38 -04:00
Mike Blumenkrantz 0eaca149c0 only check x11 configurerequest geometry changes when applicable
in some cases during a frame recalc this could lead to window positioning
being erroneously changed

fix T4097
2016-08-17 07:31:38 -04:00
Derek Foreman 0af35c2470 Fix wayland extension global creation
The globals are singletons, but the bindings are per wl_client.
2016-08-17 07:31:37 -04:00
Jean-Philippe Andre 00886ff0e4 bg: Fix bg with single jpeg images (no edj)
When selecting a jpeg file directly as wallpaper, it will look
very blurry, clearly loaded as a low-resolution image and then
scaled up. Solution: don't load at size 64x64!

For @OnlyHuman, thanks for the report.

@fix
2016-08-17 07:31:37 -04:00
Chris Michael db2f82185d add key_up and key_down methods to sreen interface
This patch adds new methods to the screen interface that we can use
inside wl_drm to determine if a key event is eaten or not. This fixes
an issue where VT-Switching would not work if an application was on
the screen (E-Wayland).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-17 07:31:37 -04:00
maxerba dd5b1744c7 Updating italian and spanish translations 2016-08-17 07:31:37 -04:00
Chris Michael 1087516f39 wl_fb: Check that e_comp_wl_init does not fail.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-17 07:31:37 -04:00
Chris Michael 3d94fefd57 remove need to create different dialog windows under wayland
NB: This hack is no longer needed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-17 07:31:37 -04:00
Chris Michael df40bef557 e ibar - fix "old man" fat finger typo ;)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-17 07:31:37 -04:00
Carsten Haitzler dc608ede51 e ibar - fix devilhorns fix to use the right widght and hight for separator 2016-08-17 07:31:37 -04:00
Chris Michael 15de3e6ac8 use proper variables to set size_hint_max on ibar
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-17 07:31:37 -04:00
Chris Michael a0f411a772 remove unused variables from _ibar_resize_handle
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-17 07:31:37 -04:00
Chidambar Zinnoury e66f0e5634 e fm: Don’t check every other line whether the location is writable when creating menu. 2016-08-17 07:31:37 -04:00
Chidambar Zinnoury 595e527a9a e fm: Add a separator only if there is something before.
Currently, the context menu will show a separator before the background and overlay items even if there is nothing before, such as on the favourites pane.

 @fix
2016-08-17 07:31:37 -04:00
Chidambar Zinnoury bef0bafda6 e: Don’t show two consecutive menu separators if there is no need in client menu.
This would happen if we don’t show some stacking settings.

 @fix
2016-08-17 07:31:37 -04:00
Derek Foreman 18cef43716 Fix wayland clients not deleting when they're hidden
We kept an extra reference for wayland clients and dropped it on their final
render to stop crashes.  However, if they're not on screen at the time of
their deletion this reference still needed to be dropped.

Fixes clients remaining on the deskmirror after dying on another desktop.
2016-08-17 07:31:37 -04:00
Carsten Haitzler 70c8fa7ae1 e temp module - kill tempget process not terminate to ensure death
it seems on openbsd sigterm doesnt kill things... sigkill does so move
to that. fixes T4121

@fix
2016-08-17 07:31:36 -04:00
Chris Michael 27917c26df Revert "e - fix major memory bloat when in gl mode - dont create shm segments"
This reverts commit ae6e09ec11.

This breaks resizing of windows inside Enlightenment. Evas_Engines
don't bind a pixmap permanently, they just bind during each render, so
on resize this caused a broken pixmap if we don't create a new one for
each size. This patch Would be correct IF engines worked differently
wrt x pixmap binding during render.
2016-07-26 10:51:44 -04:00
Carsten Haitzler a9d73c89ed e - fix major memory bloat when in gl mode - dont create shm segments
so e pixmap was ALWAYS creating an ecore_x_image EVERY time for EVERY
window. this means allocate all the sysv shared memory segments for
every window even if never used. this is bad. it litters systems
with unused shared memory segments (ipcs and see) and eats up shared
mem limits/quotas too. we just don't need them in gl unless a window
is shaped or texture from pixmap is off. so allocate the pixmap on
demand, and otherwise leave the ecore x image NULL. this fixes this
bloat.

@fix
2016-07-26 13:31:19 +09:00
Carsten Haitzler 6aa3de0425 e ibar/ibox port to elm box - fix assumption on resize
so... when ibar/ibox were ported to elm box they assumed elm box would
resize itself. this was wrong as it only should have set min size
hints. this has been fixed by 96fbea9daecf7040ac63203c4823722fa6d5d73f
and this addresses T3031. this requires we fix enlightenment too.

@fix
2016-07-25 19:21:25 +09:00
Carsten Haitzler bd3fb818ba e - fix dnd problems coming from getting top object in comp canvas
so getting top object was broken. it didnt account for repeat event
objects that would be included. so get the full l,ist and walk them
top to bottom for the first one thats a client. THAT is the correct
thing to do. this would affect both x11 and wayland.

@fix
2016-07-21 17:24:39 +09:00
Simon Lees 8d7358a66f
21.1 NEWS Updates 2016-07-20 11:09:13 +09:30
Simon Lees 477395859f
21.1 Release 2016-07-20 10:41:07 +09:30
Mike Blumenkrantz 4ca5f3f420 adjust xdg-shell window menu coords by client's coords
the coords passed in this method are relative to the window geometry
2016-07-19 14:19:09 -04:00
Chris Michael 858800389e add missing EINA_UNUSED for unused function params
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-19 14:19:09 -04:00
Mike Blumenkrantz e561a31fec set/unset smart parent as e_widget when adding sub-objects
in the case where there is no smart parent, this fixes the object tree
and resolves some stacking issues. if there is a parent or a parent is added
later, nothing is changed

fixes eg. screenshot preview visibility in wayland
2016-07-19 14:19:09 -04:00
Cedric Bail 22ebf5caaa filepreview: avoid race condition when destroying txt file preview with slow hard drive.
@fix T4119
2016-07-19 14:19:09 -04:00
Carsten Haitzler 8312f98f83 e ibar/ibox fix starrting/started signal emittion
i found this didn't emit signals correctly and multiple times when not
needed. this fixes that.

@fix
2016-07-18 15:52:33 +09:00
Al Poole 8377cf2d5d fwin: prevent segv when the vaarg abi messup with unused parameter.
Quite a hack overall, but if you don't need those parameter, just put
nothing and it will work.

@fix T4112

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-07-16 07:16:21 -04:00
Derek Foreman 4edf4476df Fix xdg_shell focus logic
Moves and resizes tripped up the new xdg focus logic, so test if the
focus is leaving the client entirely before trying to determine if it's
leaving into a parent surface.
2016-07-15 10:08:17 -04:00
Derek Foreman 8760579e25 Make sure the same keyboard resource doesn't end up on the focus list twice
This stops recent xdg_popup focus tracking changes from causing multiple
key events to be sent to the focused client.
2016-07-15 10:08:12 -04:00
Marcel Hollerbach 93808761d3 e_comp_data: NULL out source once it is freed
Otherwise the pointer is removed when the next drag starts, so this
makes debugging dnd problems easier.
2016-07-15 10:07:57 -04:00
Mike Blumenkrantz 5726fc6f88 set unmax flag for xdg shell unmaximize
ref b5576dbb8c
2016-07-15 10:07:50 -04:00
Mike Blumenkrantz 08c98213cf match wl_wl output sizing in wl_x11 when running in an existing wm session
global sizing policy++
2016-07-15 10:07:45 -04:00
Mike Blumenkrantz c948541460 set x11 randr iface for wl_x11 based on wm presence, not composited state
fixes usage in non-composited x11 environments (eg. openbox)
2016-07-15 10:07:38 -04:00
Mike Blumenkrantz 9487da476b handle e_comp_x init failure more effectively and perform cleanups
fixes autodetection for x11 wayland output without setting E_WL_FORCE
2016-07-15 10:07:29 -04:00
Derek Foreman 38227ba536 Properly send kbd focus to xdg_shell popups
Oops, a client can have multiple top level windows.

ref f391a0fb67
2016-07-15 10:07:04 -04:00
Chidambar Zinnoury 3b2d9a74c2 e desks config: Bring some flip settings back.
These were inadvertently removed by e1369a24bd.

 @fix
2016-07-15 10:06:56 -04:00
Mariusz Bialonczyk 71da3a7832 modules/temperature: cosmetics: typo fix (celcius -> celsius)
Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4129
2016-07-15 10:06:52 -04:00
207 changed files with 76297 additions and 73370 deletions

View File

@ -4,7 +4,7 @@
# More people can be added following this scheme:
# Proper Name <proper@email.xx> Commit Name <commit@email.xx>
#
# Please keep this file in sync between efl, elementary, e and terminology.
# Please keep this file in sync between efl, e and terminology.
Carsten Haitzler <raster@rasterman.com> Carsten Haitzler (Rasterman) <raster@rasterman.com>
Cedric BAIL <cedric.bail@free.fr> Cedric Bail <cedric.bail@samsung.com>
@ -14,13 +14,20 @@ Cedric BAIL <cedric.bail@free.fr> Cedric BAIL <cedric@efl.so>
Cedric BAIL <cedric.bail@free.fr> Cedric BAIL <c.bail@partner.samsung.com>
Cedric BAIL <cedric.bail@free.fr> Cedric BAIL <cedric@osg.samsung.com>
Vincent Torri <vincent.torri@gmail.com> Vincent Torri <vtorri@univ-evry.fr>
Vincent Torri <vincent.torri@gmail.com> Vincent Torri <vincent dot torri at gmail dot com>
Vincent Torri <vincent.torri@gmail.com> Vincent Torri <vincent.torri@univ-evry.fr>
Tom Hacohen <tom@stosb.com> Tom 'TAsn' Hacohen <tom@stosb.com>
Tom Hacohen <tom@stosb.com> Tom <tom@stosb.com>
Gustavo Sverzut Barbieri <barbieri@gmail.com> Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
Christopher Michael <devilhorns@comcast.net> Christopher Michael <cpmichael@comcast.net>
Christopher Michael <devilhorns@comcast.net> Christopher Michael <cp.michael@samsung.com>
Christopher Michael <devilhorns@comcast.net> Christopher Michael <cpmichael1@comcast.net>
Christopher Michael <devilhorns@comcast.net> Chris Michael <devilhorns@comcast.net>
Christopher Michael <devilhorns@comcast.net> Christopher Michael <devilhorns@comcast.net>
Christopher Michael <devilhorns@comcast.net> Christopher <devilhorns@comcast.net>
Christopher Michael <devilhorns@comcast.net> Chris Michael <cp.michael@samsung.com>
Christopher Michael <devilhorns@comcast.net> Christopher Michael <cpmichael@osg.samsung.com>
Christopher Michael <devilhorns@comcast.net> Chris Michael <cpmichael@osg.samsung.com>
Sebastian Dransfeld <sd@tango.flipp.net> Sebastian Dransfeld <sebastian.dransfeld@sintef.no>
Sebastian Dransfeld <sd@tango.flipp.net> sebastid <sebastid>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Mike Blumenkrantz <m.blumenkran@samsung.com>
@ -29,6 +36,7 @@ Mike Blumenkrantz <michael.blumenkrantz@gmail.com> zmike <michael.blumenkrantz@g
Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Mike Blumenkrantz <zmike@samsung.com>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Mike Blumenkrantz <zmike@osg.samsung.com>
ChunEon Park <hermet@hermet.pe.kr> ChunEon Park <chuneon.park@samsung.com>
ChunEon Park <hermet@hermet.pe.kr> Hermet Park <hermet@hermet.pe.kr>
David Walter Seikel <onefang@gmail.com> David Walter Seikel <won_fang@yahoo.com.au>
Rafael Antognolli <antognolli@gmail.com> Rafael Antognolli <rafael.antognolli@intel.com>
Rafael Antognolli <antognolli@gmail.com> Rafael Antognolli <rafael.antognolli@linux.intel.com>
@ -38,6 +46,7 @@ Lucas De Marchi <lucas.demarchi@profusion.mobi> Lucas De Marchi <lucas.de.marchi
Lucas De Marchi <lucas.demarchi@profusion.mobi> Lucas De Marchi <lucas.demarchi@intel.com>
Jihoon Kim <imfine98@gmail.com> Jihoon Kim <jihoon48.kim@samsung.com>
Stefan Schmidt <stefan@datenfreihafen.org> Stefan Schmidt <s.schmidt@samsung.com>
Stefan Schmidt <stefan@datenfreihafen.org> Stefan Schmidt <stefan@osg.samsung.com>
Jonas M. Gastal <jgastal@profusion.mobi> Jonas Gastal <jgastal@profusion.mobi>
Daniel Juyung Seo <seojuyung2@gmail.com> Daniel Juyung Seo <juyung.seo@samsung.com>
Daniel Juyung Seo <seojuyung2@gmail.com> Daniel Juyung Seo <seojuyung@gmail.com>
@ -79,4 +88,10 @@ Massimo Maiurana <maiurana@gmail.com> maxerba <maiurana@gmail.com>
Lee Gwang-O <maeryo@live.co.kr> Gwang O Lee <pu8046@gmail.com>
Thibaut Broggi <broggi_t@epitech.eu> broggi_t <broggi_t@epitech.eu>
Daniel Zaoui <daniel.zaoui@samsung.com> Daniel Zaoui <daniel.zaoui@yahoo.com>
Daniel Zaoui <daniel.zaoui@samsung.com> daniel.zaoui@samsung.com <daniel.zaoui@samsung.com>
Jérémy Anger <angerj.dev@gmail.com> kidanger <angerj.dev@gmail.com>
Andy Williams <andy@andywilliams.me> handyande <handyande>
Davide Andreoli <dave@gurumeditation.it> Dave Andreoli <dave@gurumeditation.it>
Davide Andreoli <dave@gurumeditation.it> davemds <dave@gurumeditation.it>
Simon Lees <simon@simotek.net> Simon <simon@simotek.net>
Simon Lees <simon@simotek.net> Simon Lees (SUSE) <sflees@suse.de>

View File

@ -58,3 +58,6 @@ Wonguk Jeong (huchi) <wonguk.jeong@samsung.com>
Jake Yoon (Jaeseok Yoon) <yjaeseok@gmail.com>
Luis de Bethencourt (luisbg) <luis@debethencourt.com>
bu5hm4n (Marcel Hollerbach) <marcel-hollerbach@t-online.de>
simotek (Simon Lees) <simon@simotek.net>
Derek Foreman <derekf@osg.samsung.com>
netstar (Al Poole) <netstar@gmail.com>

811
NEWS
View File

@ -1,3 +1,814 @@
Release 0.21.11:
---------------------
Carsten Haitzler (6):
fix up window+screen positioning fixup so it doesnt catch other clients
e start - fix path prepend/append if already in path assuming clue
tiling - ensure notification struct is 0'd before use
battery modules - actually set ac power flag based on ac presence
e main - xdg runtime dir fixup - dont overwrite same buffer
nvidia driver workaround atexit handlers for pam auth
Chidambar Zinnoury (2):
e remote: Fix scripts execution rights.
e menu: Fix missing realize when using key-activation to the right.
Derek Foreman (4):
Fix crash when processing a wayland client cursor set after death
Fix xwayland related crash when mousing out of a window
Clear stored root window id when shutting down X
Fix crash on wayland logout if xwayland hasn't started yet
Mike Blumenkrantz (46):
use animator del function to delete comp object animators
handle shade <-> unshade toggling in same frame
resolve desktop spec issues with emixer.desktop
use EC_CHANGED when setting changed flag in client idler
hide clients again after show in idler if clients are on hidden desk
block recursive mouse eventing in bryce action handlers
handle unmovable gadgets in gadget move action
flag zone/edge mouse binding activation with ON_HOLD
fix clickable edge binding activation with other mouse buttons
remove fdo interfaces from music control dbus xml
don't perform zone updates on client resize
remove input-only client fastpath to resize crashes
use client geometry for visibility effect geometry, not comp object geometry
emit E_EVENT_EXEC_NEW_CLIENT with phony exes
don't show xwayland clients unconditionally on commit
defer wl startup apps until after xwayland init completes
do ecore-x shutdown on xwayland shutdown
redo bryce eventing
deduplicate global gadget handler variables
block gadget configuration unconditionally while desklock is active
set comp object alpha state when applying native surface
add max size input rects for wl clients on creation
handle x11 shaped input under xwayland
set default cursor on root window for xwl pointer
Revert "disable option for mouse to use Application theme if we are running in Wayland"
move 'show cursor' option in mouse settings inside frame
do not show cursor theme options in wayland compositor mode
move cursor theme options into separate frame
check for non-wl compositor when forcing application cursors onto pointers
always use e cursor theme for canvas pointers
recreate x11 root pointer when changing application<->enlightenment theme
add render update when showing clients if damages exist
add client refs for the nocomp client
do not unqueue render when deleting a client's render update
ignore set_input_region requests for wl surfaces which are cursors or drags
set null input regions for surfaces upon calling set_cursor or start_drag
null wl clipboard+selection source pointers when destroying clipboard source
cancel wl selections after removing destroy listener
move x11 compositor cleanup into shutdown function
unset client's mouse-in state on mouse out even while fullscreen or deleted
send wl pointer leave for deleted clients if viable
unset xwayland client changes.pos flag during xwl->wl switch if client is unplaced
block wl modal window destructor from intercepting xwl modal windows
handle more mouse buttons under wayland
explicitly free client animation agent object during fullscreen operation
Revert "handle x11 shaped input under xwayland"
Stephen 'Okra' Houston (1):
E Exe: Semi revert 2082bb51d3abffd991b4d791ace2567888e2e9fb. The ref count was off to begin with.
Release 0.21.10:
---------------------
Al Poole (1):
Efm: file properties, fix widget sizing issue.
Carsten Haitzler (5):
wireless module - dont segv e if connman daemon restarts
e - fix eet image format test to actually use key when loading
filepreview - properly set min size on cells not in a broken way
xsettings - fix warning for buffer that could be a bit small
batget - fix warnings about buffer sizes
Derek Foreman (1):
Remove ecore_drm support
Marcel Hollerbach (6):
e_startup: check for efreet errors
tiling: show notification if a client cannot be tiled
everything: use correct edje api
mixer: find a better name
tiling: give a better error message if a client doesnt fit
everything:declare this object as const
Mike Blumenkrantz (79):
reject gadget site layout attempts only when it would be impossible
do not reposition new bryces after using editor
clamp vertical bryce size to useful zone geometry
use explicit rounding for bryce scaling
do not add delete/kill request smart callbacks for non-internal wl clients
apply client hints when rescaling a client
rescale x11 clients after fetching hints
don't arbitrarily bind version=1 for wl extension resources
make mouse-activated menus function as expected with 0 passed as activate time
do not defer wl gl init
clamp internal win min/max size hints to 0
set clock gadget id on creation
destroy gadget configs when deleting a gadget site
avoid object hide animations during shutdown
handle case where eglBindWaylandDisplay fails during wl init
capture zone for newly-added bryces based on name
make menu autoplacement more consistent by preferring DOWN placement
set gadget ctxpopup priority based on anchor
end xdnd operations on window hide if no FINISHED event is received
don't force xwl drag client motion for override drag clients
use xwindow check to determine whether to check icccm accept/take focus attrs
always align ibar inner box to the left
send theme signal for dialogs when no buttons are present
only pop a single dialog to notify about all fail themes in theme dialog
block updating window remembers while applying them
use EC_CHANGED for client menu attr changes
avoid hiding->showing->hiding->etc submenus for active menu items
re-select previously selected font+size in font class config
clamp xsettings font size to 12 when size is 0
only update wl client window size on commit if no pending resize exists
handle focus reverting correctly when using desk flip all actions
replace existing resize pointer mode for x11 client-initiated resizes
lock menu eventing during menu idler positioning
use menu item geometry to determine whether menu item is onscreen
only set new clients to current desk if desk has not yet been set
temporarily cache x11 configure requests which reposition hidden windows
remove invalid framelist call on frametable object in imc dialog
check imc exe existence before showing in imc dialog list
don't set gadman overlay gadgets as editing if overlay not visible
batch x11 maximize state change requests
force min size calc on dialog show
always use client geometry for comp object centering functions
handle gadget ctxpopup placement for desktop gadgets
set moving gadgets in pointer site to have moving state
perform gadget site layout before calling drop callback
destroy dropped gadgets after drop operation completes
fix color class dialog sizing
use client geometry for fileman popup positioning instead of win object geometry
use evas size hints for image widget internals if internal obj is not edje obj
use client frame for internal win geometry setting on show
perform client zone updates on canvas move/resize when not ignored
do not rescale override x11 clients during hint fetching
use clone of remembers list in window remember config
handle xdg "autostart" directories in apps dialogs
handle bryce setup when theme is broken
track setxkbmap processes and allow only one to run at a time
Revert "force recalc on bryce scroller when doing recalc on gadget site"
Revert "handle updates_full when adding comp object update regions"
force client render on mirror show for clients which have not yet been rendered
initialize stack variables
use int array for client maximize hint state update
use focus_set_with_pointer to focus from clients menu (middle click)
track gadget ctxpopups and reposition within zone on resize
do not reset existing client damage on resize if tiler size matches pixmap size
move pending client render queue in pixel callback to before render call
return during client pixel callback if pixmap is dirty and no updates exist
avoid adding render updates on client resize while shading the client
check for matching '/' in screen edid before fuzzy matching in randr init
use correct string for randr screen fuzzy matching
set shaped client image alpha after setting image data
don't update clock timer for time gadgets when deleting a non-advanced gadget
stack gadgets below site event rect when reparenting gadget
add time config event rects to gadget popups list
reset zone edge objects after comp canvas update
block all desk flips during window resize
warp pointer to center of internal dialog on show if dialog has focus
apply pointer focus to existing config dialogs from settings window
handle first time desk setting for fullscreen clients without crashing
remove fullscreen clients from vdesk clients list when toggling sticky state
Release 0.21.9:
---------------------
Amitesh Singh (1):
e widget entry: fix the compilation warning
Carsten Haitzler (2):
e - fix entry wrapper - e entry was plain. elm is markup. do it properly
randr - discovered new output names that are display panels in laptops
Derek Foreman (13):
Don't require dmabuf buffers to be writeable
Fix wl_drm session activation callback
Fix wl_drm session (de)activation callback
Remove some duplicate operations
Fix unused var compiler warning in wl_drm
clean up some code
Clear the native surface structure before initializing it
Initialize the Evas_Native_Surface to 0 for dmabuf tests
Test dmabuf via native_surface_set even in software render
Make wayland clients render when only visible from mirrors
Fix xwayland selection crash
Don't block wayland client updates during screen saver fade out
Fix geometry for drm outputs
Jean-Philippe ANDRÉ (1):
pulse: do not leak strbuf
Marcel Hollerbach (3):
emixer: use a better name for the sink inputs
mixer: the name has to be a stringshare
mixer: do not leak a allocated string
Mike Blumenkrantz (81):
check efm path existence before using it during dnd selections
unset wl button mask when beginning a move/resize operation
unset wl selection target client if that client is deleted
don't dup fds during xwl bridged selection transfer, this happens in libwayland
add error messages when symbols fail to resolve in xwl init
force client pixmap refresh immediately during resize if nocomp is active
do not perform zone updates on ignored clients during evas callbacks
use FOREACH_SAFE when walking client list during logout
another fix for e_comp_wl->ptr.x/y coords being wl_fixed instead of ints
perform client raise before triggering move/resize BEGIN client hook
delete client raise timer when beginning a move/resize operation
do not trigger events/bindings on zone object events with timestamp==0
only remove left/right maximize when removing vertical if left/right is set
don't null pointer after deleting internal win during wl delete request
hook client object unref callback to cleanup comp object internals
use fake xinerama screens when initializing wl outputs
reject client mouse move if coords match previous position
try only 1 reconnect to pulse when mixer fails to init
set pass events on shape debug rects
print object type if name is null during shape debug
if gadget wizard returns a zero id, remove gadget from site and destroy
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
update gadget position during a resize from top/left edge
use seat0 as default seat name instead of default
use safe list iterating when clearing a gadget site during shutdown
block "user" client resizes during comp client updating phase
perform move after resize during comp object show
multiply pointer axis values by 10 for wl clients
check exit status from auth subprocess
make e_comp_object_frame_allowed() return false for ignored clients
use xwayland check for clients when checking whether to reset focus to root
don't run x11 focus (un)set callbacks for override clients
don't force shm for xwayland launch and enable gl
don't call comp object cleanup functions for clients without comp objects
only unredirect clients during comp update after 3 failures
try redirecting failed clients again during resize
don't crash in randr module when using fake xinerama screens
simplify drm output update event by using randr screen refresh queuing
only call old ecore_drm2 functions if built and run against < 1.20 efl
add "focus" mode for render debug
unset DISPLAY in mixer when performing pulseaudio operations under wl
use kbd focus resource's client instead of "focused" client in data device
unset gadget site's layout pointer after destroying gadgets
move gadget del callbacks to AFTER priority
update time gadget date string during clock timer
only set qt theme override env vars if option to do theme matching is enabled
rename clock+time module event handler lists
disable clock+time gadget updating during dpms
freeze pointer animations while screensaver is active
prune unconfigured gadgets from comp object sites upon site del
only store the compositor's own data manager resource to e_comp_wl->mgr.resource
don't free x11 clipboard source immediately
check for different types of load errors during startup image load tests
hide pointer cursor clients when unsetting them
use more descriptive label than '???' for unconfigured outputs in scren config
use real sizing for screen config mode list, not 1xheight
do not set e_comp log level
use e_util env functions in time module
perform immediate move on bryce during autosize
do not use elm api to unset centered flag during resize
rework internal win centering
resize comp bg_blank_object on zone update
save xwindow of x11 selection owner, not client
add special case for xwl-originating drags to set dnd actions
focus x11 root window on init when starting with xwayland
handle xwl data source cleanup more effectively
free xwl selection atom names after creating selection source
set xwl-originating data source dnd actions during source creation
add text/plain;charset=utf-8 to xwl-created wl clipboard data source
don't create xwl receive pipe for SelectionRequest when getting the selection
reject invalid comp object resizes
apply gadget aspects with greater precision
abort gadget site layouts if the gadget site has not been sized
return immediately when setting a null gadget style if current style is null
show clients immediately after pixmap refresh if visibility is pending
return updates_full state from e_comp_object_damage_exists()
use ecore_x_netwm_opacity_get() for x11 opacity checking
handle updates_full when adding comp object update regions
reset comp object update regions when a render occurs
continue to fetch netwm opacity hint if it changed since the last fetch
set client opacity any time netwm hint has changed in fetch
remove left/right maximize before removing vertical maximize
Release 0.21.8:
---------------------
Al Poole (4):
Fix macro namings in relation to endianness.
Fix compiler type warnings (snprintf)
E keyboard settings - use the same icon as the keyboard settings dialog
Add user to AUTHORS.
Carsten Haitzler (3):
e randr2 - fix freeing of stringshare by making it a stringshare
fix fullscreen no blank logic in e's dpms code
further fixes to screensaver/banking with window states like fullscreen
Mike Blumenkrantz (65):
hide wl clients before deleting them on surface destroy
comment out inlist member of E_Comp_Object struct
better protect comp object internals from dereferencing freed clients
add all wl client frame callbacks with priority AFTER
unset deskmirror client's client pointer upon client deletion
unset deskmirror client's client pointer upon client deletion
defer menu activation mouse-up feed
set ON_HOLD when activating start gadget
add handler for EFREET_EVENT_DESKTOP_CACHE_BUILD to e_order init
do not use saved e_randr screens if fake screens have been added
do not force comp objects to render for their proxies if real_hid is set
show x11 parent windows during reparent only if not withdrawn
return during comp object pixels function if client was deleted during render
perform frame adjustments before applying wm spec hints during unmaximize
only save client size info on maximize/fullscreen when protocol visible
check changes.pos during client maximize/fullscreen and adjust window coords
do not start xwayland repeatedly
call wl/x compositor shutdown functions directly during comp shutdown
force iconic state for iconic x11 clients during shutdown
move x11 iconic window init from e_hints -> comp_x initial fetch
call e_randr2_shutdown in comp shutdown
handle null E_Comp->screen during randr2 shutdown
don't set minw for keyboard layout dialog
only hide wl clients on surface destroy when surface is mapped
handle nested compositor delete requests
only set toolbar icon min size if icon exists
always use jobs to create bryce menus
handle window icons from elm for internal wins
only re-set comp object position during show if client has been placed
set dialog and tooltip flags for internal clients
add wrappers for elm_win util create functions
send wl client resize edges during focus-in/out send_configure
set signal move/resize clients as action_client internally
compare against e_client_action_get() for rejecting wl mouse events
do not send mouse events to ssd wl clients if mouse is within ssd region
use even more accurate wl callbacks for detecting ssd mouse in/out events
always feed mouse events for wl client move events
block x11 focus eventing under xwayland
do not attempt to set window hidden hints on non-internal x11 windows
account for late object setup when adding ssd mouse in/out callbacks
disable client maximize anims when unmaximizing before a fullscreen
always set E_Client->need_fullscreen when fullscreening
force e_client_unmaximize() to complete during fullscreen operation
slightly optimize maximize -> fullscreen protocol comms for wl clients
check pixmap size before triggering maximize animation
force animationless re-maximize when unfullscreening
only center internal windows once
adjust size for frame geometry in no-animation maximize path
call "maximize" smart callback before "maximize_pre"
re-set backlight level when resuming from suspend
add a client's children to the skiplist during place routine
do not arbitrarily center "lost" child windows, center them on the parent
support clients as positioner objects in e_comp_object_util_center_on()
add cache for dead x11 manager windows
remove uuid references from e_pixmap.c
re-set list of default desklock bgs when changing to custom bg in config
set pass events on efm icons when deleting files
make RENDER_DEBUG activate with E_RENDER_DEBUG env var
make SHAPE_DEBUG activate with E_SHAPE_DEBUG env var
explicitly set nested wl output canvas as a toplevel window
avoid refocusing deleted wl clients during comp input ungrabbing
set initial x11 window geometry for windows which do not have wm hints
check image load error when checking dmabuf viability in gl
better handling for iconify during comp object show/hide
do not show iconic x11 clients on on icccm hint change
Release 0.21.7:
---------------------
Carsten Haitzler (19):
enlightenment_sys - eina_init BEFORE switching uid - safer
e ervything md5 code - fix warnings about alignment
e fileman config - fix definite alignment bug with cast char to int ptr
e theme conf config - fix casting char fileds to int ptrs
e ptr cast via void fix to reduce warnings
efm ipc - fix unaligned int read on ipc decode
e comp x - fix property fetch to use int ptr from the start
e xsettings - fix warnings about unaligned ptr access
e comp - wl - add void cast to reduce warnings
e notification - silence alignment warning
efm - fix warnings for progress time display
evry module - fix warning about comparing signed to unsigned
e mixer pulse backened -f ix warning about use of uninit var
e comp object - fix warning where a void cast is as goos as the old one
e comp - fix stupid cast to from eina rect* to char* to eina rect* again
e comp - quiet some warnings for casts that are ok
tiling module - fix some warnings with casts and alignment
efx - fix unaligned ptr fill that is actually a bug
efm - fix nuisance warning about enlightenment
Derek Foreman (1):
Dispatch wayland frame callbacks in the correct order
Marcel Hollerbach (1):
tiling: dont use floating state when toggling
Mike Blumenkrantz (24):
Revert "re-enable getting and setting output rotations in wl_drm"
make e_pointer_object_set() a no-op when passing the existing cursor
simplify mouse-out cursor reset for wl clients
use 1x1 for unsized (internal) clients
hide wl client cursors when set_pointer is passed a null surface
add note in doc for "gadget_destroyed" callback re: callback ordering
ref clients during exe_inst deletion to avoid invalid access after free
start xwayland process 2.0s after module load
only unset current pointer cursor object if new one is being set
force mouse-out on wl clients during delete if mouse.in is set
Revert "attempt to re-set wl surface pointer when popping back to "default" pointer type"
reset compositor pointer cursor if wl surface destroy is the current cursor
add specific handling for xwl cursor unsetting on mouse-out to ssd
move wl data device focus-change handling to data device leave() fn
simplify _e_comp_wl_data_device_drag_finished() slightly
more correctly handle dnd completion for wl
fix return code checking for errors when generating wl key events
future-proof client hook inlist initialization
always set E_Client->placed when successfully moving a comp object
ignore all non-NORMAL type wl windows in e_place
save config when toggling option to disable startup splash
only move new bryces to zone on create, not existing ones
show already-visible comp util objects when changing frame type
Revert "e - wl mode - stop consuming 100 percent cpu"
Release 0.21.6:
---------------------
Andreas Metzler (1):
10_typo_restore_LDFLAGS.diff: Fix typo in configure.ac (upstream), causing empty LDFLAGS.
Carsten Haitzler (8):
tasks - calculate min width properly given a known height of a gadget
efm - warning - change invalid #if toe #ifdef as this is right
efm - fix ifs to be ifdef as they should be
e bindings - fix warnings about possible use of undefined var
appmenu - make appmenu work with click+release and not hide on focus out
ibar - fix seg with ibar icon task menus are up while desktop files change
e - wl mode - stop consuming 100 percent cpu
e dialog - fix unreszable dialogs to not be 1x1
Christopher Michael (2):
Use proper coordinate adjustment
re-enable getting and setting output rotations in wl_drm
Derek Foreman (3):
Fix wayland frame callback times
Use a monotonic clock for frame callback times
Mike Blumenkrantz (11):
null out animator pointers in efx stop() operations
correctly set E_POINTER_RESIZE_BR mode for client keyboard resizing
plug iterator leak in e_comp_object_render()
remove extra SLEEP prints during startup on non-release builds
free configs for demo gadgets on object free
do not perform frame coord adjustments for re_manage wayland clients
use persistent clipping for comp object input rects
ensure that gadget internal del callbacks are handled before other callbacks
handle pixmap_refresh() failure cases more accurately under wayland
reset demo gadget id before deleting gadget object during drop operation
add conditional updates for latest efl apis
Stephen 'Okra' Houston (2):
Enlightenment: Make gadget editor popup scrollable:
Enlightenment: Wireless gadget - place the ctxpopup after the size hints are set, not before
Release 0.21.5:
---------------------
Carsten Haitzler (1):
e_util_defer_object_del - ensure order of deferred deletions are right
Christopher Michael (1):
remove unused variables in e_comp_wl
Derek Foreman (5):
Fix keyboard tracking when leaving an xdg shell window
Fix crash when exiting an xdg shell application
More aggressively prune keyboard focus list
Stop sending key up/down events on focus change under wayland
test dmabuf pixmaps properly
Mike Blumenkrantz (10):
handle xdg-shell maximize/unmaximize calls correctly
stack subsurfaces above their parents upon creation
use more accurate determination for applying xdg-shell (un)maximize operations
do not pop pointer types on client hide events if the client is pass_events
set wl pointer surfaces to E_LAYER_CLIENT_PRIO during setup
attempt to re-set wl surface pointer when popping back to "default" pointer type
fix internal wl windows to exit when border X is clicked
use better check for getting wl surface alpha from cursor pixmaps
revert all sizing commits to ibar/ibox for the past year
maintain "empty" object's size hints when ibar/ibox resizes
Release 0.21.4:
---------------------
Al Poole (1):
efm - fix popup if file is a fifo
Alexander Pyhalov (1):
actually check if PIE is supported for SUID
Carsten Haitzler (3):
e fm - fix popup to not crash by referring to possibly deleted data
cpufreq - move cpuinfo polling into thread to not block mainloop ever
wizard - do not set scale to 1.2 forcibly. use dpi as the def prof says
Christopher Michael (2):
check if a client is internal or not before deleting
fix missing definition of DRM_FORMAT_XRGB8888
Derek Foreman (6):
Block session recovery for internal windows
Remove EVAS_CALLBACK_HIDE on shelf when freeing
Increase area of tilers for regions
Fix massive wayland input region brokenness
Fix wayland opaque regions
Stop passing dimensions to _e_comp_wl_surface_state_init
Joshua McBeth (1):
add dbus message 'org.enlightenment.wm.Window.SendToDesktop'
Marcel Hollerbach (5):
wizard: make page 065 translatable
mixer: we changed that name when we merged the mixer in
update german translation
The potfile has changed,
mixer: do not set back the value from emix once the drag is finished
Massimo Maiurana (1):
Updating italian translation
Michaël Bouchaud (yoz) (2):
mixer: fix the volume conversion calc into pulseaudio backend
Revert "mixer: lock up the slider for the case a drag is in progress"
Mike Blumenkrantz (80):
enforce bryce resizing when orientation changes
add EINTERN function for renaming gadget sites
fix bryce check for shelf existence on orientation/anchor to break when expected
add zone number to bryce names
do not check for shelf/bryce existence in opposing anchorages during bryce wizard
further improve bryce portability across zones
also do full bryce rename when moving between zones
add new flag for zone edge objects to allow shape cutting while repeating events
force bryce visibility during editor activity
add gadget_site_(un)locked smart callbacks for forcing gadget site visibility
call gadget_popup smart callback when configuring gadgets
handle gadget_popup smart callback on gadget's display object
set ON_HOLD flag when triggering gadget mouse buttion actions
remove unused attribute from used param
trigger bryce menus from right click if event has not been consumed
fix bryce upgrade path from 0 -> 2 re:naming
set ON_HOLD flag more accurately when activating gadget actions
avoid extra recalc when resizing a bryce on its oriented axis
add gadget site sizing workaround to avoid elm box sizing desync
rename bryces when changing anchors
loop bryce autosize recalc when gadget site has not yet calculated its size
only find the session recovery remember if ec->remember is not it
apply non-session recovery remember to client when creating recovery remember
correctly handle applying of non-SR remember in remember config
reject successive zone_geometry_dirty() calls
trigger zone geometry events when updating zone/desk obstacles
force min size on wireless popup during show
add workarounds for ctxpopup geometry for use in input shape tiling
force recalc on bryce scroller when doing recalc on gadget site
handle no-orient gadget visibility based on site->events visibility
force gadget site recalc on gadget object creation to ensure sizing
copy gadget position from pointer gadget -> drop gadget when executing drop
calc new gadget size based on ratio of size:target site size
allow client frame changes when switching from frame -> no frame
optimize out re-applying of borderless client theme
block remembers of e_sys windows
use eina_streq for string comparison in e_zone_for_id_get()
fix use after free when renaming a bryce
clamp bryce position to its parent zone
avoid potential divide by zero during bryce startup
do not modify bryce zone/name during startup
center desktop gadget editor popups upon the zone they have activated
attempt to handle non-orient gadget resizes based on anchor corners
allow scaling gadgets using wheel events during initial placement
attempt to recalc gadgets which overflow their container
do not apply efx anchoring to move effects if a resize effect is not active
do not return early from _bryce_position()
add bool return for e_exec_phony_del() to return deletion success
feed mouse-up when dropping a gadget site before enabling events on the site
force gadget site recalc from style object if gadget's hints change
return correct values from bryce post event callbacks
determine wl pixmap argb solely based on image_argb flag
avoid crash when calling e_pixmap_image_exists on wl pixmaps without buffers
add more parens for previous pixmap commit
add special case for returning pixmap argb of unusable wl cursor pixmaps
move bryces to E_LAYER_DESKTOP_TOP when not above windows
force bryce repositioning onto target zone during startup
use only zone coords when moving bryce to its zone during editing
clamp e_place calcs to zone geometry
break out e_place_desk_region_smart() area calcs into separate function
break out repeated code from _e_place_desk_region_smart_area_calc() into separate function
reset initial internal wl client states when hiding (but not deleting)
unset wl client surface pointer on surface destroy
remove wl client pixmap aliasing on del
always free wl pixmap buffer list on non-cache image clear
unalias internal wl client pixmaps in elm win hide trap callback
handle e_scale correctly in bryces
keep bryce starting size unscaled
unset cur_mouse_action upon deleting client menu
send orientation signal to bryce scroller theme
only unset cur_mouse_action on client menu delete for the right action
focus confirmation option in efm delete dialog
disable bindings during desklock
reject non-printable characters from lokker entry
make confirm dialogs autoselect the confirm option
require an elm win to apply auto-visibility for internal wins in wl surface commit
clarify some wl surface checks to require elm wins
make fake mouse-out upon focus-out conditional on pending pointer warp
revise internal window session recovery blocking to compile with older efl
prevent divide by zero when calculating gadget aspect sizing
Romain Naour (1):
E: fix Wayland without xwayland build
Stefan Schmidt (2):
e_fm: fix last commit to compile again with clang
e_fm: remove unused variable
Stephen okra Houston (1):
Time Gadget: Change the calendar month on mouse wheel.
Release 0.21.3:
---------------------
Carsten Haitzler (4):
update e po files
e exec - fix exec of enlightenment_open to use actual e prefix
explicitly use eina list types passing into EINA_LIST_FREE()
Cedric BAIL (1):
fix text preview to use eina_strbuf_append_length that doesn't call strlen and crash.
Christopher Michael (3):
Remove unused variables from ibar_resize_handle function
add missing EINA_UNUSED for function parameter
Update wayland readme file
Derek Foreman (6):
Don't send keyboard leave events to unfocused clients
Fix error print when wl_wl fails to start
Fix xwayland binary location detection
Don't kill self during shutdown
NULL out xwayland fd handlers after deleting them
Flavio Ceolin (1):
emix: when in alsa mode only operate on master
Marcel Hollerbach (7):
ibar: try to get a better min size
tiling: place popup on the current active zone
tiling: be more accurate on the description
mixer: introduce Barrier checks
mixer: introduce emix_max_volume_get
ibar: multiply size with scale
mixer: lock up the slider for the case a drag is in progress
Massimo Maiurana (1):
Updating slovenian translation
Mike Blumenkrantz (34):
use stringshare_add() for evry files plugin mime types
another case of stringshare misuse re:efreet_mime_type_get()
ignore xwl clients when flagging wl surfaces as internal
add event handler for evry event type, not #define value
do not attempt to populate gadgets during type_add if site has not yet been populated
add docs for E_Comp struct members
move 'unmaximize' smart callback to after geom calc in client_unmaximize
use comp canvas win by default for any drop handler with an E_Object
handle e_comp deref during e_dnd shutdown to avoid crash
always use compositor object stacking when performing internal drags
clamp bryces to a lower canvas layer
use same layer in bryce editor for "above window" setting
set gadget added flag any time a gadget is created or wizarded
add separate codepath for handling layout of moving gadgets
force smart calc on gadget sites at key points during move operations
attempt to retain gadget size when executing move operations
adjust gadget drop coords for pointer offset
check visibility of gadget site 'events' member to determine drop availability
add backspace/delete for clearing all lockscreen gadgets
always use largest available size for free-oriented gadgets
add gadget doc note for gadget_destroyed callback re:object lifetimes
force bgpreview widget to resize after a wallpaper update
always delete gadget's display object and ensure gadget object is null
do not update bryce layer when restacking to a higher layer than CLIENT_ABOVE
remove extraneous recalc trigger when deleting a gadget
do not consume key events in comp autoclose key callback if desklock is active
add e_util_open(), unify all callers of enlightenment_open
remove (wrong) setting of layer for time's clock gadget popup
do not show wireless gadget popups if desklock is active
force shape queue when gadget util ctxpopups change visibility
print object type in shape debug if name does not exist
clamp gadget util ctxpopups to E_LAYER_POPUP at the lowest
handle "unmaximize" smart callback differently depending on fullscreen state
force zone useful geometry recalc on desk flip if prev/next desk has obstacles
Romain Naour (2):
configure.ac: wayland only build fix
e_xkb: add guard around skip_new_keyboard
Simon Lees (3):
Also set QT_STYLE_OVERRIDE
YeongJong Lee (1):
fix korean translation mismatch
Release 0.21.2:
---------------------
Carsten Haitzler (6):
e - fix dnd problems coming from getting top object in comp canvas
e ibar/ibox port to elm box - fix assumption on resize
e temp module - kill tempget process not terminate to ensure death
e ibar - fix devilhorns fix to use the right widght and hight for separator
e comp - set alpha after setting native surface to avoid random crash
e ipc - fix cleanup of ipc socket on shutdown
Chidambar Zinnoury (3):
e: Dont show two consecutive menu separators if there is no need in client menu.
e fm: Add a separator only if there is something before.
e fm: Dont check every other line whether the location is writable when creating menu.
Christopher Michael (6):
remove unused variables from _ibar_resize_handle
use proper variables to set size_hint_max on ibar
e ibar - fix "old man" fat finger typo ;)
remove need to create different dialog windows under wayland
wl_fb: Check that e_comp_wl_init does not fail.
add key_up and key_down methods to sreen interface
Derek Foreman (2):
Fix wayland clients not deleting when they're hidden
Fix wayland extension global creation
Jean-Philippe ANDRÉ (1):
bg: Fix bg with single jpeg images (no edj)
JengHyun Kang (1):
e_comp_wl: break from meaningless loop
Marcel Hollerbach (4):
e_comp_wl: destroy e_drag when source disappears
e_alert: define EFL_BETA_API_SUPPORT before any include
e_dnd: move the ungrab to the object free
xwayland: show the dialog after ecore_wl2 is in sync
Massimo Maiurana (2):
Updating italian and spanish translations
Updating italian translation
Mike Blumenkrantz (9):
only check x11 configurerequest geometry changes when applicable
improve quickaccess relaunch help dialog text
move new version of e_comp_top_window_at_xy_get() to dnd, restore old version
clear wl subsurface data during delete only if subsurface is not also deleted
add xwayland compat for efl 1.19+
bump efl wayland req to 1.18 now that it's out
Revert "track/manage size hints for zoomap child objects"
track current bryce geom, force recalc on gadget site upon change
clean up some string leaks in wireless gadget popups
Romain Naour (1):
E: include uuid.h only when Wayland support is enabled.
Simon Lees (1):
README.wayland --enable-elput is required for building wayland efl
Stefan Schmidt (1):
mailmap: sync updated file from efl repo
Release 0.21.1:
---------------------
Al Poole (1):
fwin: prevent segv when the vaarg abi messup with unused parameter.
Carsten Haitzler (1):
e ibar/ibox fix starrting/started signal emittion
Cedric BAIL (1):
filepreview: avoid race condition when destroying txt file preview with slow hard drive.
Chidambar Zinnoury (1):
e desks config: Bring some flip settings back.
Chris Michael (1):
add missing EINA_UNUSED for unused function params
Derek Foreman (3):
Properly send kbd focus to xdg_shell popups
Make sure the same keyboard resource doesn't end up on the focus list twice
Fix xdg_shell focus logic
Marcel Hollerbach (1):
e_comp_data: NULL out source once it is freed
Mariusz Bialonczyk (1):
modules/temperature: cosmetics: typo fix (celcius -> celsius)
Mike Blumenkrantz (6):
handle e_comp_x init failure more effectively and perform cleanups
set x11 randr iface for wl_x11 based on wm presence, not composited state
match wl_wl output sizing in wl_x11 when running in an existing wm session
set unmax flag for xdg shell unmaximize
set/unset smart parent as e_widget when adding sub-objects
adjust xdg-shell window menu coords by client's coords
Release 0.21.0:
---------------------
Highlights:

View File

@ -18,6 +18,7 @@ Firstly, you MUST have EFL built with the following options:
--enable-drm
--enable-wayland
--enable-systemd
--enable-elput
Note that the drm engine will not be functional unless the target system
has libsystemd-login installed.
@ -75,7 +76,7 @@ a Wayland session. Simply start as usual:
If you have a separate configuration profile that you would like to use,
you can tell Enlightenment to use that when you start it:
dbus-launch enlightenment_start -profile <my_profile>
enlightenment_start -profile <my_profile>
To run a wayland session inside x11, export E_WL_FORCE=x11 before starting
enlightenment.

View File

@ -2,11 +2,11 @@
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [0])
m4_define([v_min], [21])
m4_define([v_mic], [0])
m4_define([v_mic], [11])
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
m4_undefine([v_rev])
m4_define([relname], [0.21.0])
m4_define([relname], [0.21.11])
##-- When doing snapshots - change soname. remove dnl on below line
m4_define([relname], [ver-0.21])
dnl m4_define([v_rel], [-release relname])
@ -674,7 +674,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-wl2 >= 1.17.99 wayland-server >= 1.11.0 wayland-client >= 1.11.0 xkbcommon uuid],
PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 >= 1.18 wayland-server >= 1.11.0 wayland-client >= 1.11.0 xkbcommon uuid],
[
have_wayland=yes
have_wayland_dep=true
@ -700,7 +700,7 @@ fi
AM_CONDITIONAL([HAVE_WAYLAND], [test "x${have_wayland}" = "xyes"])
AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test "x${have_wayland_egl}" = "xyes"])
if test "x${have_wayland_only}" != "xyes"; then
if test "x${e_cv_want_wayland_only}" != "xyes"; then
PKG_CHECK_MODULES([ECORE_X], [ecore-x >= ${efl_version}])
if test -n "$ECORE_X_CFLAGS" ; then
ecore_x=true
@ -780,12 +780,16 @@ define([CHECK_MODULE_XWAYLAND],
[
if test "x${have_wayland}" = "xyes"; then
AC_E_CHECK_PKG(XWAYLAND, [ ecore-x >= ${efl_version} ecore-audio >= ${efl_version} ], [HAVE_XWAYLAND_DEPS=true], [HAVE_XWAYLAND_DEPS=false])
EFL_WITH_BIN([Xwayland], [Xwayland], [Xwayland])
if test -z "x${Xwayland}" ; then
HAVE_XWAYLAND_DEPS=false
AC_ARG_WITH(Xwayland, AS_HELP_STRING([--with-Xwayland=PATH], [Path to Xwayland]), [Xwayland_with="$withval"], [Xwayland_with="yes"])
if test "x${Xwayland_with}" != "xyes"; then
xwayland=$Xwayland_with
AC_SUBST(xwayland)
else
AC_PATH_PROG(xwayland, Xwayland, "no")
fi
if test "x${xwayland}" == "xno"; then
AC_MSG_ERROR([Xwayland enabled but not found.])
fi
else
HAVE_XWAYLAND_DEPS=false
fi
])
AM_CONDITIONAL([HAVE_XWAYLAND], [test "x${HAVE_XWAYLAND}" != "xno"])
@ -1015,12 +1019,30 @@ m4_ifndef([v_rel],
EFL_COMPILER_FLAG([-Wformat=2])
])
SUID_CFLAGS=-fPIE
SUID_LDFLAGS=-pie
SUID_CFLAGS=
SUID_LDFLAGS=
case "$host_os" in
freebsd*|pcbsd*)
SUID_CFLAGS=
SUID_LDFLAGS=
;;
*)
if test -n "$GCC"; then
AC_MSG_CHECKING(if GCC supports -fPIE)
OLDCFLAGS="$CFLAGS"
OLDLDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS -fPIE"
LDFLAGS="$LDFLAGS -pie"
AC_TRY_LINK(,,
[
SUID_CFLAGS="-fPIE"
SUID_LDFLAGS="-pie"
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
LDFLAGS="$OLDLDFLAGS"
fi
;;
esac
AC_SUBST([SUID_CFLAGS])

0
data/tools/enlightenment_remote Normal file → Executable file
View File

View File

@ -283,6 +283,7 @@ src/modules/wizard/page_030.c
src/modules/wizard/page_040.c
src/modules/wizard/page_050.c
src/modules/wizard/page_060.c
src/modules/wizard/page_065.c
src/modules/wizard/page_070.c
src/modules/wizard/page_080.c
src/modules/wizard/page_090.c

3467
po/ar.po

File diff suppressed because it is too large Load Diff

3476
po/bg.po

File diff suppressed because it is too large Load Diff

3612
po/ca.po

File diff suppressed because it is too large Load Diff

3473
po/cs.po

File diff suppressed because it is too large Load Diff

3468
po/da.po

File diff suppressed because it is too large Load Diff

3902
po/de.po

File diff suppressed because it is too large Load Diff

3462
po/el.po

File diff suppressed because it is too large Load Diff

3446
po/eo.po

File diff suppressed because it is too large Load Diff

3933
po/es.po

File diff suppressed because it is too large Load Diff

3450
po/et.po

File diff suppressed because it is too large Load Diff

2870
po/fi.po

File diff suppressed because it is too large Load Diff

3380
po/fo.po

File diff suppressed because it is too large Load Diff

3427
po/fr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3449
po/gl.po

File diff suppressed because it is too large Load Diff

3465
po/he.po

File diff suppressed because it is too large Load Diff

3476
po/hr.po

File diff suppressed because it is too large Load Diff

3449
po/hu.po

File diff suppressed because it is too large Load Diff

1789
po/it.po

File diff suppressed because it is too large Load Diff

3477
po/ja.po

File diff suppressed because it is too large Load Diff

3367
po/km.po

File diff suppressed because it is too large Load Diff

3458
po/ko.po

File diff suppressed because it is too large Load Diff

3399
po/lt.po

File diff suppressed because it is too large Load Diff

3450
po/ms.po

File diff suppressed because it is too large Load Diff

3471
po/nb.po

File diff suppressed because it is too large Load Diff

3450
po/nl.po

File diff suppressed because it is too large Load Diff

3472
po/pl.po

File diff suppressed because it is too large Load Diff

3455
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3450
po/ro.po

File diff suppressed because it is too large Load Diff

3450
po/ru.po

File diff suppressed because it is too large Load Diff

3476
po/sk.po

File diff suppressed because it is too large Load Diff

9661
po/sl.po

File diff suppressed because it is too large Load Diff

3448
po/sr.po

File diff suppressed because it is too large Load Diff

3476
po/sv.po

File diff suppressed because it is too large Load Diff

3452
po/tr.po

File diff suppressed because it is too large Load Diff

3473
po/uk.po

File diff suppressed because it is too large Load Diff

2767
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -476,6 +476,9 @@ src_bin_enlightenment_alert_SOURCES = \
src/bin/e_alert_main.c
src_bin_enlightenment_alert_LDADD = @E_ALERT_LIBS@
if HAVE_WAYLAND
src_bin_enlightenment_alert_LDADD += @dlopen_libs@
endif
src_bin_enlightenment_alert_CPPFLAGS = @E_ALERT_CFLAGS@
src_bin_enlightenment_filemanager_SOURCES = \

View File

@ -97,8 +97,8 @@ ACT_FN_GO(window_move, EINA_UNUSED)
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
if (!((E_Client *)obj)->lock_user_location)
e_client_act_move_begin((E_Client *)obj, NULL);
if (!((E_Client *)(void *)obj)->lock_user_location)
e_client_act_move_begin((E_Client *)(void *)obj, NULL);
}
ACT_FN_GO_MOUSE(window_move, EINA_UNUSED)
@ -106,7 +106,7 @@ ACT_FN_GO_MOUSE(window_move, EINA_UNUSED)
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return EINA_FALSE;
if (obj->type != E_CLIENT_TYPE) return EINA_FALSE;
e_client_act_move_begin((E_Client *)obj, ev);
e_client_act_move_begin((E_Client *)(void *)obj, ev);
return EINA_TRUE;
}
@ -115,14 +115,14 @@ ACT_FN_GO_SIGNAL(window_move, )
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
if (!((E_Client *)obj)->lock_user_location)
if (!((E_Client *)(void *)obj)->lock_user_location)
{
if ((params) && (!strcmp(params, "end")))
e_client_signal_move_end((E_Client *)obj, sig, src);
e_client_signal_move_end((E_Client *)(void *)obj, sig, src);
else
{
if (!((E_Client *)obj)->moving)
e_client_signal_move_begin((E_Client *)obj, sig, src);
if (!((E_Client *)(void *)obj)->moving)
e_client_signal_move_begin((E_Client *)(void *)obj, sig, src);
}
}
}
@ -132,7 +132,7 @@ ACT_FN_END(window_move, EINA_UNUSED)
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
e_client_act_move_end((E_Client *)obj, NULL);
e_client_act_move_end((E_Client *)(void *)obj, NULL);
}
ACT_FN_END_MOUSE(window_move, EINA_UNUSED)
@ -140,7 +140,7 @@ ACT_FN_END_MOUSE(window_move, EINA_UNUSED)
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return EINA_FALSE;
if (obj->type != E_CLIENT_TYPE) return EINA_FALSE;
e_client_act_move_end((E_Client *)obj, ev);
e_client_act_move_end((E_Client *)(void *)obj, ev);
return EINA_TRUE;
}
@ -148,8 +148,8 @@ ACT_FN_GO_KEY(window_move, EINA_UNUSED, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_location)
e_client_act_move_keyboard((E_Client *)obj);
if (!((E_Client *)(void *)obj)->lock_user_location)
e_client_act_move_keyboard((E_Client *)(void *)obj);
}
/***************************************************************************/
@ -158,8 +158,8 @@ ACT_FN_GO(window_resize, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_size)
e_client_act_resize_begin((E_Client *)obj, NULL);
if (!((E_Client *)(void *)obj)->lock_user_size)
e_client_act_resize_begin((E_Client *)(void *)obj, NULL);
}
ACT_FN_GO_MOUSE(window_resize, EINA_UNUSED)
@ -167,8 +167,8 @@ ACT_FN_GO_MOUSE(window_resize, EINA_UNUSED)
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return EINA_FALSE;
if (obj->type != E_CLIENT_TYPE) return EINA_FALSE;
if (!((E_Client *)obj)->lock_user_size)
e_client_act_resize_begin((E_Client *)obj, ev);
if (!((E_Client *)(void *)obj)->lock_user_size)
e_client_act_resize_begin((E_Client *)(void *)obj, ev);
return EINA_TRUE;
}
@ -177,17 +177,17 @@ ACT_FN_GO_SIGNAL(window_resize, )
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
if (!((E_Client *)obj)->lock_user_size)
if (!((E_Client *)(void *)obj)->lock_user_size)
{
if ((params) && (!strcmp(params, "end")))
e_client_signal_resize_end((E_Client *)obj, params, sig, src);
e_client_signal_resize_end((E_Client *)(void *)obj, params, sig, src);
else
{
if (!params) params = "";
if (e_client_util_resizing_get((E_Client *)obj))
e_client_signal_resize_end((E_Client *)obj, params, sig, src);
if (e_client_util_resizing_get((E_Client *)(void *)obj))
e_client_signal_resize_end((E_Client *)(void *)obj, params, sig, src);
else
e_client_signal_resize_begin((E_Client *)obj, params, sig, src);
e_client_signal_resize_begin((E_Client *)(void *)obj, params, sig, src);
}
}
}
@ -197,7 +197,7 @@ ACT_FN_END(window_resize, EINA_UNUSED)
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
e_client_act_resize_end((E_Client *)obj, NULL);
e_client_act_resize_end((E_Client *)(void *)obj, NULL);
}
ACT_FN_END_MOUSE(window_resize, EINA_UNUSED)
@ -205,7 +205,7 @@ ACT_FN_END_MOUSE(window_resize, EINA_UNUSED)
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return EINA_FALSE;
if (obj->type != E_CLIENT_TYPE) return EINA_FALSE;
e_client_act_resize_end((E_Client *)obj, ev);
e_client_act_resize_end((E_Client *)(void *)obj, ev);
return EINA_TRUE;
}
@ -218,8 +218,8 @@ ACT_FN_GO_KEY(window_resize, EINA_UNUSED, EINA_UNUSED)
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_size)
e_client_act_resize_keyboard((E_Client *)obj);
if (!((E_Client *)(void *)obj)->lock_user_size)
e_client_act_resize_keyboard((E_Client *)(void *)obj);
}
/***************************************************************************/
@ -228,7 +228,7 @@ ACT_FN_GO(window_menu, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
e_client_act_menu_begin((E_Client *)obj, NULL, 0);
e_client_act_menu_begin((E_Client *)(void *)obj, NULL, 0);
}
ACT_FN_GO_MOUSE(window_menu, EINA_UNUSED)
@ -240,7 +240,7 @@ ACT_FN_GO_MOUSE(window_menu, EINA_UNUSED)
obj = E_OBJECT(e_client_focused_get());
if (!obj) return EINA_FALSE;
}
e_client_act_menu_begin((E_Client *)obj, ev, 0);
e_client_act_menu_begin((E_Client *)(void *)obj, ev, 0);
return EINA_TRUE;
}
@ -253,7 +253,7 @@ ACT_FN_GO_KEY(window_menu, EINA_UNUSED, EINA_UNUSED)
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
e_client_act_menu_begin((E_Client *)obj, NULL, 1);
e_client_act_menu_begin((E_Client *)(void *)obj, NULL, 1);
}
/***************************************************************************/
@ -262,8 +262,8 @@ ACT_FN_GO(window_raise, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_stacking)
evas_object_raise(((E_Client *)obj)->frame);
if (!((E_Client *)(void *)obj)->lock_user_stacking)
evas_object_raise(((E_Client *)(void *)obj)->frame);
}
/***************************************************************************/
@ -272,8 +272,8 @@ ACT_FN_GO(window_lower, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_stacking)
evas_object_lower(((E_Client *)obj)->frame);
if (!((E_Client *)(void *)obj)->lock_user_stacking)
evas_object_lower(((E_Client *)(void *)obj)->frame);
}
/***************************************************************************/
@ -282,8 +282,8 @@ ACT_FN_GO(window_close, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_close)
e_client_act_close_begin((E_Client *)obj);
if (!((E_Client *)(void *)obj)->lock_close)
e_client_act_close_begin((E_Client *)(void *)obj);
}
/***************************************************************************/
@ -300,8 +300,8 @@ _e_actions_cb_kill_dialog_ok(void *data, E_Dialog *dia)
e_object_del(E_OBJECT(kill_dialog));
kill_dialog = NULL;
}
if ((!((E_Client *)obj)->lock_close) && (!((E_Client *)obj)->internal))
e_client_act_kill_begin((E_Client *)obj);
if ((!((E_Client *)(void *)obj)->lock_close) && (!((E_Client *)(void *)obj)->internal))
e_client_act_kill_begin((E_Client *)(void *)obj);
}
static void
@ -325,7 +325,7 @@ ACT_FN_GO(window_kill, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if ((ec->lock_close) || (ec->internal)) return;
if (kill_dialog) e_object_del(E_OBJECT(kill_dialog));
@ -367,11 +367,11 @@ ACT_FN_GO(window_sticky_toggle, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_sticky)
if (!((E_Client *)(void *)obj)->lock_user_sticky)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (ec->sticky) e_client_unstick(ec);
else e_client_stick(ec);
}
@ -383,11 +383,11 @@ ACT_FN_GO(window_sticky, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_sticky)
if (!((E_Client *)(void *)obj)->lock_user_sticky)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (params)
{
if (atoi(params) == 1)
@ -406,7 +406,7 @@ ACT_FN_GO(window_iconic_toggle, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if ((!ec->lock_user_iconify) && (!ec->fullscreen) &&
((ec->netwm.type == E_WINDOW_TYPE_NORMAL) ||
@ -423,11 +423,11 @@ ACT_FN_GO(window_iconic, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_iconify)
if (!((E_Client *)(void *)obj)->lock_user_iconify)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (params)
{
if (atoi(params) == 1)
@ -444,11 +444,11 @@ ACT_FN_GO(window_fullscreen_toggle, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_fullscreen)
if (!((E_Client *)(void *)obj)->lock_user_fullscreen)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (ec->fullscreen)
e_client_unfullscreen(ec);
else if (!params || *params == '\0')
@ -466,11 +466,11 @@ ACT_FN_GO(window_fullscreen, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_fullscreen)
if (!((E_Client *)(void *)obj)->lock_user_fullscreen)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (params)
{
int v;
@ -504,7 +504,7 @@ ACT_FN_GO(window_maximized_toggle, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
/* internal dialog which is resizable */
if (ec->internal && (ec->netwm.type == E_WINDOW_TYPE_DIALOG))
@ -568,11 +568,11 @@ ACT_FN_GO(window_maximized, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_maximize)
if (!((E_Client *)(void *)obj)->lock_user_maximize)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (params)
{
E_Maximize max;
@ -622,11 +622,11 @@ ACT_FN_GO(window_shaded_toggle, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_shade)
if (!((E_Client *)(void *)obj)->lock_user_shade)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (ec->shaded)
{
if (!params)
@ -672,11 +672,11 @@ ACT_FN_GO(window_shaded, )
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_user_shade)
if (!((E_Client *)(void *)obj)->lock_user_shade)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (!e_comp_object_frame_allowed(ec->frame)) return;
if (params)
{
@ -718,11 +718,11 @@ ACT_FN_GO(window_borderless_toggle, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_border)
if (!((E_Client *)(void *)obj)->lock_border)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (!e_comp_object_frame_allowed(ec->frame)) return;
ec->borderless = !ec->borderless;
@ -737,11 +737,11 @@ ACT_FN_GO(window_border_set, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_border)
if (!((E_Client *)(void *)obj)->lock_border)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (!e_comp_object_frame_allowed(ec->frame)) return;
if (ec && params)
{
@ -758,11 +758,11 @@ ACT_FN_GO(window_border_cycle, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_border)
if (!((E_Client *)(void *)obj)->lock_border)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (!e_comp_object_frame_allowed(ec->frame)) return;
if (ec && params)
{
@ -817,11 +817,11 @@ ACT_FN_GO(window_pinned_toggle, EINA_UNUSED)
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (!((E_Client *)obj)->lock_border)
if (!((E_Client *)(void *)obj)->lock_border)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if ((ec->netwm.state.stacking == E_STACKING_BELOW) &&
(ec->user_skip_winlist) && (ec->borderless))
e_client_pinned_set(ec, 0);
@ -848,7 +848,7 @@ ACT_FN_GO(window_move_by, )
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
evas_object_move(ec->frame, ec->x + dx, ec->y + dy);
e_util_pointer_center(ec);
@ -868,7 +868,7 @@ ACT_FN_GO(window_move_to, )
int x, y, zx, zy, zw, zh;
char cx, cy;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh);
if (sscanf(params, "%c%i %c%i", &cx, &x, &cy, &y) == 4)
@ -915,7 +915,7 @@ ACT_FN_GO(window_quick_tile_to_quadrant, )
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if((ec->maximized & E_MAXIMIZE_TYPE) != E_MAXIMIZE_NONE)
e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh);
@ -959,7 +959,7 @@ ACT_FN_GO(window_move_to_center, EINA_UNUSED)
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
e_comp_object_util_center(ec->frame);
e_util_pointer_center(ec);
@ -980,7 +980,7 @@ ACT_FN_GO(window_resize_by, )
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
dw += ec->w;
dh += ec->h;
@ -1049,7 +1049,7 @@ ACT_FN_GO(window_push, )
else
return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh);
if (hdir < 0) x = zx;
@ -1186,7 +1186,7 @@ ACT_FN_GO(window_drag_icon, EINA_UNUSED)
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
ec->drag.start = 1;
ec->drag.x = -1;
ec->drag.y = -1;
@ -1206,7 +1206,7 @@ ACT_FN_GO(window_desk_move_by, )
obj = E_OBJECT(e_client_action_get());
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if ((!ec->zone) || (!ec->desk)) return;
if (sscanf(params, "%d %d", &x, &y) == 2)
{
@ -1268,7 +1268,7 @@ ACT_FN_GO(window_zone_move_by, )
obj = E_OBJECT(e_client_action_get());
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
/* bad */
if (!ec->zone) return;
/* only one screen */
@ -1308,7 +1308,7 @@ ACT_FN_GO(window_desk_move_to, )
obj = E_OBJECT(e_client_action_get());
if (!obj) return;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if ((!ec->zone) || (!ec->desk)) return;
if (sscanf(params, "%d %d", &x, &y) == 2)
{
@ -1328,9 +1328,9 @@ _e_actions_zone_get(E_Object *obj)
if (obj->type == (int)E_COMP_TYPE)
return e_zone_current_get();
else if (obj->type == (int)E_ZONE_TYPE)
return (E_Zone *)obj;
return (void *)obj;
else if (obj->type == (int)E_CLIENT_TYPE)
return ((E_Client *)obj)->zone;
return ((E_Client *)(void *)obj)->zone;
else if (obj->type == (int)E_SHELF_TYPE)
return ((E_Shelf *)obj)->zone;
else if (e_obj_is_win(obj))
@ -1402,6 +1402,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
int x, y, offset = 25;
if (!ev) return; // with flip on _e_zone_cb_edge_timer we don't have ev!!!
if (e_client_action_get() && e_client_util_resizing_get(e_client_action_get())) return;
zone = _e_actions_zone_get(obj);
if (!zone) return;
wev = E_NEW(E_Event_Pointer_Warp, 1);
@ -1544,12 +1545,17 @@ ACT_FN_GO(desk_linear_flip_to, )
}
#define DESK_ACTION_ALL(zone, act) \
E_Zone *zone; \
const Eina_List *lz; \
\
EINA_LIST_FOREACH(e_comp->zones, lz, zone) { \
act; \
}
do { \
E_Zone *zone; \
const Eina_List *lz; \
\
EINA_LIST_FOREACH(e_comp->zones, lz, zone) { \
{ \
zone->desk_flip_sync = 1; \
act; \
} \
} \
} while (0)
/***************************************************************************/
ACT_FN_GO(desk_linear_flip_to_screen, )
@ -1984,7 +1990,7 @@ ACT_FN_GO(app_new_instance, EINA_UNUSED)
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if (ec->desktop)
e_exec(zone, ec->desktop, NULL, NULL, "action/app");
@ -2440,7 +2446,7 @@ ACT_FN_GO(pointer_resize_push, )
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if ((ec->lock_user_size) || (ec->shaded) || (ec->shading) ||
(ec->fullscreen) || ((ec->maximized) && (!e_config->allow_manip)))
return;
@ -2456,7 +2462,7 @@ ACT_FN_GO(pointer_resize_pop, )
{
E_Client *ec;
ec = (E_Client *)obj;
ec = (E_Client *)(void *)obj;
if ((ec->lock_user_size) || (ec->shaded) || (ec->shading) ||
(ec->fullscreen) || ((ec->maximized) && (!e_config->allow_manip)))
return;

View File

@ -1,5 +1,9 @@
#include "config.h"
#ifdef HAVE_DRM2
# define EFL_BETA_API_SUPPORT
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@ -11,23 +15,59 @@
#include <Eina.h>
#include <Ecore.h>
#include <Ecore_Ipc.h>
#include <dlfcn.h>
#include <xcb/xcb.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/shape.h>
#include <X11/keysym.h>
# ifdef HAVE_WL_DRM
# include <Ecore_Input.h>
# ifdef HAVE_DRM2
# define EFL_BETA_API_SUPPORT
# include <drm_fourcc.h>
# include <Ecore_Drm2.h>
# else
# include <Ecore_Drm.h>
# endif
# include <Evas.h>
# include <Evas_Engine_Buffer.h>
#define E_EFL_VERSION_MINIMUM(MAJ, MIN, MIC) \
((eina_version->major > MAJ) || (eina_version->minor > MIN) ||\
((eina_version->minor == MIN) && (eina_version->micro >= MIC)))
#ifdef HAVE_WL_DRM
# include <Ecore_Input.h>
# ifdef HAVE_DRM2
# include <Ecore_Drm2.h>
# else
# include <Ecore_Drm.h>
# endif
# include <Evas.h>
# include <Evas_Engine_Buffer.h>
#endif
#ifdef HAVE_WL_DRM
# ifdef HAVE_DRM2
/* DRM_FORMAT_XRGB8888 and fourcc_code borrowed from <drm_fourcc.h>
*
* Copyright 2011 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
# define fourcc_code(a, b, c, d) \
((uint32_t)(a) | ((uint32_t)(b) << 8) | \
((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
# define DRM_FORMAT_XRGB8888 \
fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */
# endif
#endif
#define WINDOW_WIDTH 320
#define WINDOW_HEIGHT 240
@ -336,7 +376,6 @@ _e_alert_drm_run(void)
ecore_main_loop_begin();
}
# ifdef HAVE_DRM2
static Ecore_Drm2_Device *dev = NULL;
static Ecore_Drm2_Fb *buffer = NULL;
static Ecore_Drm2_Output *output = NULL;
@ -453,7 +492,17 @@ _e_alert_drm_display(void)
updates = evas_render_updates(canvas);
evas_render_updates_free(updates);
ecore_drm2_fb_flip(buffer, output, NULL);
#ifdef EFL_VERSION_1_19
ecore_drm2_fb_flip(buffer, output);
#else
if (E_EFL_VERSION_MINIMUM(1, 18, 99))
{
void (*fn)(void*, void*) = dlsym(NULL, "ecore_drm2_fb_flip");
if (fn) fn(buffer, output);
}
else
ecore_drm2_fb_flip(buffer, output, NULL);
#endif
}
static void
@ -474,159 +523,6 @@ _e_alert_drm_shutdown(void)
evas_shutdown();
}
# else
static Ecore_Drm_Device *dev = NULL;
static Ecore_Drm_Fb *buffer;
static int
_e_alert_drm_connect(void)
{
fprintf(stderr, "E_Alert Drm Connect\n");
if (!evas_init())
{
printf("\tCannot init evas\n");
return 0;
}
if (!ecore_drm_init())
{
printf("\tCannot init ecore_drm\n");
return 0;
}
dev = ecore_drm_device_find(NULL, NULL);
if (!dev)
{
printf("\tCannot find drm device\n");
return 0;
}
if (!ecore_drm_launcher_connect(dev))
{
printf("\tCannot connect to drm device\n");
return 0;
}
if (!ecore_drm_device_open(dev))
{
printf("\tCannot open drm device\n");
return 0;
}
if (!ecore_drm_outputs_create(dev))
{
printf("\tCannot create drm outputs\n");
return 0;
}
if (!ecore_drm_inputs_create(dev))
{
printf("\tCannot create drm inputs\n");
return 0;
}
ecore_drm_outputs_geometry_get(dev, NULL, NULL, &sw, &sh);
fprintf(stderr, "\tOutput Size: %d %d\n", sw, sh);
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
_e_alert_drm_cb_key_down, NULL);
return 1;
}
static void
_e_alert_drm_create(void)
{
int method = 0;
fprintf(stderr, "E_Alert Drm Create\n");
fh = 13;
if (!ecore_drm_device_software_setup(dev))
{
printf("\tFailed to setup software mode\n");
return;
}
buffer = ecore_drm_fb_create(dev, sw, sh);
memset(buffer->mmap, 0, buffer->size);
method = evas_render_method_lookup("buffer");
if (method <= 0)
{
fprintf(stderr, "\tCould not get evas render method\n");
return;
}
canvas = evas_new();
if (!canvas)
{
fprintf(stderr, "\tFailed to create new canvas\n");
return;
}
evas_output_method_set(canvas, method);
evas_output_size_set(canvas, sw, sh);
evas_output_viewport_set(canvas, 0, 0, sw, sh);
Evas_Engine_Info_Buffer *einfo;
einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas);
if (!einfo)
{
printf("\tFailed to get evas engine info\n");
evas_free(canvas);
return;
}
einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32;
einfo->info.dest_buffer = buffer->mmap;
einfo->info.dest_buffer_row_bytes = (sw * sizeof(int));
einfo->info.use_color_key = 0;
einfo->info.alpha_threshold = 0;
einfo->info.func.new_update_region = NULL;
einfo->info.func.free_update_region = NULL;
evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo);
_e_alert_drm_draw_outline();
_e_alert_drm_draw_title_outline();
_e_alert_drm_draw_title();
_e_alert_drm_draw_text();
_e_alert_drm_draw_button_outlines();
}
static void
_e_alert_drm_display(void)
{
Eina_List *updates;
printf("E_Alert Drm Display\n");
updates = evas_render_updates(canvas);
evas_render_updates_free(updates);
ecore_drm_fb_send(dev, buffer, NULL, NULL);
}
static void
_e_alert_drm_shutdown(void)
{
printf("E_Alert Drm Shutdown\n");
evas_free(canvas);
if (dev)
{
ecore_drm_device_close(dev);
ecore_drm_launcher_disconnect(dev);
ecore_drm_device_free(dev);
}
ecore_drm_shutdown();
evas_shutdown();
}
# endif
#endif
int

View File

@ -201,7 +201,7 @@ e_auth_begin(char *passwd)
if (pamerr != PAM_SUCCESS)
{
free(current_user);
exit(1);
_exit(1);
}
pamerr = pam_authenticate(da.pam.handle, 0);
pam_end(da.pam.handle, pamerr);
@ -211,10 +211,10 @@ e_auth_begin(char *passwd)
if (pamerr == PAM_SUCCESS)
{
free(current_user);
exit(0);
_exit(0);
}
free(current_user);
exit(-1);
_exit(-1);
return 0;
}

View File

@ -265,6 +265,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
{
o = e_icon_add(e_comp->evas);
e_icon_file_key_set(o, bgfile, NULL);
e_icon_scale_size_set(o, 0);
e_icon_fill_inside_set(o, 0);
}
else

View File

@ -125,7 +125,7 @@ e_bindings_ecore_event_mouse_wheel_convert(const Ecore_Event_Mouse_Wheel *ev, E_
event->direction = ev->direction;
event->z = ev->z;
event->canvas.x = e_comp_canvas_x_root_adjust(ev->root.x);
event->canvas.y = e_comp_canvas_x_root_adjust(ev->root.y);
event->canvas.y = e_comp_canvas_y_root_adjust(ev->root.y);
event->timestamp = ev->timestamp;
event->modifiers = _e_bindings_modifiers(ev->modifiers);
}
@ -136,7 +136,7 @@ e_bindings_ecore_event_mouse_button_convert(const Ecore_Event_Mouse_Button *ev,
memset(event, 0, sizeof(E_Binding_Event_Mouse_Button));
event->button = ev->buttons;
event->canvas.x = e_comp_canvas_x_root_adjust(ev->root.x);
event->canvas.y = e_comp_canvas_x_root_adjust(ev->root.y);
event->canvas.y = e_comp_canvas_y_root_adjust(ev->root.y);
event->timestamp = ev->timestamp;
event->modifiers = _e_bindings_modifiers(ev->modifiers);
@ -862,7 +862,7 @@ e_bindings_edge_event_find(E_Binding_Context ctxt, E_Event_Zone_Edge *ev, Eina_B
EINA_LIST_FOREACH(edge_bindings, l, binding)
/* A value of <= -1.0 for the delay indicates it as a mouse-click binding on that edge */
if (((binding->edge == ev->edge)) &&
((click && (binding->delay == -1.0 * click)) || (!click && (binding->delay >= 0.0))) &&
((click && (binding->delay == -1.0 * ev->button)) || (!click && (binding->delay >= 0.0))) &&
((binding->drag_only == ev->drag) || ev->drag) &&
((binding->any_mod) || (binding->mod == mod)))
{
@ -879,7 +879,7 @@ e_bindings_edge_event_find(E_Binding_Context ctxt, E_Event_Zone_Edge *ev, Eina_B
E_API E_Action *
e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev)
{
E_Binding_Edge *binding;
E_Binding_Edge *binding = NULL;
E_Desk *current = NULL;
E_Action *act = NULL;
E_Binding_Edge_Data *ed;
@ -889,7 +889,7 @@ e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z
current = e_desk_at_xy_get(ev->zone, ev->zone->desk_x_current, ev->zone->desk_y_current);
if (current->fullscreen_clients && (!e_config->fullscreen_flip)) return NULL;
act = e_bindings_edge_event_find(ctxt, ev, 0, &binding);
if (!act) return NULL;
if ((!act) || (!binding)) return NULL;
ed = E_NEW(E_Binding_Edge_Data, 1);
ev2 = E_NEW(E_Event_Zone_Edge, 1);
@ -911,7 +911,7 @@ e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z
E_API E_Action *
e_bindings_edge_out_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev)
{
E_Binding_Edge *binding;
E_Binding_Edge *binding = NULL;
E_Action *act = NULL;
E_Desk *current = NULL;
@ -919,7 +919,7 @@ e_bindings_edge_out_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_
current = e_desk_at_xy_get(ev->zone, ev->zone->desk_x_current, ev->zone->desk_y_current);
if (current->fullscreen_clients && (!e_config->fullscreen_flip)) return NULL;
act = e_bindings_edge_event_find(ctxt, ev, 0, &binding);
if (!act) return NULL;
if ((!act) || (!binding)) return NULL;
if (binding->timer)
{
E_Binding_Edge_Data *ed;
@ -942,7 +942,7 @@ e_bindings_edge_out_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_
E_API E_Action *
e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev)
{
E_Binding_Edge *binding;
E_Binding_Edge *binding = NULL;
E_Desk *current = NULL;
E_Action *act = NULL;
@ -950,7 +950,7 @@ e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event
current = e_desk_at_xy_get(ev->zone, ev->zone->desk_x_current, ev->zone->desk_y_current);
if (current->fullscreen_clients && (!e_config->fullscreen_flip)) return NULL;
act = e_bindings_edge_event_find(ctxt, ev, 1, &binding);
if (!act) return NULL;
if ((!act) || (!binding)) return NULL;
if (act->func.go_edge)
act->func.go_edge(obj, binding->params, ev);
else if (act->func.go)
@ -961,7 +961,7 @@ e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event
E_API E_Action *
e_bindings_edge_up_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Zone_Edge *ev)
{
E_Binding_Edge *binding;
E_Binding_Edge *binding = NULL;
E_Action *act = NULL;
E_Desk *current = NULL;
@ -969,7 +969,7 @@ e_bindings_edge_up_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z
current = e_desk_at_xy_get(ev->zone, ev->zone->desk_x_current, ev->zone->desk_y_current);
if (current->fullscreen_clients && (!e_config->fullscreen_flip)) return NULL;
act = e_bindings_edge_event_find(ctxt, ev, 1, &binding);
if (!act) return NULL;
if ((!act) || (!binding)) return NULL;
act = e_action_find(binding->action);
if (act && act->func.end)
act->func.end(obj, binding->params);

View File

@ -1,14 +1,17 @@
#include "e.h"
#define DEFAULT_LAYER E_LAYER_POPUP
#define DEFAULT_LAYER E_LAYER_CLIENT_ABOVE
#define E_BRYCE_TYPE 0xE31338
static unsigned int bryce_version = 2;
typedef struct Bryce
{
E_Object *e_obj_inherit;
Eina_Stringshare *name;
Evas_Object *bryce;
Evas_Object *events;
Evas_Object *layout;
Evas_Object *site;
Evas_Object *scroller;
@ -19,6 +22,7 @@ typedef struct Bryce
Eina_Stringshare *style;
int size;
int x, y;
int last_w, last_h;
int autohide_size;
E_Layer layer;
unsigned int zone;
@ -36,6 +40,7 @@ typedef struct Bryce
/* config: do not bitfield! */
Eina_Bool autosize;
Eina_Bool autohide;
unsigned int version;
Eina_Bool hidden : 1;
Eina_Bool animating : 1;
@ -56,6 +61,9 @@ static E_Action *resize_act;
static E_Action *menu_act;
static Eina_List *handlers;
static void _bryce_menu(Bryce *b);
#define BRYCE_GET(obj) \
Bryce *b; \
b = evas_object_data_get((obj), "__bryce"); \
@ -99,18 +107,18 @@ _bryce_autohide_coords(Bryce *b, int *x, int *y)
*x = b->x;
if (an & E_GADGET_SITE_ANCHOR_TOP)
*y = oy - b->size + b->autohide_size;
*y = oy - lround(e_scale * b->size) + lround(e_scale * b->autohide_size);
if (an & E_GADGET_SITE_ANCHOR_BOTTOM)
*y = oy + oh - b->autohide_size;
*y = oy + oh - lround(e_scale * b->autohide_size);
}
else if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
{
*y = b->y;
if (an & E_GADGET_SITE_ANCHOR_LEFT)
*x = ox - b->size + b->autohide_size;
*x = ox - lround(e_scale * b->size) + lround(e_scale * b->autohide_size);
if (an & E_GADGET_SITE_ANCHOR_RIGHT)
*x = ox + ow - b->autohide_size;
*x = ox + ow - lround(e_scale * b->autohide_size);
}
}
@ -127,11 +135,21 @@ _bryce_position(Bryce *b, int w, int h, int *nx, int *ny)
zone = e_comp_zone_number_get(b->zone);
ox = zone->x, oy = zone->y, ow = zone->w, oh = zone->h;
if (starting)
{
E_Zone *zone2;
zone2 = e_comp_object_util_zone_get(b->bryce);
if (zone != zone2)
evas_object_move(b->bryce, ox, oy);
}
}
else
evas_object_geometry_get(b->parent, &ox, &oy, &ow, &oh);
x = ox + (ow - w) / 2;
x = E_CLAMP(x, ox, ox + ow / 2);
y = oy + (oh - h) / 2;
y = E_CLAMP(y, oy, oy + oh / 2);
an = e_gadget_site_anchor_get(b->site);
if (an & E_GADGET_SITE_ANCHOR_LEFT)
x = ox;
@ -142,14 +160,14 @@ _bryce_position(Bryce *b, int w, int h, int *nx, int *ny)
if (an & E_GADGET_SITE_ANCHOR_RIGHT)
x = ox + ow - w;
if (an & E_GADGET_SITE_ANCHOR_BOTTOM)
y = oy + oh - b->size;
y = oy + oh - lround(e_scale * b->size);
if (!b->autosize)
x = ox;
}
else if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
{
if (an & E_GADGET_SITE_ANCHOR_RIGHT)
x = ox + ow - b->size;
x = ox + ow - lround(e_scale * b->size);
if (an & E_GADGET_SITE_ANCHOR_BOTTOM)
y = oy + oh - h;
if (!b->autosize)
@ -165,7 +183,6 @@ _bryce_position(Bryce *b, int w, int h, int *nx, int *ny)
}
else
e_efx_move(b->bryce, E_EFX_EFFECT_SPEED_LINEAR, E_EFX_POINT(x, y), 0.5, _bryce_autohide_end, b);
return;
}
else if (b->hidden)
_bryce_autohide_coords(b, &x, &y);
@ -185,16 +202,23 @@ _bryce_autosize(Bryce *b)
if (!b->autosize)
{
if (b->parent == e_comp->elm)
w = e_comp_zone_number_get(b->zone)->w, h = e_comp_zone_number_get(b->zone)->h;
{
w = e_comp_zone_number_get(b->zone)->w;
if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
e_zone_useful_geometry_get(e_comp_zone_number_get(b->zone), NULL, NULL, NULL, &h);
else
h = e_comp_zone_number_get(b->zone)->h;
}
else
evas_object_geometry_get(b->parent, NULL, NULL, &w, &h);
if (b->size_changed)
elm_object_content_unset(b->scroller);
_bryce_position(b, w, h, &x, &y);
evas_object_move(b->bryce, x, y);
if (b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
e_efx_resize(b->bryce, E_EFX_EFFECT_SPEED_LINEAR, E_EFX_POINT(x, y), w, b->size * e_scale, 0.1, NULL, NULL);
e_efx_resize(b->bryce, E_EFX_EFFECT_SPEED_LINEAR, E_EFX_POINT(x, y), w, lround(b->size * e_scale), 0.1, NULL, NULL);
else if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
e_efx_resize(b->bryce, E_EFX_EFFECT_SPEED_LINEAR, E_EFX_POINT(x, y), b->size * e_scale, h, 0.1, NULL, NULL);
e_efx_resize(b->bryce, E_EFX_EFFECT_SPEED_LINEAR, E_EFX_POINT(x, y), lround(b->size * e_scale), h, 0.1, NULL, NULL);
evas_object_smart_need_recalculate_set(b->site, 1);
evas_object_size_hint_min_set(b->site, -1, -1);
if (b->size_changed)
@ -207,30 +231,48 @@ _bryce_autosize(Bryce *b)
E_Zone *zone;
zone = e_comp_zone_number_get(b->zone);
maxw = zone->w, maxh = zone->h;
maxw = zone->w;
if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
e_zone_useful_geometry_get(e_comp_zone_number_get(b->zone), NULL, NULL, NULL, &maxh);
else
maxh = zone->h;
}
else
evas_object_geometry_get(b->parent, NULL, NULL, &maxw, &maxh);
if (b->size_changed)
do
{
evas_object_geometry_get(b->bryce, NULL, NULL, &w, &h);
elm_object_content_unset(b->scroller);
if (b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
evas_object_resize(b->bryce, w * b->size * e_scale / h, b->size * e_scale);
else if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
evas_object_resize(b->bryce, b->size * e_scale, h * b->size * e_scale / w);
evas_object_smart_need_recalculate_set(b->site, 1);
evas_object_size_hint_min_set(b->site, -1, -1);
evas_object_smart_calculate(b->site);
elm_object_content_set(b->scroller, b->site);
if (b->size_changed)
{
evas_object_geometry_get(b->bryce, NULL, NULL, &w, &h);
elm_object_content_unset(b->scroller);
if (b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
{
if (!h) h = 1;
evas_object_resize(b->bryce, w * lround(b->size * e_scale) / h, lround(b->size * e_scale));
evas_object_resize(b->site, w * lround(b->size * e_scale) / h, lround(b->size * e_scale));
}
else if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
{
if (!w) w = 1;
evas_object_resize(b->bryce, lround(b->size * e_scale), h * lround(b->size * e_scale) / w);
evas_object_resize(b->site, lround(b->size * e_scale), h * lround(b->size * e_scale) / w);
}
evas_object_smart_need_recalculate_set(b->site, 1);
evas_object_size_hint_min_set(b->site, -1, -1);
evas_object_smart_calculate(b->site);
elm_object_content_set(b->scroller, b->site);
}
evas_object_size_hint_min_get(b->site, &sw, &sh);
if ((!sw) && (!sh)) b->size_changed = 1;
}
evas_object_size_hint_min_get(b->site, &sw, &sh);
while ((!sw) && (!sh));
edje_object_size_min_calc(elm_layout_edje_get(b->layout), &lw, &lh);
_bryce_position(b, lw + sw, lh + sh, &x, &y);
if (b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
w = MIN(MAX(lw + sw, b->size * e_scale), maxw), h = b->size * e_scale;
w = MIN(MAX(lw + sw, lround(b->size * e_scale)), maxw), h = lround(b->size * e_scale);
else if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
w = b->size * e_scale, h = MIN(MAX(lh + sh, b->size * e_scale), maxh);
w = lround(b->size * e_scale), h = MIN(MAX(lh + sh, lround(b->size * e_scale)), maxh);
evas_object_move(b->bryce, x, y);
e_efx_resize(b->bryce, E_EFX_EFFECT_SPEED_LINEAR, E_EFX_POINT(x, y), w, h, 0.1, NULL, NULL);
b->size_changed = 0;
}
@ -327,7 +369,11 @@ _bryce_style(Evas_Object *site, Eina_Stringshare *name, Evas_Object *g)
ly = elm_layout_add(b->site);
snprintf(buf, sizeof(buf), "e/bryce/%s/%s", b->style ?: "default", name ?: "plain");
e_theme_edje_object_set(ly, NULL, buf);
if (!e_theme_edje_object_set(ly, NULL, buf))
{
evas_object_del(ly);
return;
}
prev = e_gadget_util_layout_style_init(g, ly);
elm_object_part_content_set(ly, "e.swallow.content", g);
evas_object_del(prev);
@ -348,7 +394,7 @@ _bryce_site_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
static E_Comp_Object_Type
_bryce_shadow_type(const Bryce *b)
{
if ((b->layer == E_LAYER_DESKTOP) || b->noshadow)
if ((b->layer == E_LAYER_DESKTOP_TOP) || b->noshadow)
return E_COMP_OBJECT_TYPE_NONE;
return E_COMP_OBJECT_TYPE_POPUP;
}
@ -360,6 +406,7 @@ _bryce_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_in
E_Layer layer;
layer = evas_object_layer_get(obj);
if (layer > DEFAULT_LAYER) return;
b->layer = layer;
if ((!b->noshadow) && (layer != b->layer))
e_comp_object_util_type_set(b->bryce, _bryce_shadow_type(b));
@ -419,6 +466,28 @@ _bryce_zone_setup(Bryce *b)
evas_object_event_callback_add(zone_clip, EVAS_CALLBACK_RESIZE, _bryce_zone_moveresize, b);
}
static void
_bryce_rename(Bryce *b, int num)
{
char buf[1024], buf2[1024], *name, *p;
name = strdup(b->name);
if (b->version >= 2)
{
p = strrchr(name, '_');
p[0] = 0;
}
snprintf(buf, sizeof(buf), "__bryce%s", name);
snprintf(buf2, sizeof(buf2), "__bryce%s_%d", name, num);
e_gadget_site_rename(buf, buf2);
if (b->version >= 2)
{
snprintf(buf, sizeof(buf), "%s_%u", name, num);
eina_stringshare_replace(&b->name, buf);
}
free(name);
}
static void
_bryce_moveresize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
@ -427,16 +496,24 @@ _bryce_moveresize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
E_Zone *zone;
int size;
evas_object_geometry_get(obj, &x, &y, &w, &h);
evas_object_geometry_set(b->events, x, y, w, h);
if (b->autohide)
{
E_FREE_LIST(b->zone_obstacles, e_object_del);
return;
}
evas_object_geometry_get(obj, &x, &y, &w, &h);
if (b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
size = h;
else
size = w;
if (((b->orient == E_GADGET_SITE_ORIENT_VERTICAL) && (w != b->last_w)) ||
((b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL) && (h != b->last_h)))
{
evas_object_smart_need_recalculate_set(b->site, 1);
evas_object_size_hint_min_set(b->site, -1, -1);
}
b->last_w = w, b->last_h = h;
if (size && (b->size != size))
{
@ -446,6 +523,7 @@ _bryce_moveresize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
b->save_timer = ecore_timer_add(0.5, _bryce_moveresize_save, b);
}
if (starting) return;
zone = e_comp_object_util_zone_get(obj);
if (zone)
{
@ -500,72 +578,50 @@ _bryce_moveresize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
if (!zone) return;
if (b->zone == zone->num) return;
e_config_save_queue();
_bryce_rename(b, zone->num);
b->zone = zone->num;
_bryce_zone_setup(b);
_bryce_autosize(b);
}
static Eina_Bool
_bryce_mouse_down_post(void *data, Evas *e EINA_UNUSED)
static void
_bryce_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
Bryce *b = data;
Evas_Event_Mouse_Down *ev;
Evas_Event_Mouse_Down *ev = event_info;
ev = b->event_info;
b->event_info = NULL;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
return !!e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev);
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if (e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return;
}
if (ev->button != 3) return;
b->last_timestamp = ev->timestamp;
_bryce_menu(b);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
static void
_bryce_mouse_down(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event_info)
_bryce_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
Bryce *b = data;
Evas_Event_Mouse_Up *ev = event_info;
b->event_info = event_info;
evas_post_event_callback_push(e, _bryce_mouse_down_post, b);
}
static Eina_Bool
_bryce_mouse_up_post(void *data, Evas *e EINA_UNUSED)
{
Bryce *b = data;
Evas_Event_Mouse_Up *ev;
ev = b->event_info;
b->event_info = NULL;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
return !!e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev);
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if (e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
static void
_bryce_mouse_up(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event_info)
_bryce_mouse_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
Bryce *b = data;
Evas_Event_Mouse_Wheel *ev = event_info;
b->event_info = event_info;
evas_post_event_callback_push(e, _bryce_mouse_up_post, b);
}
static Eina_Bool
_bryce_mouse_wheel_post(void *data, Evas *e EINA_UNUSED)
{
Bryce *b = data;
Evas_Event_Mouse_Wheel *ev;
ev = b->event_info;
b->event_info = NULL;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
return !!e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev);
}
static void
_bryce_mouse_wheel(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event_info)
{
Bryce *b = data;
b->event_info = event_info;
evas_post_event_callback_push(e, _bryce_mouse_wheel_post, b);
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if (e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
static void
@ -580,6 +636,16 @@ _bryce_popup_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
_bryce_autohide_hide(b);
}
static void
_bryce_popup(Bryce *b, Evas_Object *popup)
{
evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _bryce_popup_hide, b);
b->autohide_blocked++;
b->popups = eina_list_append(b->popups, popup);
if (b->autohide)
_bryce_autohide_show(b);
}
static void
_bryce_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -594,6 +660,7 @@ _bryce_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
e_object_del(obs);
}
evas_object_del(b->autohide_event);
E_FREE_FUNC(b->events, evas_object_del);
E_FREE_FUNC(b->calc_job, ecore_job_del);
E_FREE_FUNC(b->autohide_timer, ecore_timer_del);
ecore_timer_del(b->save_timer);
@ -685,8 +752,10 @@ static void
_bryce_wizard_menu(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
{
Bryce *b = data;
Evas_Object *editor;
e_bryce_edit(b->bryce);
editor = e_bryce_edit(b->bryce);
_bryce_popup(b, editor);
}
static void
@ -737,19 +806,29 @@ _bryce_owner_menu(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
}
static void
_bryce_popup(Bryce *b, Evas_Object *popup)
_bryce_gadget_popup(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _bryce_popup_hide, b);
_bryce_popup(data, event_info);
}
static void
_bryce_gadget_locked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Bryce *b = data;
b->autohide_blocked++;
b->popups = eina_list_append(b->popups, popup);
if (b->autohide)
_bryce_autohide_show(b);
}
static void
_bryce_gadget_popup(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
_bryce_gadget_unlocked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
_bryce_popup(data, event_info);
Bryce *b = data;
b->autohide_blocked--;
if (b->autohide && (!b->mouse_in))
_bryce_autohide_hide(b);
}
static void
@ -775,14 +854,22 @@ _bryce_orient(Bryce *b)
elm_object_content_set(b->scroller, b->site);
e_gadget_site_owner_setup(b->site, b->anchor, _bryce_style);
if (b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
elm_layout_signal_emit(b->layout, "e,state,orient,horizontal", "e");
{
elm_layout_signal_emit(b->layout, "e,state,orient,horizontal", "e");
elm_layout_signal_emit(b->scroller, "e,state,orient,horizontal", "e");
}
else
elm_layout_signal_emit(b->layout, "e,state,orient,vertical", "e");
{
elm_layout_signal_emit(b->layout, "e,state,orient,vertical", "e");
elm_layout_signal_emit(b->scroller, "e,state,orient,vertical", "e");
}
evas_object_event_callback_add(b->site, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _bryce_site_hints, b);
evas_object_smart_callback_add(b->site, "gadget_site_anchor", _bryce_site_anchor, b);
evas_object_smart_callback_add(b->site, "gadget_site_style_menu", _bryce_style_menu, b);
evas_object_smart_callback_add(b->site, "gadget_site_owner_menu", _bryce_owner_menu, b);
evas_object_smart_callback_add(b->site, "gadget_site_popup", _bryce_gadget_popup, b);
evas_object_smart_callback_add(b->site, "gadget_site_locked", _bryce_gadget_locked, b);
evas_object_smart_callback_add(b->site, "gadget_site_unlocked", _bryce_gadget_unlocked, b);
}
static void
@ -805,6 +892,10 @@ _bryce_create(Bryce *b, Evas_Object *parent)
Evas_Object *ly, *bryce, *scr;
b->e_obj_inherit = E_OBJECT_ALLOC(E_Object, E_BRYCE_TYPE, _bryce_object_free);
b->events = evas_object_rectangle_add(e_comp->evas);
evas_object_color_set(b->events, 0, 0, 0, 0);
evas_object_name_set(b->events, "b->events");
evas_object_show(b->events);
e_object_data_set(b->e_obj_inherit, b);
b->layout = ly = elm_layout_add(parent);
_bryce_style_apply(b);
@ -815,6 +906,9 @@ _bryce_create(Bryce *b, Evas_Object *parent)
elm_object_part_content_set(ly, "e.swallow.content", scr);
evas_object_show(ly);
b->bryce = bryce = e_comp_object_util_add(ly, _bryce_shadow_type(b));
evas_object_repeat_events_set(evas_object_smart_parent_get(ly), 1);
evas_object_smart_member_add(b->events, bryce);
evas_object_lower(b->events);
evas_object_data_set(bryce, "comp_skip", (void*)1);
evas_object_layer_set(bryce, b->layer);
evas_object_lower(bryce);
@ -832,9 +926,9 @@ _bryce_create(Bryce *b, Evas_Object *parent)
evas_object_event_callback_add(bryce, EVAS_CALLBACK_RESTACK, _bryce_restack, b);
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOVE, _bryce_moveresize, b);
evas_object_event_callback_add(bryce, EVAS_CALLBACK_RESIZE, _bryce_moveresize, b);
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOUSE_DOWN, _bryce_mouse_down, b);
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOUSE_UP, _bryce_mouse_up, b);
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOUSE_WHEEL, _bryce_mouse_wheel, b);
evas_object_event_callback_add(b->events, EVAS_CALLBACK_MOUSE_DOWN, _bryce_mouse_down, b);
evas_object_event_callback_add(b->events, EVAS_CALLBACK_MOUSE_UP, _bryce_mouse_up, b);
evas_object_event_callback_add(b->events, EVAS_CALLBACK_MOUSE_WHEEL, _bryce_mouse_wheel, b);
_bryce_zone_setup(b);
_bryce_autohide_setup(b);
@ -876,9 +970,8 @@ _bryce_act_resize(E_Object *obj, const char *params, E_Binding_Event_Wheel *ev)
}
static void
_bryce_act_menu_job(void *data)
_bryce_menu(Bryce *b)
{
Bryce *b = data;
E_Menu *m;
int x, y;
@ -890,14 +983,13 @@ _bryce_act_menu_job(void *data)
}
static Eina_Bool
_bryce_act_menu(E_Object *obj, const char *params EINA_UNUSED, E_Binding_Event_Mouse_Button *ev EINA_UNUSED)
_bryce_act_menu(E_Object *obj, const char *params EINA_UNUSED, E_Binding_Event_Mouse_Button *ev)
{
Bryce *b;
if (obj->type != E_BRYCE_TYPE) return EINA_FALSE;
b = e_object_data_get(obj);
b->last_timestamp = ev->timestamp;
/* FIXME: T3144 */
ecore_job_add(_bryce_act_menu_job, b);
_bryce_menu(b);
return EINA_TRUE;
}
@ -921,13 +1013,17 @@ E_API Evas_Object *
e_bryce_add(Evas_Object *parent, const char *name, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor an)
{
Bryce *b;
const char *z;
b = E_NEW(Bryce, 1);
b->size = 48;
b->name = eina_stringshare_add(name);
z = strrchr(name, '_');
b->zone = strtoul(z + 1, NULL, 10);
b->anchor = an;
b->orient = orient;
b->layer = DEFAULT_LAYER;
b->version = bryce_version;
_bryce_create(b, parent);
bryces->bryces = eina_list_append(bryces->bryces, b);
e_config_save_queue();
@ -937,20 +1033,37 @@ e_bryce_add(Evas_Object *parent, const char *name, E_Gadget_Site_Orient orient,
E_API void
e_bryce_orient(Evas_Object *bryce, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor an)
{
int w, h;
E_Gadget_Site_Orient prev;
const char *loc = NULL, *loc2 = NULL;
char buf[1024], buf2[1024];
BRYCE_GET(bryce);
if ((b->orient == orient) && (b->anchor == an)) return;
prev = b->orient;
if (an & E_GADGET_SITE_ANCHOR_TOP)
loc = "top";
else if (an & E_GADGET_SITE_ANCHOR_BOTTOM)
loc = "bottom";
else if (an & E_GADGET_SITE_ANCHOR_LEFT)
loc = "left";
else if (an & E_GADGET_SITE_ANCHOR_RIGHT)
loc = "right";
if (an & E_GADGET_SITE_ANCHOR_RIGHT)
loc2 = "right";
else if (an & E_GADGET_SITE_ANCHOR_LEFT)
loc2 = "left";
else if (an & E_GADGET_SITE_ANCHOR_TOP)
loc2 = "top";
else if (an & E_GADGET_SITE_ANCHOR_BOTTOM)
loc2 = "bottom";
snprintf(buf, sizeof(buf), "__bryce%s", b->name);
snprintf(buf2, sizeof(buf2), "__brycebryce_%s_%s_%d", loc, loc2, b->zone);
e_gadget_site_rename(buf, buf2);
b->orient = orient;
b->anchor = an;
evas_object_geometry_get(bryce, NULL, NULL, &w, &h);
snprintf(buf2, sizeof(buf2), "bryce_%s_%s_%d", loc, loc2, b->zone);
eina_stringshare_replace(&b->name, buf2);
_bryce_orient(b);
if (prev == orient)
_bryce_autosize(b);
else
evas_object_resize(bryce, h, w);
_bryce_autosize(b);
}
E_API Evas_Object *
@ -1054,7 +1167,8 @@ e_bryce_exists(Evas_Object *parent, Evas_Object *bryce, E_Gadget_Site_Orient ori
if ((orient == E_GADGET_SITE_ORIENT_##ORIENT) && \
((an == (E_GADGET_SITE_ANCHOR_##ANCHOR1)) || \
((an & E_GADGET_SITE_ANCHOR_##ANCHOR2) && (!es->cfg->fit_along)))) \
return EINA_TRUE
return EINA_TRUE; \
break
default: break;
case E_GADCON_ORIENT_LEFT:
ORIENT_CHECK(VERTICAL, LEFT, LEFT);
@ -1151,6 +1265,7 @@ e_bryce_init(void)
E_CONFIG_VAL(edd_bryce, Bryce, autohide, UCHAR);
E_CONFIG_VAL(edd_bryce, Bryce, orient, UINT);
E_CONFIG_VAL(edd_bryce, Bryce, anchor, UINT);
E_CONFIG_VAL(edd_bryce, Bryce, version, UINT);
edd_bryces = E_CONFIG_DD_NEW("Bryces", Bryces);
E_CONFIG_LIST(edd_bryces, Bryces, bryces, edd_bryce);
@ -1163,7 +1278,22 @@ e_bryce_init(void)
EINA_LIST_FOREACH(bryces->bryces, l, b)
{
if (b->version < 2)
{
/* I broke this the first time by forgetting the __bryce prefix :(
*/
_bryce_rename(b, b->zone);
if (b->version < 1)
{
char buf[1024];
snprintf(buf, sizeof(buf), "%s_%u", b->name, b->zone);
eina_stringshare_replace(&b->name, buf);
}
}
b->version = bryce_version;
if (!e_comp_zone_number_get(b->zone)) continue;
b->layer = E_CLAMP(b->layer, E_LAYER_DESKTOP_TOP, E_LAYER_CLIENT_ABOVE);
_bryce_create(b, e_comp->elm);
evas_object_show(b->bryce);
}

View File

@ -23,13 +23,17 @@ static void _editor_add_right(void *data, Evas_Object *obj, const char *sig, con
static void
setup_exists(Evas_Object *bryce, Evas_Object *editor, Evas_Object *parent, E_Gadget_Site_Anchor an)
{
if (e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_BOTTOM | an))
if ((an != E_GADGET_SITE_ANCHOR_TOP) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_BOTTOM | an))
elm_object_signal_emit(editor, "e,bryce,exists,bottom", "e");
if (e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_TOP | an))
if ((an != E_GADGET_SITE_ANCHOR_BOTTOM) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_TOP | an))
elm_object_signal_emit(editor, "e,bryce,exists,top", "e");
if (e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_LEFT | an))
if ((an != E_GADGET_SITE_ANCHOR_RIGHT) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_LEFT | an))
elm_object_signal_emit(editor, "e,bryce,exists,left", "e");
if (e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_RIGHT | an))
if ((an != E_GADGET_SITE_ANCHOR_LEFT) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_RIGHT | an))
elm_object_signal_emit(editor, "e,bryce,exists,right", "e");
}
@ -41,7 +45,6 @@ _editor_bryce_add(Evas_Object *obj)
const char *loc = "", *loc2 = "";
Bryce_Info *bi;
E_Zone *zone;
int x, y;
E_Gadget_Site_Gravity gravity = E_GADGET_SITE_GRAVITY_CENTER;
bi = evas_object_data_get(obj, "__bryce_info");
@ -63,7 +66,9 @@ _editor_bryce_add(Evas_Object *obj)
else if (bi->anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
loc2 = "bottom";
snprintf(buf, sizeof(buf), "bryce_%s_%s", loc, loc2);
zone = e_comp_object_util_zone_get(obj);
if (!zone) zone = e_zone_current_get();
snprintf(buf, sizeof(buf), "bryce_%s_%s_%d", loc, loc2, zone->num);
if (bi->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
{
if (bi->anchor & E_GADGET_SITE_ANCHOR_LEFT)
@ -92,15 +97,12 @@ _editor_bryce_add(Evas_Object *obj)
e_gadget_site_gadget_add(site, "Digital Clock", 0);
e_gadget_site_gadget_add(site, "Wireless", 0);
}
zone = e_comp_object_util_zone_get(obj);
if (!zone) zone = e_zone_current_get();
evas_object_geometry_get(b, &x, &y, NULL, NULL);
evas_object_move(b, x + zone->x, y + zone->y);
e_gadget_site_gravity_set(site, gravity);
e_bryce_style_set(b, bi->style);
e_bryce_autohide_set(b, bi->autohide);
e_bryce_autosize_set(b, bi->autosize);
evas_object_layer_set(b, bi->stack_under ? E_LAYER_DESKTOP : E_LAYER_CLIENT_EDGE);
evas_object_layer_set(b, bi->stack_under ? E_LAYER_DESKTOP_TOP : E_LAYER_CLIENT_ABOVE);
evas_object_del(obj);
}
@ -189,7 +191,7 @@ _editor_style_click(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve
evas_object_smart_callback_add(ck, "changed", _editor_stacking, bi);
if (bryce)
{
bi->stack_under = evas_object_layer_get(bryce) == E_LAYER_DESKTOP;
bi->stack_under = evas_object_layer_get(bryce) == E_LAYER_DESKTOP_TOP;
elm_check_state_set(ck, bi->stack_under);
}
elm_box_pack_end(box, ck);

View File

@ -55,31 +55,7 @@ static E_Client_Layout_Cb _e_client_layout_cb = NULL;
EINTERN void e_client_focused_set(E_Client *ec);
static Eina_Inlist *_e_client_hooks[] =
{
[E_CLIENT_HOOK_EVAL_PRE_FETCH] = NULL,
[E_CLIENT_HOOK_EVAL_FETCH] = NULL,
[E_CLIENT_HOOK_EVAL_PRE_POST_FETCH] = NULL,
[E_CLIENT_HOOK_EVAL_POST_FETCH] = NULL,
[E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN] = NULL,
[E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN] = NULL,
[E_CLIENT_HOOK_EVAL_PRE_NEW_CLIENT] = NULL,
[E_CLIENT_HOOK_EVAL_POST_NEW_CLIENT] = NULL,
[E_CLIENT_HOOK_EVAL_END] = NULL,
[E_CLIENT_HOOK_FOCUS_SET] = NULL,
[E_CLIENT_HOOK_FOCUS_UNSET] = NULL,
[E_CLIENT_HOOK_NEW_CLIENT] = NULL,
[E_CLIENT_HOOK_DESK_SET] = NULL,
[E_CLIENT_HOOK_MOVE_BEGIN] = NULL,
[E_CLIENT_HOOK_MOVE_UPDATE] = NULL,
[E_CLIENT_HOOK_MOVE_END] = NULL,
[E_CLIENT_HOOK_RESIZE_BEGIN] = NULL,
[E_CLIENT_HOOK_RESIZE_UPDATE] = NULL,
[E_CLIENT_HOOK_RESIZE_END] = NULL,
[E_CLIENT_HOOK_DEL] = NULL,
[E_CLIENT_HOOK_UNREDIRECT] = NULL,
[E_CLIENT_HOOK_REDIRECT] = NULL,
};
static Eina_Inlist *_e_client_hooks[E_CLIENT_HOOK_LAST] = {NULL};
///////////////////////////////////////////
@ -469,8 +445,11 @@ _e_client_free(E_Client *ec)
ec->pixmap = NULL;
}
e_comp_object_redirected_set(ec->frame, 0);
e_comp_object_render_update_del(ec->frame);
if (ec->frame)
{
e_comp_object_redirected_set(ec->frame, 0);
e_comp_object_render_update_del(ec->frame);
}
E_OBJECT(ec)->references++;
if (ec->fullscreen)
@ -585,14 +564,18 @@ _e_client_del(E_Client *ec)
if (ec->exe_inst)
{
if (ec->exe_inst->phony && (eina_list_count(ec->exe_inst->clients) == 1))
e_exec_phony_del(ec->exe_inst);
{
if (e_exec_phony_del(ec->exe_inst))
ec->exe_inst = NULL;
}
else
{
if (!ec->exe_inst->deleted)
ec->exe_inst->clients = eina_list_remove(ec->exe_inst->clients, ec);
{
ec->exe_inst->clients = eina_list_remove(ec->exe_inst->clients, ec);
ec->exe_inst = NULL;
}
}
if (!ec->exe_inst->deleted)
ec->exe_inst = NULL;
}
_e_client_mouse_action_end(ec);
@ -798,6 +781,12 @@ _e_client_move_begin(E_Client *ec)
if (!_e_client_action_input_win_new()) return 0;
ec->moving = 1;
ecmove = ec;
if (!ec->lock_user_stacking)
{
if (e_config->border_raise_on_mouse_action)
evas_object_raise(ec->frame);
}
_e_client_hook_call(E_CLIENT_HOOK_MOVE_BEGIN, ec);
if (!ec->moving)
{
@ -805,11 +794,7 @@ _e_client_move_begin(E_Client *ec)
_e_client_action_input_win_del();
return 0;
}
if (!ec->lock_user_stacking)
{
if (e_config->border_raise_on_mouse_action)
evas_object_raise(ec->frame);
}
E_FREE_FUNC(ec->raise_timer, ecore_timer_del);
return 1;
}
@ -936,6 +921,7 @@ _e_client_resize_handle(E_Client *ec)
int tw, th;
Eina_List *skiplist = NULL;
if (e_comp->updating) return;
x = ec->x;
y = ec->y;
w = ec->w;
@ -1392,7 +1378,8 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
if (e_object_is_del(data)) return; //client is about to die
_e_client_mouse_action_end(ec);
if (action_client == ec) _e_client_action_finish();
e_pointer_type_pop(e_comp->pointer, ec, NULL);
if (!evas_object_pass_events_get(ec->frame))
e_pointer_type_pop(e_comp->pointer, ec, NULL);
if (!ec->hidden)
{
@ -1434,7 +1421,7 @@ _e_client_cb_evas_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
_e_client_event_simple(ec, E_EVENT_CLIENT_MOVE);
_e_client_zone_update(ec);
if (!ec->ignored) _e_client_zone_update(ec);
evas_object_geometry_get(ec->frame, &x, &y, NULL, NULL);
if ((e_config->transient.move) && (ec->transients))
{
@ -1466,7 +1453,6 @@ _e_client_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
_e_client_event_simple(ec, E_EVENT_CLIENT_RESIZE);
_e_client_zone_update(ec);
evas_object_geometry_get(ec->frame, &x, &y, &w, &h);
if ((e_config->transient.resize) && (ec->transients))
{
@ -1547,7 +1533,14 @@ _e_client_maximize_done(void *data, E_Efx_Map_Data *emd EINA_UNUSED, Evas_Object
static Eina_Bool
_e_client_maximize_run(E_Client *ec, int x, int y, int w, int h)
{
if (e_config->window_maximize_animate && (!ec->maximize_anims_disabled) &&
int pw, ph;
Eina_Bool disabled = EINA_FALSE;
if (e_pixmap_size_get(ec->pixmap, &pw, &ph))
{
e_comp_object_frame_wh_adjust(ec->frame, pw, ph, &pw, &ph);
disabled = (w == pw) && (h == ph);
}
if ((!disabled) && e_config->window_maximize_animate && (!ec->maximize_anims_disabled) &&
(!starting) && (!ec->changes.need_maximize))
{
evas_object_del(ec->agent);
@ -1591,7 +1584,7 @@ _e_client_eval(E_Client *ec)
}
e_client_resize_limit(ec, &ec->w, &ec->h);
if (ec->re_manage)
if (ec->re_manage && e_comp_object_frame_exists(ec->frame))
{
int x = ec->x, y = ec->y;
if (ec->x) e_comp_object_frame_xy_adjust(ec->frame, ec->x, 0, &ec->x, NULL);
@ -1720,6 +1713,8 @@ _e_client_eval(E_Client *ec)
else if ((e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART) || (e_config->window_placement_policy == E_WINDOW_PLACEMENT_ANTIGADGET))
{
skiplist = eina_list_append(skiplist, ec);
if (ec->transients)
skiplist = eina_list_merge(skiplist, eina_list_clone(ec->transients));
if (ec->desk)
e_place_desk_region_smart(ec->desk, skiplist,
ec->x, ec->y, ec->w, ec->h,
@ -2151,7 +2146,8 @@ _e_client_frame_update(E_Client *ec)
const char *bordername;
ec->border.changed = 0;
if (!e_comp_object_frame_allowed(ec->frame)) return;
if ((!e_comp_object_frame_allowed(ec->frame)) && (!e_comp_object_frame_exists(ec->frame)))
return;
if (ec->fullscreen || ec->borderless)
bordername = "borderless";
else if (ec->bordername)
@ -2247,7 +2243,12 @@ e_client_idler_before(void)
)
{
if (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)
_e_client_move_lost_window_to_center(ec);
{
if (ec->parent)
e_comp_object_util_center_on(ec->frame, ec->parent->frame);
else
_e_client_move_lost_window_to_center(ec);
}
}
}
@ -2272,7 +2273,9 @@ e_client_idler_before(void)
{
evas_object_show(ec->frame);
ec->changes.visible = !evas_object_visible_get(ec->frame);
ec->changed = ec->changes.visible;
if (ec->changes.visible) EC_CHANGED(ec);
if (!e_client_util_desk_visible(ec, e_desk_current_get(ec->zone)))
evas_object_hide(ec->frame);
}
}
}
@ -2396,7 +2399,7 @@ e_client_new(E_Pixmap *cp, int first_map, int internal)
if (ec->override)
_e_client_zone_update(ec);
else
else if (!ec->desk)
e_client_desk_set(ec, e_desk_current_get(e_zone_current_get()));
ec->icccm.title = NULL;
@ -2562,7 +2565,8 @@ e_client_desk_set(E_Client *ec, E_Desk *desk)
if (ec->fullscreen)
{
ec->desk->fullscreen_clients = eina_list_remove(ec->desk->fullscreen_clients, ec);
if (ec->desk)
ec->desk->fullscreen_clients = eina_list_remove(ec->desk->fullscreen_clients, ec);
desk->fullscreen_clients = eina_list_append(desk->fullscreen_clients, ec);
}
old_desk = ec->desk;
@ -2670,14 +2674,14 @@ E_API void
e_client_mouse_out(E_Client *ec, int x, int y)
{
if (comp_grabbed) return;
if (ec->fullscreen) return;
if (e_object_is_del(E_OBJECT(ec))) return;
if (ec->desk && ec->desk->animate_count) return;
if (e_pixmap_is_x(ec->pixmap) && E_INSIDE(x, y, ec->x, ec->y, ec->w, ec->h)) return;
ec->mouse.current.mx = x;
ec->mouse.current.my = y;
ec->mouse.in = 0;
if (ec->fullscreen) return;
if (e_object_is_del(E_OBJECT(ec))) return;
if ((!ec->iconic) && (!e_client_util_ignored_get(ec)))
e_focus_event_mouse_out(ec);
}
@ -2808,6 +2812,7 @@ e_client_mouse_move(E_Client *ec, Evas_Point *output)
{
EINA_SAFETY_ON_NULL_RETURN(ec);
if (ec->iconic || e_client_util_ignored_get(ec)) return;
if ((ec->mouse.current.mx == output->x) && (ec->mouse.current.my == output->y)) return;
ec->mouse.current.mx = output->x;
ec->mouse.current.my = output->y;
if (ec->moving)
@ -3011,7 +3016,10 @@ e_client_res_change_geometry_restore(E_Client *ec)
y = zy + zh - h;
evas_object_move(ec->frame, x, y);
if (w && h)
evas_object_resize(ec->frame, w, h);
{
e_client_resize_limit(ec, &w, &h);
evas_object_resize(ec->frame, w, h);
}
}
memcpy(&ec->pre_res_change, &pre_res_change, sizeof(pre_res_change));
}
@ -3398,7 +3406,8 @@ e_client_focused_set(E_Client *ec)
ec_unfocus->want_focus = ec_unfocus->focused = 0;
if (!e_object_is_del(E_OBJECT(ec_unfocus)))
e_focus_event_focus_out(ec_unfocus);
if (ec_unfocus->mouse.in && ec && (!e_client_util_is_popup(ec)))
if (ec_unfocus->mouse.in && ec && (!e_client_util_is_popup(ec)) &&
(e_config->focus_policy != E_FOCUS_CLICK) && e_config->pointer_slide)
e_client_mouse_out(ec_unfocus, ec_unfocus->x - 1, ec_unfocus->y - 1);
E_FREE_FUNC(ec_unfocus->raise_timer, ecore_timer_del);
@ -3804,6 +3813,10 @@ e_client_maximize(E_Client *ec, E_Maximize max)
EC_CHANGED(ec);
return;
}
if ((max & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN)
evas_object_smart_callback_call(ec->frame, "fullscreen", NULL);
else
evas_object_smart_callback_call(ec->frame, "maximize", NULL);
evas_object_smart_callback_call(ec->frame, "maximize_pre", &max);
if (!max) return;
override = ec->maximize_override;
@ -3813,24 +3826,31 @@ e_client_maximize(E_Client *ec, E_Maximize max)
if (!(ec->maximized & E_MAXIMIZE_HORIZONTAL))
{
/* Horizontal hasn't been set */
ec->saved.x = ec->client.x - ec->zone->x;
ec->saved.w = ec->client.w;
if (ec->changes.pos)
e_comp_object_frame_xy_adjust(ec->frame, ec->x, 0, &ec->saved.x, NULL);
else
ec->saved.x = ec->client.x;
ec->saved.x -= ec->zone->x;
if (ec->visible)
ec->saved.w = ec->client.w;
}
if (!(ec->maximized & E_MAXIMIZE_VERTICAL))
{
/* Vertical hasn't been set */
ec->saved.y = ec->client.y - ec->zone->y;
ec->saved.h = ec->client.h;
if (ec->changes.pos)
e_comp_object_frame_xy_adjust(ec->frame, 0, ec->y, NULL, &ec->saved.y);
else
ec->saved.y = ec->client.y;
ec->saved.y -= ec->zone->y;
if (ec->visible)
ec->saved.h = ec->client.h;
}
ec->saved.zone = ec->zone->num;
ec->saved.frame = e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame));
ec->maximize_override = 1;
if ((max & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN)
evas_object_smart_callback_call(ec->frame, "fullscreen", NULL);
else
evas_object_smart_callback_call(ec->frame, "maximize", NULL);
{
int x, y, w, h;
e_client_maximize_geometry_get(ec, max, &x, &y, &w, &h);
@ -3900,6 +3920,7 @@ e_client_unmaximize_geometry_get(const E_Client *ec, E_Maximize max, int *mx, in
E_API void
e_client_unmaximize(E_Client *ec, E_Maximize max)
{
E_Maximize unmax = max;
E_OBJECT_CHECK(ec);
E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
if (!ec->zone) return;
@ -3918,10 +3939,11 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
if ((ec->shaded) || (ec->shading)) return;
/* Remove directions not used */
max &= (ec->maximized & E_MAXIMIZE_DIRECTION);
evas_object_smart_callback_call(ec->frame, "unmaximize_pre", &max);
unmax &= (ec->maximized & E_MAXIMIZE_DIRECTION);
evas_object_smart_callback_call(ec->frame, "unmaximize_pre", &unmax);
/* Can only remove existing maximization directions */
if (!max) return;
if ((!unmax) && (!ec->need_fullscreen)) return;
if (!unmax) unmax = max & (ec->maximized & E_MAXIMIZE_DIRECTION);
if (ec->maximized & E_MAXIMIZE_TYPE)
{
ec->pre_res_change.valid = 0;
@ -3950,24 +3972,27 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
{
int w, h, x, y;
Eina_Bool horiz = EINA_FALSE, vert = EINA_FALSE;
Eina_Bool fullscreen = !!eina_list_data_find(ec->desk->fullscreen_clients, ec);
e_client_unmaximize_geometry_get(ec, max, &x, &y, &w, &h);
if (max & E_MAXIMIZE_VERTICAL)
e_client_unmaximize_geometry_get(ec, unmax, &x, &y, &w, &h);
if (unmax & E_MAXIMIZE_VERTICAL)
{
/* Remove vertical */
vert = EINA_TRUE;
if ((max & E_MAXIMIZE_VERTICAL) == E_MAXIMIZE_VERTICAL)
if ((unmax & E_MAXIMIZE_VERTICAL) == E_MAXIMIZE_VERTICAL)
{
if ((ec->maximized & E_MAXIMIZE_LEFT) == E_MAXIMIZE_LEFT)
ec->maximized &= ~E_MAXIMIZE_LEFT;
if ((ec->maximized & E_MAXIMIZE_RIGHT) == E_MAXIMIZE_RIGHT)
ec->maximized &= ~E_MAXIMIZE_RIGHT;
ec->maximized &= ~E_MAXIMIZE_VERTICAL;
ec->maximized &= ~E_MAXIMIZE_LEFT;
ec->maximized &= ~E_MAXIMIZE_RIGHT;
}
if ((max & E_MAXIMIZE_LEFT) == E_MAXIMIZE_LEFT)
if ((unmax & E_MAXIMIZE_LEFT) == E_MAXIMIZE_LEFT)
ec->maximized &= ~E_MAXIMIZE_LEFT;
if ((max & E_MAXIMIZE_RIGHT) == E_MAXIMIZE_RIGHT)
if ((unmax & E_MAXIMIZE_RIGHT) == E_MAXIMIZE_RIGHT)
ec->maximized &= ~E_MAXIMIZE_RIGHT;
}
if (max & E_MAXIMIZE_HORIZONTAL)
if (unmax & E_MAXIMIZE_HORIZONTAL)
{
/* Remove horizontal */
horiz = EINA_TRUE;
@ -3982,14 +4007,17 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
}
if (e_config->window_maximize_animate && (!ec->maximize_anims_disabled))
ec->maximize_override = 1;
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
e_client_resize_limit(ec, &w, &h);
if (!fullscreen)
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
if (ec->saved.frame &&
(e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame))))
{
e_comp_object_frame_xy_adjust(ec->frame, x, y, &x, &y);
e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h);
}
e_client_resize_limit(ec, &w, &h);
if (fullscreen)
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
if (!_e_client_maximize_run(ec, x, y, w, h))
ec->maximize_override = 0;
if (vert)
@ -4018,13 +4046,14 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
if ((ec->shaded) || (ec->shading) || ec->fullscreen) return;
if ((!e_config->allow_above_fullscreen) && (!ec->desk->visible)) return;
if (ec->new_client)
{
ec->need_fullscreen = 1;
return;
}
ec->need_fullscreen = 1;
if (ec->new_client) return;
if (e_comp->nocomp_ec && (ec->desk == e_comp->nocomp_ec->desk))
e_comp->nocomp_ec = ec;
{
e_object_unref(E_OBJECT(e_comp->nocomp_ec));
e_object_ref(E_OBJECT(ec));
e_comp->nocomp_ec = ec;
}
ec->desk->fullscreen_clients = eina_list_append(ec->desk->fullscreen_clients, ec);
ec->pre_res_change.valid = 0;
@ -4037,18 +4066,34 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
}
else
{
ec->saved.x = ec->client.x - ec->zone->x;
ec->saved.y = ec->client.y - ec->zone->y;
ec->saved.w = ec->client.w;
ec->saved.h = ec->client.h;
if (ec->changes.pos)
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &ec->saved.x, &ec->saved.y);
else
{
ec->saved.x = ec->client.x;
ec->saved.y = ec->client.y;
}
ec->saved.x -= ec->zone->x;
ec->saved.y -= ec->zone->y;
if (ec->visible)
{
ec->saved.w = ec->client.w;
ec->saved.h = ec->client.h;
}
}
E_FREE_FUNC(ec->agent, evas_object_del);
ec->saved.maximized = ec->maximized;
ec->saved.zone = ec->zone->num;
ec->saved.frame = e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame));
if (ec->maximized)
{
Eina_Bool maximize_anims_disabled = ec->maximize_anims_disabled;
ec->maximize_anims_disabled = 1;
e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
ec->maximize_anims_disabled = maximize_anims_disabled;
ec->saved.x = x;
ec->saved.y = y;
ec->saved.w = w;
@ -4089,6 +4134,7 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
_e_client_event_simple(ec, E_EVENT_CLIENT_FULLSCREEN);
e_remember_update(ec);
ec->need_fullscreen = 0;
}
E_API void
@ -4123,8 +4169,14 @@ e_client_unfullscreen(E_Client *ec)
ec->saved.frame = 0;
if (ec->saved.maximized)
e_client_maximize(ec, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
ec->saved.maximized);
{
Eina_Bool maximize_anims_disabled = ec->maximize_anims_disabled;
ec->changes.size = 0;
ec->maximize_anims_disabled = 1;
e_client_maximize(ec,
(e_config->maximize_policy & E_MAXIMIZE_TYPE) | ec->saved.maximized);
ec->maximize_anims_disabled = maximize_anims_disabled;
}
evas_object_layer_set(ec->frame, ec->saved.layer);
@ -4247,6 +4299,8 @@ e_client_stick(E_Client *ec)
if (ec->sticky) return;
desk = ec->desk;
ec->desk = NULL;
if (desk && ec->fullscreen)
desk->fullscreen_clients = eina_list_remove(desk->fullscreen_clients, ec);
ec->sticky = 1;
ec->hidden = 0;
e_hints_window_sticky_set(ec, 1);
@ -4281,6 +4335,8 @@ e_client_unstick(E_Client *ec)
/* Set the desk before we unstick the client */
if (!ec->sticky) return;
desk = e_desk_current_get(ec->zone);
if (ec->desk && ec->fullscreen)
ec->desk->fullscreen_clients = eina_list_remove(ec->desk->fullscreen_clients, ec);
ec->desk = NULL;
ec->hidden = ec->sticky = 0;
e_hints_window_sticky_set(ec, 0);
@ -4333,16 +4389,18 @@ e_client_border_set(E_Client *ec, const char *name)
E_OBJECT_CHECK_RETURN(ec, EINA_FALSE);
E_OBJECT_TYPE_CHECK_RETURN(ec, E_CLIENT_TYPE, EINA_FALSE);
if (!e_comp_object_frame_allowed(ec->frame)) return EINA_FALSE;
if ((!e_comp_object_frame_allowed(ec->frame)) && (!e_comp_object_frame_exists(ec->frame)))
return EINA_FALSE;
if (ec->border.changed)
CRI("CALLING WHEN border.changed SET!");
if (!e_util_strcmp(ec->border.name, name)) return EINA_TRUE;
if (ec->mwm.borderless && name && strcmp(name, "borderless"))
if (eina_streq(ec->border.name, name)) return EINA_TRUE;
if (ec->mwm.borderless && (!eina_streq(name, "borderless")))
{
e_util_dialog_show(_("Client Error!"), _("Something has attempted to set a border when it shouldn't! Report this!"));
CRI("border change attempted for MWM borderless client!");
}
if ((!ec->border.name) && eina_streq(name, "borderless")) return EINA_TRUE;
pborder = ec->border.name;
ec->border.name = eina_stringshare_add(name);
if (e_comp_object_frame_theme_set(ec->frame, name))
@ -4399,7 +4457,7 @@ e_client_act_resize_keyboard(E_Client *ec)
EINA_SAFETY_ON_NULL_RETURN(ec);
if (!ec->zone) return;
ec->resize_mode = E_POINTER_RESIZE_TL;
ec->resize_mode = E_POINTER_RESIZE_BR;
ec->keyboard_resizing = 1;
if (!e_client_resize_begin(ec))
{
@ -4578,6 +4636,7 @@ e_client_act_kill_begin(E_Client *ec)
if (!ec->zone) return;
if (ec->internal) return;
if (ec->lock_close) return;
if (ec->netwm.pid == getpid()) return;
if ((ec->netwm.pid > 1) && (e_config->kill_process))
{
kill(ec->netwm.pid, SIGINT);
@ -4740,6 +4799,11 @@ e_client_resize_begin(E_Client *ec)
(ec->fullscreen) || (ec->lock_user_size))
goto error;
if (!_e_client_action_input_win_new()) goto error;
if (!ec->lock_user_stacking)
{
if (e_config->border_raise_on_mouse_action)
evas_object_raise(ec->frame);
}
ecresize = ec;
_e_client_hook_call(E_CLIENT_HOOK_RESIZE_BEGIN, ec);
if (!e_client_util_resizing_get(ec))
@ -4748,11 +4812,7 @@ e_client_resize_begin(E_Client *ec)
_e_client_action_input_win_del();
return EINA_FALSE;
}
if (!ec->lock_user_stacking)
{
if (e_config->border_raise_on_mouse_action)
evas_object_raise(ec->frame);
}
E_FREE_FUNC(ec->raise_timer, ecore_timer_del);
return EINA_TRUE;
error:
ec->resize_mode = E_POINTER_RESIZE_NONE;
@ -4782,6 +4842,7 @@ e_client_signal_move_begin(E_Client *ec, const char *sig, const char *src EINA_U
if (e_client_util_resizing_get(ec) || (ec->moving)) return;
_e_client_moveinfo_gather(ec, sig);
if (!_e_client_move_begin(ec)) return;
_e_client_action_init(ec);
e_pointer_mode_push(ec, E_POINTER_MOVE);
e_zone_edge_disable();
}
@ -4796,6 +4857,7 @@ e_client_signal_move_end(E_Client *ec, const char *sig EINA_UNUSED, const char *
_e_client_move_end(ec);
e_zone_edge_enable();
e_zone_flip_coords_handle(ec->zone, -1, -1);
_e_client_action_finish();
}
E_API void
@ -4843,6 +4905,7 @@ e_client_signal_resize_begin(E_Client *ec, const char *dir, const char *sig, con
_e_client_moveinfo_gather(ec, sig);
if (!e_client_resize_begin(ec))
return;
_e_client_action_init(ec);
e_pointer_mode_push(ec, ec->resize_mode);
}
@ -4856,6 +4919,7 @@ e_client_signal_resize_end(E_Client *ec, const char *dir EINA_UNUSED, const char
_e_client_resize_end(ec);
ec->changes.reset_gravity = 1;
EC_CHANGED(ec);
_e_client_action_finish();
}
////////////////////////////////////////////

View File

@ -4,7 +4,6 @@
#endif
#define OVER_FLOW 1
//#define SHAPE_DEBUG
//#define BORDER_ZOOMAPS
//////////////////////////////////////////////////////////////////////////
//
@ -33,6 +32,7 @@ static E_Config_DD *conf_match_edd = NULL;
static Ecore_Timer *action_timeout = NULL;
static Eina_Bool gl_avail = EINA_FALSE;
static Eina_Bool shape_debug = EINA_FALSE;
static double ecore_frametime = 0;
@ -41,6 +41,7 @@ static int _e_comp_log_dom = -1;
E_API int E_EVENT_COMPOSITOR_RESIZE = -1;
E_API int E_EVENT_COMPOSITOR_DISABLE = -1;
E_API int E_EVENT_COMPOSITOR_ENABLE = -1;
E_API int E_EVENT_COMPOSITOR_XWAYLAND_INIT = -1;
//////////////////////////////////////////////////////////////////////////
#undef DBG
@ -49,33 +50,17 @@ E_API int E_EVENT_COMPOSITOR_ENABLE = -1;
#undef ERR
#undef CRI
#if 1
# ifdef SHAPE_DEBUG
# define SHAPE_DBG(...) EINA_LOG_DOM_DBG(_e_comp_log_dom, __VA_ARGS__)
# define SHAPE_INF(...) EINA_LOG_DOM_INFO(_e_comp_log_dom, __VA_ARGS__)
# define SHAPE_WRN(...) EINA_LOG_DOM_WARN(_e_comp_log_dom, __VA_ARGS__)
# define SHAPE_ERR(...) EINA_LOG_DOM_ERR(_e_comp_log_dom, __VA_ARGS__)
# define SHAPE_CRI(...) EINA_LOG_DOM_CRIT(_e_comp_log_dom, __VA_ARGS__)
# else
# define SHAPE_DBG(f, x ...)
# define SHAPE_INF(f, x ...)
# define SHAPE_WRN(f, x ...)
# define SHAPE_ERR(f, x ...)
# define SHAPE_CRI(f, x ...)
# endif
#define SHAPE_DBG(...) do { if (shape_debug) EINA_LOG_DOM_DBG(_e_comp_log_dom, __VA_ARGS__); } while (0)
#define SHAPE_INF(...) do { if (shape_debug) EINA_LOG_DOM_INFO(_e_comp_log_dom, __VA_ARGS__); } while (0)
#define SHAPE_WRN(...) do { if (shape_debug) EINA_LOG_DOM_WARN(_e_comp_log_dom, __VA_ARGS__); } while (0)
#define SHAPE_ERR(...) do { if (shape_debug) EINA_LOG_DOM_ERR(_e_comp_log_dom, __VA_ARGS__); } while (0)
#define SHAPE_CRI(...) do { if (shape_debug) EINA_LOG_DOM_CRIT(_e_comp_log_dom, __VA_ARGS__); } while (0)
#define DBG(...) EINA_LOG_DOM_DBG(_e_comp_log_dom, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_e_comp_log_dom, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_e_comp_log_dom, __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR(_e_comp_log_dom, __VA_ARGS__)
#define CRI(...) EINA_LOG_DOM_CRIT(_e_comp_log_dom, __VA_ARGS__)
#else
#define DBG(f, x ...)
#define INF(f, x ...)
#define WRN(f, x ...)
#define ERR(f, x ...)
#define CRI(f, x ...)
#endif
static Eina_Bool
_e_comp_visible_object_clip_is(Evas_Object *obj)
@ -236,6 +221,7 @@ _e_comp_cb_nocomp_begin(void)
ecf = _e_comp_fullscreen_check();
if (!ecf) return;
e_object_ref(E_OBJECT(ecf));
e_comp->nocomp_ec = ecf;
E_CLIENT_FOREACH(ec)
if (ec != ecf) e_client_redirected_set(ec, 0);
@ -327,16 +313,19 @@ _e_comp_client_update(E_Client *ec)
{
e_pixmap_image_clear(ec->pixmap, 0);
e_comp_object_render_update_del(ec->frame); //clear update
if (ec->changes.visible && (!evas_object_visible_get(ec->frame)))
evas_object_show(ec->frame);
}
else if (!e_pixmap_size_get(ec->pixmap, NULL, NULL))
{
WRN("FAIL %p", ec);
e_comp_object_redirected_set(ec->frame, 0);
if (e_pixmap_failures_get(ec->pixmap) < 3)
if (e_pixmap_failures_get(ec->pixmap) > 3)
e_comp_object_render_update_add(ec->frame);
}
}
if ((!e_comp->saver) && e_pixmap_size_get(ec->pixmap, &pw, &ph))
if (!(e_comp->saver && ecore_evas_manual_render_get(e_comp->ee)) &&
e_pixmap_size_get(ec->pixmap, &pw, &ph))
{
//INF("PX DIRTY: PX(%dx%d) CLI(%dx%d)", pw, ph, ec->client.w, ec->client.h);
e_pixmap_image_refresh(ec->pixmap);
@ -369,7 +358,7 @@ _e_comp_nocomp_end(void)
evas_object_layer_set(e_comp->nocomp_ec->frame, layer);
e_comp->nocomp_ec->fullscreen = fs;
}
e_comp->nocomp_ec = NULL;
E_FREE_FUNC(e_comp->nocomp_ec, e_object_unref);
}
static Eina_Bool
@ -391,6 +380,7 @@ _e_comp_cb_update(void)
if (e_comp->grab_cb) e_comp->grab_cb();
e_comp->grabbed = 1;
}
e_comp->updating = 1;
l = e_comp->updates;
e_comp->updates = NULL;
EINA_LIST_FREE(l, ec)
@ -399,6 +389,7 @@ _e_comp_cb_update(void)
e_comp_object_render_update_del(ec->frame);
_e_comp_client_update(ec);
}
e_comp->updating = 0;
_e_comp_fps_update();
if (conf->fps_show)
{
@ -552,7 +543,6 @@ _e_comp_cb_animator(void *data EINA_UNUSED)
//////////////////////////////////////////////////////////////////////////
#ifdef SHAPE_DEBUG
static void
_e_comp_shape_debug_rect(Eina_Rectangle *rect, E_Color *color)
{
@ -566,14 +556,13 @@ _e_comp_shape_debug_rect(Eina_Rectangle *rect, E_Color *color)
evas_object_color_set(o, 0, (color->g += COLOR_INCREMENT), 0, 255);
else
evas_object_color_set(o, 0, 0, (color->b += COLOR_INCREMENT), 255);
evas_object_repeat_events_set(o, 1);
evas_object_pass_events_set(o, 1);
evas_object_layer_set(o, E_LAYER_MENU - 1);
evas_object_move(o, rect->x, rect->y);
evas_object_resize(o, rect->w, rect->h);
e_comp->debug_rects = eina_list_append(e_comp->debug_rects, o);
evas_object_show(o);
}
#endif
static Eina_Bool
_e_comp_shapes_update_object_checker_function_thingy(Evas_Object *o)
@ -594,11 +583,7 @@ _e_comp_shapes_update_object_checker_function_thingy(Evas_Object *o)
}
static void
#ifdef SHAPE_DEBUG
_e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb, Eina_List **rl)
#else
_e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb)
#endif
{
int x, y, w, h;
@ -613,9 +598,8 @@ _e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb
SHAPE_DBG("SKIPPING SHAPE FOR %p", ec);
return;
}
#ifdef SHAPE_DEBUG
INF("COMP EC: %p", ec);
#endif
SHAPE_INF("COMP EC: %p", ec);
if (ec->shaped || ec->shaped_input)
{
@ -668,7 +652,7 @@ _e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb
return;
}
#ifdef SHAPE_DEBUG
if (shape_debug)
{
Eina_Rectangle *r;
@ -676,7 +660,6 @@ _e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb
EINA_RECTANGLE_SET(r, ec->client.x, ec->client.y, ec->client.w, ec->client.h);
*rl = eina_list_append(*rl, r);
}
#endif
if (!e_client_util_borderless(ec))
{
@ -700,11 +683,18 @@ _e_comp_shapes_update_object_shape_comp_helper(Evas_Object *o, Eina_Tiler *tb)
int x, y, w, h;
/* ignore hidden and pass-event objects */
if ((!evas_object_visible_get(o)) || evas_object_pass_events_get(o) || evas_object_repeat_events_get(o)) return;
if ((!evas_object_visible_get(o)) || evas_object_pass_events_get(o)) return;
if (evas_object_repeat_events_get(o) && (!evas_object_data_get(o, "comp_repeat"))) return;
/* ignore canvas objects */
if (_e_comp_shapes_update_object_checker_function_thingy(o)) return;
SHAPE_INF("OBJ: %p:%s", o, evas_object_name_get(o));
SHAPE_INF("OBJ: %p:%s", o, evas_object_name_get(o) ?: evas_object_type_get(o));
evas_object_geometry_get(o, &x, &y, &w, &h);
if ((!w) && (!h) && elm_object_widget_check(o))
{
Evas_Object *content = elm_object_content_get(o);
if (content)
evas_object_geometry_get(content, &x, &y, &w, &h);
}
eina_tiler_rect_add(tb, &(Eina_Rectangle){x, y, w, h});
SHAPE_INF("ADD: %d,%d@%dx%d", x, y, w, h);
}
@ -720,13 +710,11 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED)
Eina_Rectangle *exr;
unsigned int i, tile_count;
Ecore_Window win;
#ifdef SHAPE_DEBUG
Eina_Rectangle *r;
Eina_List *rl = NULL;
E_Color color = {0};
INF("---------------------");
#endif
SHAPE_INF("---------------------");
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
win = e_comp->win;
@ -753,9 +741,7 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED)
ec = e_comp_object_client_get(o);
if (ec && (!ec->no_shape_cut))
_e_comp_shapes_update_comp_client_shape_comp_helper(ec, tb
#ifdef SHAPE_DEBUG
,&rl
#endif
);
else
@ -768,30 +754,32 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED)
i = 0;
EINA_ITERATOR_FOREACH(ti, tr)
{
exr[i++] = *(Eina_Rectangle*)((char*)tr);
exr[i++] = *((Eina_Rectangle *)tr);
if (i == tile_count - 1)
exr = realloc(exr, sizeof(Eina_Rectangle) * (tile_count *= 2));
#ifdef SHAPE_DEBUG
Eina_List *l;
_e_comp_shape_debug_rect(&exr[i - 1], &color);
INF("%d,%d @ %dx%d", exr[i - 1].x, exr[i - 1].y, exr[i - 1].w, exr[i - 1].h);
EINA_LIST_FOREACH(rl, l, r)
if (shape_debug)
{
if (E_INTERSECTS(r->x, r->y, r->w, r->h, tr->x, tr->y, tr->w, tr->h))
ERR("POSSIBLE RECT FAIL!!!!");
Eina_List *l;
_e_comp_shape_debug_rect(&exr[i - 1], &color);
SHAPE_INF("%d,%d @ %dx%d", exr[i - 1].x, exr[i - 1].y, exr[i - 1].w, exr[i - 1].h);
EINA_LIST_FOREACH(rl, l, r)
{
if (E_INTERSECTS(r->x, r->y, r->w, r->h, tr->x, tr->y, tr->w, tr->h))
SHAPE_ERR("POSSIBLE RECT FAIL!!!!");
}
}
#endif
}
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_shape_input_rectangles_set(win, (Ecore_X_Rectangle*)exr, i);
#endif
#ifdef SHAPE_DEBUG
E_FREE_LIST(rl, free);
printf("\n");
#endif
if (shape_debug)
{
E_FREE_LIST(rl, free);
printf("\n");
}
free(exr);
eina_iterator_free(ti);
eina_tiler_free(tb);
@ -843,6 +831,16 @@ _e_comp_free(E_Comp *c)
e_comp_canvas_clear();
e_randr2_shutdown();
#ifdef HAVE_WAYLAND
if (c->comp_type == E_PIXMAP_TYPE_WL)
e_comp_wl_shutdown();
#endif
#ifndef HAVE_WAYLAND_ONLY
if (e_comp_util_has_x())
e_comp_x_shutdown();
#endif
ecore_evas_free(c->ee);
eina_stringshare_del(c->name);
@ -939,7 +937,7 @@ _e_comp_act_opacity_obj_finder(E_Object *obj)
switch (obj->type)
{
case E_CLIENT_TYPE:
return ((E_Client*)obj)->frame;
return ((E_Client *)(void *)obj)->frame;
case E_ZONE_TYPE:
case E_COMP_TYPE:
case E_MENU_TYPE:
@ -947,7 +945,7 @@ _e_comp_act_opacity_obj_finder(E_Object *obj)
return ec ? ec->frame : NULL;
}
if (e_obj_is_win(obj))
return e_win_client_get((void*)obj)->frame;
return e_win_client_get((void *)obj)->frame;
ec = e_client_focused_get();
return ec ? ec->frame : NULL;
}
@ -1006,18 +1004,25 @@ _e_comp_resize(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, vo
e_comp_canvas_update();
}
static void
_e_comp_delete_request()
{
e_sys_action_do(E_SYS_LOGOUT, NULL);
}
EINTERN Eina_Bool
e_comp_init(void)
{
_e_comp_log_dom = eina_log_domain_register("e_comp", EINA_COLOR_YELLOW);
eina_log_domain_level_set("e_comp", EINA_LOG_LEVEL_INFO);
ecore_frametime = ecore_animator_frametime_get();
shape_debug = !!getenv("E_SHAPE_DEBUG");
E_EVENT_COMPOSITOR_RESIZE = ecore_event_type_new();
E_EVENT_COMP_OBJECT_ADD = ecore_event_type_new();
E_EVENT_COMPOSITOR_DISABLE = ecore_event_type_new();
E_EVENT_COMPOSITOR_ENABLE = ecore_event_type_new();
E_EVENT_COMPOSITOR_XWAYLAND_INIT = ecore_event_type_new();
ignores = eina_hash_pointer_new(NULL);
@ -1161,6 +1166,9 @@ out:
e_comp->elm = elm_win_fake_add(e_comp->ee);
evas_object_event_callback_add(e_comp->elm, EVAS_CALLBACK_RESIZE, _e_comp_resize, NULL);
elm_win_fullscreen_set(e_comp->elm, 1);
elm_win_autodel_set(e_comp->elm, 1);
if (!e_comp->screen)
evas_object_smart_callback_add(e_comp->elm, "delete,request", _e_comp_delete_request, NULL);
ecore_evas_focus_set(e_comp->ee, 0);
ecore_evas_focus_set(e_comp->ee, 1);
evas_object_show(e_comp->elm);
@ -1615,7 +1623,7 @@ e_comp_e_object_layer_get(const E_Object *obj)
switch (obj->type)
{
case E_GADCON_CLIENT_TYPE:
gc = ((E_Gadcon_Client *)(obj))->gadcon;
gc = ((E_Gadcon_Client *)(void *)(obj))->gadcon;
EINA_SAFETY_ON_NULL_RETURN_VAL(gc, 0);
/* no break */
case E_GADCON_TYPE:
@ -1628,7 +1636,7 @@ e_comp_e_object_layer_get(const E_Object *obj)
return E_LAYER_DESKTOP;
case E_CLIENT_TYPE:
return ((E_Client *)(obj))->layer;
return ((E_Client *)(void *)(obj))->layer;
/* FIXME: add more types as needed */
default:
@ -1699,7 +1707,7 @@ e_comp_ungrab_input(Eina_Bool mouse, Eina_Bool kbd)
{
E_Client *ec = e_client_focused_get();
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
if ((!e_object_is_del(E_OBJECT(ec))) && (e_comp->comp_type == E_PIXMAP_TYPE_WL))
{
Eina_Bool mouse_in = ec->mouse.in;
int x, y;

View File

@ -53,6 +53,7 @@ typedef enum _E_Layer
extern E_API int E_EVENT_COMPOSITOR_DISABLE;
extern E_API int E_EVENT_COMPOSITOR_ENABLE;
extern E_API int E_EVENT_COMPOSITOR_XWAYLAND_INIT;
typedef void (*E_Comp_Cb)(void);
@ -70,68 +71,72 @@ typedef struct E_Comp_Screen_Iface
void (*apply)(void);
/* set dpms (on, standby, suspend, off) */
void (*dpms)(int);
/* is key event eaten */
Eina_Bool (*key_down)(Ecore_Event_Key *ev);
/* is key event eaten */
Eina_Bool (*key_up)(Ecore_Event_Key *ev);
} E_Comp_Screen_Iface;
struct _E_Comp
{
E_Object e_obj_inherit;
int w, h;
int w, h; //overall size of compositor
Ecore_Window win; // input overlay
Ecore_Window root;
Ecore_Evas *ee;
Ecore_Window ee_win;
Evas_Object *elm;
Evas *evas;
Evas_Object *bg_blank_object;
Eina_List *zones;
Ecore_Window root; //x11 root window
Ecore_Evas *ee; //canvas
Ecore_Window ee_win; //canvas window
Evas_Object *elm; //elm win base
Evas *evas; //canvas
Evas_Object *bg_blank_object; //black blocker rect to cover background artifacts
Eina_List *zones; //list of E_Zones
E_Pointer *pointer;
Eina_List *clients;
unsigned int new_clients;
Eina_List *clients; //list of all E_Clients
unsigned int new_clients; //number of clients with new_client set
Eina_List *pre_render_cbs; /* E_Comp_Cb */
E_Comp_X_Data *x_comp_data;
E_Comp_Wl_Data *wl_comp_data;
E_Comp_X_Data *x_comp_data; //x11 compositor-specific data
E_Comp_Wl_Data *wl_comp_data; //wl compositor-specific data
E_Pixmap_Type comp_type; //for determining X/Wayland/
E_Pixmap_Type comp_type; //for determining X/Wayland primary type
Eina_Stringshare *name;
struct {
Ecore_Window win;
Evas_Object *obj;
Ecore_Window win; //x11 layer stacking window
Evas_Object *obj; //layer stacking object
//Eina_Inlist *objs; /* E_Comp_Object; NOT to be exposed; seems pointless? */
Eina_Inlist *clients; /* E_Client, bottom to top */
unsigned int clients_count;
unsigned int clients_count; //count of clients on layer
} layers[E_LAYER_COUNT];
struct
struct //autoclose handler for e_comp_object_util_autoclose
{
Evas_Object *rect;
Evas_Object *obj;
Evas_Object *rect; //autoclose blocker rect
Evas_Object *obj; //autoclose object
Ecore_Event_Handler *key_handler;
E_Comp_Object_Autoclose_Cb del_cb;
E_Comp_Object_Key_Cb key_cb;
void *data;
E_Comp_Object_Autoclose_Cb del_cb; //cb to call on autoclose delete
E_Comp_Object_Key_Cb key_cb; //cb to call on key press
void *data; //user data
} autoclose;
E_Comp_Screen_Iface *screen;
Eina_List *debug_rects;
Eina_List *ignore_wins;
Eina_List *debug_rects; //used when SHAPE_DEBUG is defined in e_comp.c
Eina_List *ignore_wins; //windows to be ignored by the compositor
Eina_List *updates;
Eina_List *post_updates;
Ecore_Animator *render_animator;
Ecore_Job *shape_job;
Ecore_Job *update_job;
Eina_List *updates; //E_Clients with render updates
Eina_List *post_updates; //E_Clients awaiting post render flushing
Ecore_Animator *render_animator; //animator for fixed time rendering
Ecore_Job *shape_job; //job to update x11 input shapes
Ecore_Job *update_job; //job to trigger render updates
Evas_Object *fps_bg;
Evas_Object *fps_fg;
Ecore_Job *screen_job;
Ecore_Timer *nocomp_delay_timer;
Ecore_Timer *nocomp_override_timer;
int animating;
double frametimes[122];
Ecore_Timer *nocomp_delay_timer; //delay before activating nocomp in x11
Ecore_Timer *nocomp_override_timer; //delay before overriding nocomp in x11
int animating; //number of animating comp objects
double frametimes[122]; //used for calculating fps
int frameskip;
int nocomp_override; //number of times nocomp override has been requested
@ -139,24 +144,25 @@ struct _E_Comp
int block_count; //number of times block window has been requested
Ecore_Window cm_selection; //FIXME: move to comp_x ?
E_Client *nocomp_ec;
E_Client *nocomp_ec; //window that triggered nocomp mode
int depth;
unsigned int input_key_grabs;
unsigned int input_mouse_grabs;
unsigned int input_key_grabs; //number of active compositor key grabs
unsigned int input_mouse_grabs; //number of active compositor mouse grabs
E_Comp_Cb grab_cb;
E_Comp_Cb bindings_grab_cb;
E_Comp_Cb bindings_ungrab_cb;
E_Comp_Cb grab_cb; //callback for grabbing the xserver
E_Comp_Cb bindings_grab_cb; //callback for triggering binding input grab
E_Comp_Cb bindings_ungrab_cb; //callback for triggering binding input ungrab
Eina_Bool gl : 1;
Eina_Bool grabbed : 1;
Eina_Bool nocomp : 1;
Eina_Bool nocomp_want : 1;
Eina_Bool saver : 1;
Eina_Bool shape_queue_blocked : 1;
Eina_Bool gl : 1; //gl is active
Eina_Bool grabbed : 1; //xserver is grabbed
Eina_Bool nocomp : 1; //nocomp is active
Eina_Bool nocomp_want : 1; //nocomp is pending
Eina_Bool saver : 1; //screensaver is active
Eina_Bool shape_queue_blocked : 1; //x11 input shape updates are blocked
Eina_Bool rendering : 1; // we've received a pre-render callback but no post-render yet.
Eina_Bool updating : 1; // running client updates
};

View File

@ -118,11 +118,13 @@ _key_down(int ctx, Ecore_Event_Key *ev)
*/
if ((!ec) || (ev->event_window != e_comp->ee_win)) return ECORE_CALLBACK_RENEW;
}
return !e_bindings_key_down_event_handle(ctx, E_OBJECT(e_comp), ev)
return ((!e_comp->screen) ||
(!e_comp->screen->key_down) || (!e_comp->screen->key_down(ev))) &&
!e_bindings_key_down_event_handle(ctx, E_OBJECT(e_comp), ev)
#ifdef HAVE_WAYLAND
&& !e_comp_wl_key_down(ev)
&& !e_comp_wl_key_down(ev)
#endif
;
;
}
static Eina_Bool
@ -142,11 +144,13 @@ _key_up(int ctx, Ecore_Event_Key *ev)
{
e_screensaver_notidle();
if ((e_comp->comp_type == E_PIXMAP_TYPE_X) && (ev->event_window != e_comp->root)) return ECORE_CALLBACK_PASS_ON;
return !e_bindings_key_up_event_handle(ctx, E_OBJECT(e_comp), ev)
return ((!e_comp->screen) ||
(!e_comp->screen->key_up) || (!e_comp->screen->key_up(ev))) &&
!e_bindings_key_up_event_handle(ctx, E_OBJECT(e_comp), ev)
#ifdef HAVE_WAYLAND
&& !e_comp_wl_key_up(ev)
&& !e_comp_wl_key_up(ev)
#endif
;
;
}
static Eina_Bool
@ -240,6 +244,7 @@ _e_comp_cb_screensaver_on()
(e_config->desklock_post_screensaver_time,
_e_comp_cb_timer_post_screensaver_lock, NULL);
}
e_pointers_freeze_set(1);
return ECORE_CALLBACK_PASS_ON;
}
@ -248,6 +253,7 @@ _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);
e_pointers_freeze_set(0);
return ECORE_CALLBACK_PASS_ON;
}
////////////////////////////////////
@ -629,7 +635,10 @@ e_comp_canvas_update(void)
}
}
e_comp_canvas_zone_update(zone);
if (!starting)
e_bindings_edge_reset();
}
evas_object_resize(e_comp->bg_blank_object, e_comp->w, e_comp->h);
}
E_API void

View File

@ -65,16 +65,16 @@ struct _E_Comp_Match
const char *visibility_effect; // effect to use when showing and hiding
int primary_type; // Ecore_X_Window_Type - used for borders, overrides, first one found - ECORE_X_WINDOW_TYPE_UNKNOWN if not to be used
char borderless; // used for borders, 0 == dont use, 1 == borderless, -1 == not borderless
char dialog; // used for borders, 0 == don't use, 1 == dialog, -1 == not dialog
char accepts_focus; // used for borders, 0 == don't use, 1 == accepts focus, -1 == does not accept focus
char vkbd; // used for borders, 0 == don't use, 1 == is vkbd, -1 == not vkbd
char argb; // used for borders, overrides, popups, menus, 0 == don't use, 1 == is argb, -1 == not argb
char fullscreen; // used for borders, 0 == don't use, 1 == is fullscreen, -1 == not fullscreen
char modal; // used for borders, 0 == don't use, 1 == is modal, -1 == not modal
char focus; // used for setting focus state (on popups): 1 is focused, unset is use regular logic
char urgent; // used for setting urgent state (on popups): 1 is urgent, unset is use regular logic
char no_shadow; // set whether shadow is disabled
signed char borderless; // used for borders, 0 == dont use, 1 == borderless, -1 == not borderless
signed char dialog; // used for borders, 0 == don't use, 1 == dialog, -1 == not dialog
signed char accepts_focus; // used for borders, 0 == don't use, 1 == accepts focus, -1 == does not accept focus
signed char vkbd; // used for borders, 0 == don't use, 1 == is vkbd, -1 == not vkbd
signed char argb; // used for borders, overrides, popups, menus, 0 == don't use, 1 == is argb, -1 == not argb
signed char fullscreen; // used for borders, 0 == don't use, 1 == is fullscreen, -1 == not fullscreen
signed char modal; // used for borders, 0 == don't use, 1 == is modal, -1 == not modal
signed char focus; // used for setting focus state (on popups): 1 is focused, unset is use regular logic
signed char urgent; // used for setting urgent state (on popups): 1 is urgent, unset is use regular logic
signed char no_shadow; // set whether shadow is disabled
};
E_API void e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd);

View File

@ -48,15 +48,12 @@
/* enable along with display-specific damage INF calls to enable render tracing
* SLOW!
*/
#if 0
#define RENDER_DEBUG(...) INF(__VA_ARGS__)
#else
#define RENDER_DEBUG(...)
#endif
static int render_debug_enabled;
#define RENDER_DEBUG(...) do { if ((render_debug_enabled == 1) || ((render_debug_enabled == -1) && cw->ec->focused)) INF(__VA_ARGS__); } while (0)
typedef struct _E_Comp_Object
{
EINA_INLIST;
//EINA_INLIST;
int x, y, w, h; // geometry
Eina_Rectangle input_rect;
@ -103,7 +100,7 @@ typedef struct _E_Comp_Object
unsigned int animating; // it's busy animating
unsigned int failures; //number of consecutive e_pixmap_image_draw() failures
unsigned int force_visible; //number of visible obj_mirror objects
Eina_Bool delete_pending : 1; // delete pending
Eina_Bool deleted : 1; // deleted
Eina_Bool defer_hide : 1; // flag to get hide to work on deferred hide
Eina_Bool showing : 1; // object is currently in "show" animation
Eina_Bool visible : 1; // is visible
@ -234,9 +231,11 @@ _e_comp_object_cb_mirror_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
{
E_Comp_Object *cw = data;
if ((!cw->force_visible) && (!e_object_is_del(E_OBJECT(cw->ec))))
if ((!cw->force_visible) && (!cw->deleted) && (!e_object_is_del(E_OBJECT(cw->ec))))
evas_object_smart_callback_call(cw->smart_obj, "visibility_force", cw->ec);
cw->force_visible++;
if ((!cw->native) && cw->pending_updates && (!cw->update) && cw->real_hid)
e_comp_object_render(cw->smart_obj);
}
static void
@ -245,7 +244,7 @@ _e_comp_object_cb_mirror_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
E_Comp_Object *cw = data;
cw->force_visible--;
if ((!cw->force_visible) && (!e_object_is_del(E_OBJECT(cw->ec))))
if ((!cw->force_visible) && (!cw->deleted) && (!e_object_is_del(E_OBJECT(cw->ec))))
evas_object_smart_callback_call(cw->smart_obj, "visibility_normal", cw->ec);
}
@ -850,8 +849,8 @@ _e_comp_object_effect_visibility_start(E_Comp_Object *cw, Eina_Bool state)
ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
else
evas_pointer_canvas_xy_get(e_comp->evas, &x, &y);
x -= cw->x;
y -= cw->y;
x -= cw->ec->x;
y -= cw->ec->y;
if (cw->ec->zone)
zw = cw->ec->zone->w, zh = cw->ec->zone->h;
else
@ -862,8 +861,8 @@ _e_comp_object_effect_visibility_start(E_Comp_Object *cw, Eina_Bool state)
if (!zone) zone = e_zone_current_get();
zw = zone->w, zh = zone->h;
}
e_comp_object_effect_params_set(cw->smart_obj, 1, (int[]){cw->x, cw->y,
cw->w, cw->h, zw, zh, x, y}, 8);
e_comp_object_effect_params_set(cw->smart_obj, 1, (int[]){cw->ec->x, cw->ec->y,
cw->ec->w, cw->ec->h, zw, zh, x, y}, 8);
e_comp_object_effect_params_set(cw->smart_obj, 0, (int[]){state}, 1);
e_comp_object_effect_start(cw->smart_obj, _e_comp_object_done_defer, cw);
return EINA_TRUE;
@ -928,6 +927,19 @@ _e_comp_object_mirror_pixels_get(void *data, Evas_Object *obj)
return;
}
/* This is a big fat hack - ideally we're already on this list
* if the parent is visible, but there are some circumstances
* where a client receives damage while visible but its own pixels_get
* callback doesn't fire (new damage during the start frame of a desk
* switch animation).
* Thus we can't make this addition conditional on visibility or we can
* (under wayland at least) lose a frame callback and stop updating.
*
* e_comp_client_post_update_add() prevents clients from being
* on the list twice, so this is theoretically not harmful.
*/
e_comp_client_post_update_add(ec);
if (cw->native) return;
evas_object_image_data_set(obj, e_pixmap_image_data_get(cw->ec->pixmap));
@ -983,6 +995,15 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj)
msg2.val = id;
edje_object_message_send(cw->shobj, EDJE_MESSAGE_INT, 0, &msg2);
}
/* queue another render if client is still dirty; cannot refresh here. */
if (e_pixmap_dirty_get(ec->pixmap) && e_pixmap_size_get(ec->pixmap, &pw, &ph))
{
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
/* if updates for existing pixmap don't exist then avoid unsetting existing image */
if ((!cw->pending_updates) || eina_tiler_empty(cw->pending_updates)) return;
}
if (cw->native)
{
E_FREE_FUNC(cw->pending_updates, eina_tiler_free);
@ -995,12 +1016,10 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj)
e_comp_object_shape_apply(ec->frame);
ec->shape_changed = 0;
}
if (e_object_is_del(E_OBJECT(ec))) return;
/* shaped clients get precise mouse events to handle transparent pixels */
evas_object_precise_is_inside_set(cw->obj, ec->shaped || ec->shaped_input);
/* queue another render if client is still dirty; cannot refresh here. */
if (e_pixmap_dirty_get(ec->pixmap) && e_pixmap_size_get(ec->pixmap, &pw, &ph))
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
//INF("%p PX(%dx%d) EC(%dx%d) CW(%dx%d)", ec, pw, ph, ec->w, ec->h, cw->w, cw->h);
//e_comp_object_frame_wh_adjust(cw->smart_obj, pw, ph, &pw, &ph);
//if ((ec->w != pw) || (ec->h != ph))
@ -1016,7 +1035,7 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj)
/////////////////////////////////////////////
static void
_e_comp_object_internal_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_object_ssd_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
@ -1024,7 +1043,7 @@ _e_comp_object_internal_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *o
}
static void
_e_comp_object_internal_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_object_ssd_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
@ -1116,6 +1135,7 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
{
/* only update xy position of client to avoid invalid
* first damage region if it is not a new_client. */
cw->ec->placed = 1;
if (!cw->ec->shading)
{
cw->ec->client.x = ix;
@ -1134,6 +1154,8 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
E_Comp_Object *cw = data;
int pw = 0, ph = 0, fw, fh, iw, ih, prev_w, prev_h, x, y;
if ((w < 1) || (h < 1)) return;
/* if frame_object does not exist, client_inset indicates CSD.
* this means that ec->client matches cw->w/h, the opposite
* of SSD.
@ -1216,13 +1238,13 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
if ((!cw->ec->shading) && (!cw->ec->shaded))
{
/* client geom never changes when shading since the client is never altered */
//INF("%p: CUR(%dx%d) || REQ(%dx%d)", cw->ec, cw->ec->client.w, cw->ec->client.h, iw, ih);
INF("%p: CUR(%dx%d) || REQ(%dx%d)", cw->ec, cw->ec->client.w, cw->ec->client.h, iw, ih);
cw->ec->client.w = iw;
cw->ec->client.h = ih;
if ((cw->ec->client.w < 0) || (cw->ec->client.h < 0)) CRI("WTF");
}
if ((!cw->ec->input_only) && cw->redirected && (e_pixmap_dirty_get(cw->ec->pixmap) ||
(!e_pixmap_size_get(cw->ec->pixmap, &pw, &ph))))
if ((!cw->ec->input_only) && cw->redirected && (!cw->ec->shading) && (!cw->ec->shaded) &&
(e_pixmap_dirty_get(cw->ec->pixmap) || (!e_pixmap_size_get(cw->ec->pixmap, &pw, &ph))))
{
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
if (e_object_is_del(E_OBJECT(cw->ec))) return;
@ -1233,13 +1255,23 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
{
/* client can't be resized if its pixmap isn't usable, try again */
e_pixmap_dirty(cw->ec->pixmap);
e_comp_object_render_update_add(obj);
e_comp_render_queue();
if (e_comp->nocomp)
e_pixmap_refresh(cw->ec->pixmap);
else
{
e_comp_object_render_update_add(obj);
e_comp_render_queue();
}
}
cw->ec->changes.size = 1;
EC_CHANGED(cw->ec);
return;
}
if (e_pixmap_failures_get(cw->ec->pixmap) && (!cw->redirected))
{
e_comp_object_redirected_set(obj, 1);
return;
}
prev_w = cw->w, prev_h = cw->h;
e_comp_object_frame_wh_adjust(obj, 0, 0, &fw, &fh);
/* check shading and clamp to pixmap size for regular clients */
@ -1306,7 +1338,9 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
if (cw->ec->internal_elm_win && (!cw->ec->moving) && (!e_client_util_resizing_get(cw->ec)) &&
(!cw->ec->fullscreen) && (!cw->ec->maximized) &&
e_win_centered_get(cw->ec->internal_elm_win))
e_comp_object_util_center(obj);
{
e_comp_object_util_center(obj);
}
cw->force_move = 0;
}
@ -1626,7 +1660,7 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
{
if (cw->ec->iconic)
e_comp_object_signal_emit(obj, "e,action,iconify", "e");
else
if ((!cw->ec->iconic) || (cw->ec->iconic && (!cw->animating)))
{
e_comp_object_signal_emit(obj, "e,state,hidden", "e");
if (!cw->showing)
@ -1681,17 +1715,6 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
EC_CHANGED(cw->ec);
return;
}
if (cw->ec->input_only)
{
/* who cares */
cw->real_hid = 0;
evas_object_move(cw->smart_obj, cw->ec->x, cw->ec->y);
evas_object_resize(cw->smart_obj, cw->ec->w, cw->ec->h);
evas_object_show(cw->smart_obj);
return;
}
/* re-set geometry */
evas_object_move(cw->smart_obj, cw->ec->x, cw->ec->y);
/* ensure that some kind of frame calc has occurred if there's a frame */
if (e_pixmap_is_x(cw->ec->pixmap) && cw->frame_object &&
(cw->ec->h == cw->ec->client.h) && (cw->ec->w == cw->ec->client.w))
@ -1705,6 +1728,10 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
EC_CHANGED(cw->ec);
return;
}
/* re-set geometry */
if (cw->ec->placed)
evas_object_move(cw->smart_obj, cw->ec->x, cw->ec->y);
/* if pixmap not available, clear pixmap since we're going to fetch it again */
if (!e_pixmap_size_get(cw->ec->pixmap, &w, &h))
e_pixmap_clear(cw->ec->pixmap);
@ -1757,11 +1784,13 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
evas_object_name_set(cw->obj, "cw->obj");
evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
_e_comp_object_alpha_set(cw);
if (cw->ec->internal)
if (cw->frame_object)
{
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_IN, _e_comp_object_internal_mouse_in, cw);
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_OUT, _e_comp_object_internal_mouse_out, cw);
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_IN, _e_comp_object_ssd_mouse_in, cw);
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_OUT, _e_comp_object_ssd_mouse_out, cw);
}
#ifdef BORDER_ZOOMAPS
e_comp_object_zoomap_set(o, 1);
#else
@ -1785,7 +1814,7 @@ _e_comp_intercept_focus(void *data, Evas_Object *obj, Eina_Bool focus)
* expect us to emulate a look of focus but not actually set x input
* focus as we do - so simply abort any focus set on such windows */
/* be strict about accepting focus hint */
if (e_pixmap_is_x(ec->pixmap))
if (e_client_has_xwindow(ec))
{
/* be strict about accepting focus hint */
if ((!ec->icccm.accepts_focus) &&
@ -2050,12 +2079,32 @@ _e_comp_object_shade_animator(void *data)
}
static void
_e_comp_smart_cb_shading(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_smart_cb_shaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
if (!cw->ec) return; //NYI
E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
E_FREE_FUNC(cw->shade.anim, ecore_animator_del);
e_comp_object_signal_emit(cw->smart_obj, "e,state,shaded", "e");
cw->shade.start = -100;
cw->shade.dir = (E_Direction)event_info;
_e_comp_object_shade_animator(cw);
}
static void
_e_comp_smart_cb_shading(void *data, Evas_Object *obj, void *event_info)
{
E_Comp_Object *cw = data;
if (!cw->ec) return; //NYI
if (cw->shade.anim && EINA_DBL_EQ(cw->shade.val, 0.0))
{
cw->ec->shaded = 0;
_e_comp_smart_cb_shaded(data, obj, event_info);
return;
}
E_FREE_FUNC(cw->shade.anim, ecore_animator_del);
cw->shade.x = cw->x;
cw->shade.y = cw->y;
@ -2065,41 +2114,13 @@ _e_comp_smart_cb_shading(void *data, Evas_Object *obj EINA_UNUSED, void *event_i
cw->shade.anim = ecore_animator_add(_e_comp_object_shade_animator, cw);
}
static void
_e_comp_smart_cb_shaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
if (!cw->ec) return; //NYI
E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
e_comp_object_signal_emit(cw->smart_obj, "e,state,shaded", "e");
cw->shade.start = -100;
cw->shade.dir = (E_Direction)event_info;
_e_comp_object_shade_animator(cw);
}
static void
_e_comp_smart_cb_unshading(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
if (!cw->ec) return; //NYI
E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
cw->shade.dir = (E_Direction)event_info;
e_comp_object_signal_emit(cw->smart_obj, "e,state,unshading", "e");
cw->shade.start = ecore_loop_time_get();
cw->shade.anim = ecore_animator_add(_e_comp_object_shade_animator, cw);
}
static void
_e_comp_smart_cb_unshaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
if (!cw->ec) return; //NYI
E_FREE_FUNC(cw->shade.anim, ecore_timer_del);
E_FREE_FUNC(cw->shade.anim, ecore_animator_del);
cw->shade.dir = (E_Direction)event_info;
if (cw->shade.dir == E_DIRECTION_UP ||
@ -2118,6 +2139,26 @@ _e_comp_smart_cb_unshaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_
_e_comp_object_shade_animator(cw);
}
static void
_e_comp_smart_cb_unshading(void *data, Evas_Object *obj, void *event_info)
{
E_Comp_Object *cw = data;
if (!cw->ec) return; //NYI
if (cw->shade.anim && EINA_DBL_EQ(cw->shade.val, 0.0))
{
cw->ec->shaded = 1;
_e_comp_smart_cb_unshaded(data, obj, event_info);
return;
}
E_FREE_FUNC(cw->shade.anim, ecore_animator_del);
cw->shade.dir = (E_Direction)event_info;
e_comp_object_signal_emit(cw->smart_obj, "e,state,unshading", "e");
cw->shade.start = ecore_loop_time_get();
cw->shade.anim = ecore_animator_add(_e_comp_object_shade_animator, cw);
}
static void
_e_comp_smart_cb_maximize(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -2223,7 +2264,7 @@ _e_comp_smart_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void
{
E_Comp_Object *cw = data;
if (!e_object_is_del(E_OBJECT(cw->ec)))
if ((!cw->deleted) && (!e_object_is_del(E_OBJECT(cw->ec))))
e_comp_object_signal_emit(obj, "e,state,unfocused", "e");
}
@ -2304,6 +2345,7 @@ _e_comp_smart_hide(Evas_Object *obj)
{
INTERNAL_ENTRY;
cw->visible = 0;
cw->deleted |= cw->ec->delete_requested || e_object_is_del(E_OBJECT(cw->ec));
evas_object_hide(cw->clip);
if (cw->input_obj) evas_object_hide(cw->input_obj);
evas_object_hide(cw->effect_obj);
@ -2361,8 +2403,11 @@ _e_comp_smart_show(Evas_Object *obj)
}
if (cw->ec->iconic && (!cw->ec->new_client))
e_comp_object_signal_emit(cw->smart_obj, "e,action,uniconify", "e");
else if (!cw->showing) /* if set, client was ec->hidden during show animation */
if (cw->updates_exist)
e_comp_object_render_update_add(obj);
if ((!cw->showing) && ((!cw->ec->iconic) || cw->ec->new_client || (!cw->animating)))
{
/* if cw->showing set, client was ec->hidden during show animation */
e_comp_object_signal_emit(cw->smart_obj, "e,state,visible", "e");
_e_comp_object_animating_begin(cw);
cw->showing = 1;
@ -2377,6 +2422,15 @@ _e_comp_smart_show(Evas_Object *obj)
}
}
static void
_e_comp_object_client_del(void *d, void *obj EINA_UNUSED)
{
E_Comp_Object *cw = d;
cw->deleted = 1;
e_comp_object_render_update_del(cw->smart_obj);
_e_comp_object_layers_remove(cw);
}
static void
_e_comp_smart_del(Evas_Object *obj)
{
@ -2385,7 +2439,6 @@ _e_comp_smart_del(Evas_Object *obj)
INTERNAL_ENTRY;
e_comp_object_render_update_del(cw->smart_obj);
E_FREE_FUNC(cw->updates, eina_tiler_free);
E_FREE_FUNC(cw->pending_updates, eina_tiler_free);
free(cw->ns);
@ -2395,6 +2448,8 @@ _e_comp_smart_del(Evas_Object *obj)
evas_object_image_data_set(o, NULL);
evas_object_freeze_events_set(o, 1);
evas_object_event_callback_del_full(o, EVAS_CALLBACK_DEL, _e_comp_object_cb_mirror_del, cw);
evas_object_event_callback_del_full(o, EVAS_CALLBACK_SHOW, _e_comp_object_cb_mirror_show, cw);
evas_object_event_callback_del_full(o, EVAS_CALLBACK_HIDE, _e_comp_object_cb_mirror_hide, cw);
evas_object_del(o);
}
EINA_LIST_FREE(cw->obj_agent, o)
@ -2403,7 +2458,8 @@ _e_comp_smart_del(Evas_Object *obj)
evas_object_event_callback_del_full(o, EVAS_CALLBACK_DEL, _e_comp_object_cb_agent_del, cw);
evas_object_del(o);
}
_e_comp_object_layers_remove(cw);
if (!cw->deleted)
_e_comp_object_layers_remove(cw);
l = evas_object_data_get(obj, "comp_object-to_del");
E_FREE_LIST(l, evas_object_del);
evas_object_del(cw->clip);
@ -2429,6 +2485,21 @@ _e_comp_smart_del(Evas_Object *obj)
free(cw);
}
static void
_e_comp_object_input_rect_update(E_Comp_Object *cw)
{
int x, y, w, h;
if (!cw->input_obj) return;
x = cw->input_rect.x, y = cw->input_rect.y, w = cw->input_rect.w, h = cw->input_rect.h;
E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, cw->ec->client.w, cw->ec->client.h);
evas_object_geometry_set(cw->input_obj,
cw->x + x + (!!cw->frame_object * cw->client_inset.l),
cw->y + y + (!!cw->frame_object * cw->client_inset.t),
w, h);
}
static void
_e_comp_smart_move(Evas_Object *obj, int x, int y)
{
@ -2445,10 +2516,7 @@ _e_comp_smart_move(Evas_Object *obj, int x, int y)
evas_object_move(cw->clip, 0, 0);
evas_object_move(cw->effect_obj, x, y);
if (cw->input_obj)
evas_object_geometry_set(cw->input_obj,
cw->x + cw->input_rect.x + (!!cw->frame_object * cw->client_inset.l),
cw->y + cw->input_rect.y + (!!cw->frame_object * cw->client_inset.t),
cw->input_rect.w, cw->input_rect.h);
_e_comp_object_input_rect_update(cw);
/* this gets called once during setup to init coords offscreen and guarantee first move */
if (e_comp && cw->visible)
e_comp_shape_queue();
@ -2493,16 +2561,22 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h)
evas_object_resize(cw->effect_obj, w, h);
if (cw->zoomobj) e_zoomap_child_resize(cw->zoomobj, pw, ph);
if (cw->input_obj)
evas_object_geometry_set(cw->input_obj,
cw->x + cw->input_rect.x + (!!cw->frame_object * cw->client_inset.l),
cw->y + cw->input_rect.y + (!!cw->frame_object * cw->client_inset.t),
cw->input_rect.w, cw->input_rect.h);
_e_comp_object_input_rect_update(cw);
/* resize render update tiler */
if (!first)
{
RENDER_DEBUG("DAMAGE UNFULL: %p", cw->ec);
cw->updates_full = 0;
if (cw->updates) eina_tiler_clear(cw->updates);
if (cw->updates)
{
int tw, th;
eina_tiler_area_size_get(cw->updates, &tw, &th);
if ((tw != pw) || (th != ph))
{
RENDER_DEBUG("DAMAGE UNFULL: %p", cw->ec);
cw->updates_full = 0;
eina_tiler_clear(cw->updates);
}
}
}
else
{
@ -2527,7 +2601,14 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h)
static void
_e_comp_smart_init(void)
{
const char *env;
if (_e_comp_smart) return;
env = getenv("E_RENDER_DEBUG");
if (eina_streq(env, "focus"))
render_debug_enabled = -1;
else if (env)
render_debug_enabled = 1;
{
static const Evas_Smart_Class sc =
{
@ -2642,7 +2723,7 @@ _e_comp_object_util_show(void *data EINA_UNUSED, Evas_Object *obj)
e_comp_shape_queue();
evas_object_show(obj);
if (ref)
if (ref && (!stopping))
{
evas_object_ref(obj);
evas_object_data_set(obj, "comp_ref", (void*)1);
@ -2670,7 +2751,7 @@ _e_comp_object_util_hide(void *data EINA_UNUSED, Evas_Object *obj)
evas_object_unref(obj);
return;
}
if (!evas_object_data_del(obj, "comp_showing"))
if ((!stopping) && (!evas_object_data_del(obj, "comp_showing")))
{
evas_object_ref(obj);
evas_object_data_set(obj, "comp_ref", (void*)1);
@ -2831,6 +2912,8 @@ e_comp_object_util_type_set(Evas_Object *obj, E_Comp_Object_Type type)
edje_object_signal_emit(obj, "e,state,shadow,on", "e");
else
edje_object_signal_emit(obj, "e,state,shadow,off", "e");
if (evas_object_visible_get(obj))
edje_object_signal_emit(obj, "e,state,visible", "e");
if (content)
edje_object_part_swallow(obj, "e.swallow.content", content);
}
@ -2925,6 +3008,7 @@ e_comp_object_client_add(E_Client *ec)
cw->ec = ec;
ec->frame = o;
evas_object_data_set(o, "comp_object", (void*)1);
e_object_delfn_add(E_OBJECT(ec), _e_comp_object_client_del, cw);
_e_comp_object_event_add(o);
@ -3043,17 +3127,15 @@ e_comp_object_util_zone_get(Evas_Object *obj)
}
E_API void
e_comp_object_util_center(Evas_Object *obj)
e_comp_object_util_center_on_zone(Evas_Object *obj, E_Zone *zone)
{
int x, y, w, h, ow, oh;
E_Zone *zone;
SOFT_ENTRY();
zone = e_comp_object_util_zone_get(obj);
EINA_SAFETY_ON_NULL_RETURN(zone);
e_zone_useful_geometry_get(zone, &x, &y, &w, &h);
if (cw && (cw->ec->changes.size || cw->ec->new_client))
if (cw)
ow = cw->ec->w, oh = cw->ec->h;
else
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
@ -3062,15 +3144,31 @@ e_comp_object_util_center(Evas_Object *obj)
evas_object_move(obj, x, y);
}
E_API void
e_comp_object_util_center(Evas_Object *obj)
{
E_Zone *zone;
zone = e_comp_object_util_zone_get(obj);
e_comp_object_util_center_on_zone(obj, zone);
}
E_API void
e_comp_object_util_center_on(Evas_Object *obj, Evas_Object *on)
{
int x, y, w, h, ow, oh;
E_Comp_Object *cw2;
SOFT_ENTRY();
EINA_SAFETY_ON_NULL_RETURN(on);
evas_object_geometry_get(on, &x, &y, &w, &h);
if (cw && (cw->ec->changes.size || cw->ec->new_client))
cw2 = evas_object_smart_data_get(on);
if (cw2 && eina_streq(evas_object_type_get(on), SMART_NAME))
x = cw2->ec->x, y = cw2->ec->y, w = cw2->ec->w, h = cw2->ec->h;
else
evas_object_geometry_get(on, &x, &y, &w, &h);
if (cw)
ow = cw->ec->w, oh = cw->ec->h;
else
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
@ -3115,7 +3213,6 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
API_ENTRY;
//INF("%d,%d %dx%d", x, y, w, h);
E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, cw->ec->client.w, cw->ec->client.h);
if ((cw->input_rect.x == x) && (cw->input_rect.y == y) &&
(cw->input_rect.w == w) && (cw->input_rect.h == h)) return;
EINA_RECTANGLE_SET(&cw->input_rect, x, y, w, h);
@ -3130,9 +3227,7 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
evas_object_clip_set(cw->input_obj, cw->clip);
evas_object_smart_member_add(cw->input_obj, obj);
}
evas_object_geometry_set(cw->input_obj,
cw->ec->client.x + (!!cw->frame_object * cw->client_inset.l) + x,
cw->ec->client.y + (!!cw->frame_object * cw->client_inset.t) + y, w, h);
_e_comp_object_input_rect_update(cw);
evas_object_pass_events_set(cw->obj, 1);
if (cw->visible) evas_object_show(cw->input_obj);
}
@ -3215,7 +3310,8 @@ E_API Eina_Bool
e_comp_object_frame_allowed(Evas_Object *obj)
{
API_ENTRY EINA_FALSE;
return (!cw->ec->mwm.borderless) && (cw->frame_object || (!cw->client_inset.calc));
return (!e_client_util_ignored_get(cw->ec)) && (!cw->ec->mwm.borderless) &&
(cw->frame_object || (!cw->client_inset.calc));
}
E_API void
@ -3277,6 +3373,7 @@ e_comp_object_frame_theme_set(Evas_Object *obj, const char *name)
return edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->frame_object ?: cw->obj);
if (!e_util_strcmp(name, "COMP_RESHADOW"))
return _e_comp_object_shadow_setup(cw);
if (eina_streq(name, "borderless") && (!cw->frame_object)) return EINA_TRUE;
pbg = cw->frame_object;
theme = eina_stringshare_add(name);
@ -3409,6 +3506,16 @@ reshadow:
}
else
cw->frame_extends = 0;
if (pbg && (!cw->frame_object))
{
evas_object_event_callback_del(cw->obj, EVAS_CALLBACK_MOUSE_IN, _e_comp_object_ssd_mouse_in);
evas_object_event_callback_del(cw->obj, EVAS_CALLBACK_MOUSE_OUT, _e_comp_object_ssd_mouse_out);
}
else if (cw->obj)
{
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_IN, _e_comp_object_ssd_mouse_in, cw);
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_OUT, _e_comp_object_ssd_mouse_out, cw);
}
evas_object_del(pbg);
return EINA_TRUE;
}
@ -3532,7 +3639,7 @@ E_API Eina_Bool
e_comp_object_damage_exists(Evas_Object *obj)
{
API_ENTRY EINA_FALSE;
return cw->updates_exist;
return cw->updates_exist || cw->updates_full;
}
E_API void
@ -3565,12 +3672,6 @@ e_comp_object_render_update_del(Evas_Object *obj)
/* this gets called during comp animating to clear the update flag */
if (e_comp->grabbed) return;
e_comp->updates = eina_list_remove(e_comp->updates, cw->ec);
if (!e_comp->updates)
{
E_FREE_FUNC(e_comp->update_job, ecore_job_del);
if (e_comp->render_animator)
ecore_animator_freeze(e_comp->render_animator);
}
}
E_API void
@ -3599,14 +3700,11 @@ e_comp_object_shape_apply(Evas_Object *obj)
//INF("SHAPE RENDER %p", cw->ec);
_e_comp_object_alpha_set(cw);
EINA_LIST_FOREACH(cw->obj_mirror, l, o)
evas_object_image_alpha_set(o, 1);
p = pix = evas_object_image_data_get(cw->obj, 1);
if (!pix)
{
evas_object_image_data_set(cw->obj, pix);
_e_comp_object_alpha_set(cw);
return;
}
if (cw->ec->shaped)
@ -3614,7 +3712,7 @@ e_comp_object_shape_apply(Evas_Object *obj)
unsigned char *spix, *sp;
spix = calloc(w * h, sizeof(unsigned char));
DBG("SHAPE [%p] rects %i", cw->ec, cw->ec->shape_rects_num);
RENDER_DEBUG("SHAPE [%p] rects %i", cw->ec, cw->ec->shape_rects_num);
for (i = 0; i < cw->ec->shape_rects_num; i++)
{
int rx, ry, rw, rh;
@ -3661,11 +3759,13 @@ e_comp_object_shape_apply(Evas_Object *obj)
}
}
evas_object_image_data_set(cw->obj, pix);
_e_comp_object_alpha_set(cw);
evas_object_image_data_update_add(cw->obj, 0, 0, w, h);
EINA_LIST_FOREACH(cw->obj_mirror, l, o)
{
evas_object_image_data_set(o, pix);
evas_object_image_data_update_add(o, 0, 0, w, h);
evas_object_image_alpha_set(o, 1);
}
// don't need to fix alpha chanel as blending
// should be totally off here regardless of
@ -3747,12 +3847,13 @@ e_comp_object_native_surface_set(Evas_Object *obj, Eina_Bool set)
if ((!set) && (!cw->native)) return;
cw->native = set;
_e_comp_object_alpha_set(cw);
evas_object_image_native_surface_set(cw->obj, set && (!cw->blanked) ? (cw->ns ?: &ns) : NULL);
EINA_LIST_FOREACH(cw->obj_mirror, l, o)
{
evas_object_image_alpha_set(o, !!cw->ns ? 1 : cw->ec->argb);
evas_object_image_native_surface_set(o, set ? (cw->ns ?: &ns) : NULL);
evas_object_image_alpha_set(o, !!cw->ns ? 1 : cw->ec->argb);
}
}
@ -3763,7 +3864,7 @@ e_comp_object_native_surface_override(Evas_Object *obj, Evas_Native_Surface *ns)
if (cw->ec->input_only) return;
E_FREE(cw->ns);
if (ns)
cw->ns = (Evas_Native_Surface*)eina_memdup((unsigned char*)ns, sizeof(Evas_Native_Surface), 0);
cw->ns = (void *)eina_memdup((unsigned char *)ns, sizeof(Evas_Native_Surface), 0);
_e_comp_object_alpha_set(cw);
if (cw->native)
e_comp_object_native_surface_set(obj, cw->native);
@ -3853,7 +3954,7 @@ e_comp_object_dirty(Evas_Object *obj)
}
cw->update_count = cw->updates_full = cw->updates_exist = 0;
evas_object_smart_callback_call(obj, "dirty", NULL);
if (cw->visible || (!visible) || (!cw->pending_updates) || cw->native) return;
if (cw->real_hid || cw->visible || (!visible) || (!cw->pending_updates) || cw->native) return;
/* force render if main object is hidden but mirrors are visible */
RENDER_DEBUG("FORCING RENDER %p", cw->ec);
e_comp_object_render(obj);
@ -3862,7 +3963,7 @@ e_comp_object_dirty(Evas_Object *obj)
E_API Eina_Bool
e_comp_object_render(Evas_Object *obj)
{
Eina_Iterator *it;
Eina_Iterator *it = NULL;
Eina_Rectangle *r;
Eina_List *l;
Evas_Object *o;
@ -3951,8 +4052,8 @@ e_comp_object_render(Evas_Object *obj)
RENDER_DEBUG("UPDATE [%p]: %d %d %dx%d -- pix = %p", cw->ec, r->x, r->y, r->w, r->h, pix);
}
if (!it) pix = NULL;
eina_iterator_free(it);
end:
eina_iterator_free(it);
evas_object_image_data_set(cw->obj, cw->blanked ? NULL : pix);
_e_comp_object_alpha_set(cw);
@ -4278,6 +4379,7 @@ _e_comp_object_autoclose_key_down_cb(void *data EINA_UNUSED, int type EINA_UNUSE
Ecore_Event_Key *ev = event;
Eina_Bool del = EINA_TRUE;
if (e_desklock_state_get()) return ECORE_CALLBACK_RENEW;
/* returning false in key_cb means delete the object */
if (e_comp->autoclose.key_cb)
del = !e_comp->autoclose.key_cb(e_comp->autoclose.data, ev);

View File

@ -54,6 +54,7 @@ E_API Eina_Bool e_comp_object_util_autoclose_on_escape(void *d EINA_UNUSED, Ecor
E_API void e_comp_object_util_autoclose(Evas_Object *obj, E_Comp_Object_Autoclose_Cb del_cb, E_Comp_Object_Key_Cb cb, const void *data);
E_API void e_comp_object_util_center(Evas_Object *obj);
E_API void e_comp_object_util_center_on(Evas_Object *obj, Evas_Object *on);
E_API void e_comp_object_util_center_on_zone(Evas_Object *obj, E_Zone *zone);
E_API void e_comp_object_util_center_pos_get(Evas_Object *obj, int *x, int *y);
E_API void e_comp_object_util_fullscreen(Evas_Object *obj);
E_API Eina_Bool e_comp_object_frame_allowed(Evas_Object *obj);

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@
# define container_of(ptr, type, member) \
({ \
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) ); \
(type *)(void *)( (char *)__mptr - offsetof(type,member) ); \
})
typedef struct _E_Comp_Wl_Buffer E_Comp_Wl_Buffer;
@ -97,17 +97,17 @@ typedef struct E_Comp_Wl_Extension_Data
{
struct
{
struct wl_resource *global;
struct wl_global *global;
struct wl_client *client;
void (*read_pixels)(E_Comp_Wl_Output *output, void *pixels);
} screenshooter;
struct
{
struct wl_resource *global;
struct wl_global *global;
} session_recovery;
struct
{
struct wl_resource *global;
struct wl_global *global;
} www;
} E_Comp_Wl_Extension_Data;
@ -220,7 +220,7 @@ struct _E_Comp_Wl_Data
{
void *source;
struct wl_listener listener;
E_Client *xwl_owner;
Ecore_Window xwl_owner;
} clipboard;
struct
@ -359,7 +359,7 @@ E_API E_Comp_Wl_Buffer *e_comp_wl_buffer_get(struct wl_resource *resource);
E_API struct wl_signal e_comp_wl_surface_create_signal_get(void);
E_API double e_comp_wl_idle_time_get(void);
E_API Eina_Bool e_comp_wl_output_init(const char *id, const char *make, const char *model, int x, int y, int w, int h, int pw, int ph, unsigned int refresh, unsigned int subpixel, unsigned int transform);
E_API Eina_Bool e_comp_wl_output_init(const char *id, const char *make, const char *model, int x, int y, int w, int h, int pw, int ph, unsigned int refresh, unsigned int subpixel, unsigned int transform, unsigned int num);
E_API void e_comp_wl_output_remove(const char *id);
EINTERN Eina_Bool e_comp_wl_key_down(Ecore_Event_Key *ev);

View File

@ -373,6 +373,14 @@ _e_comp_wl_data_source_cb_resource_destroy(struct wl_resource *resource)
wl_signal_emit(&source->destroy_signal, source);
_mime_types_free(source);
if (e_comp_wl->drag_source == source)
{
//free the drag here
e_object_del(E_OBJECT(e_comp_wl->drag));
e_comp_wl->drag = NULL;
}
free(source);
}
@ -485,15 +493,15 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour
if (sel_source)
{
if (sel_source->cancelled)
sel_source->cancelled(sel_source);
if (!e_comp_wl->clipboard.xwl_owner)
wl_list_remove(&e_comp_wl->selection.data_source_listener.link);
if (sel_source->cancelled)
sel_source->cancelled(sel_source);
e_comp_wl->selection.data_source = NULL;
}
e_comp_wl->selection.data_source = sel_source = source;
e_comp_wl->clipboard.xwl_owner = NULL;
e_comp_wl->clipboard.xwl_owner = 0;
source->serial = e_comp_wl->selection.serial = serial;
if (e_comp_wl->kbd.enabled)
@ -528,7 +536,9 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour
static void
_e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
{
struct wl_resource *res = NULL;
Evas_Object *o, *z;
E_Comp_Wl_Data_Source *data_source = e_comp_wl->drag_source;
o = edje_object_part_swallow_get(drag->comp_object, "e.swallow.content");
if (eina_streq(evas_object_type_get(o), "e_comp_object"))
@ -545,53 +555,45 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
e_comp_wl->drag = NULL;
e_comp_wl->drag_client = NULL;
e_screensaver_inhibit_toggle(0);
if (e_comp_wl->selection.target && (!dropped))
if (dropped) return;
#ifndef HAVE_WAYLAND_ONLY
if (e_comp_wl->selection.target && e_client_has_xwindow(e_comp_wl->selection.target))
{
#ifndef HAVE_WAYLAND_ONLY
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);
}
else
#endif
{
struct wl_resource *res;
E_Comp_Wl_Data_Source *data_source = e_comp_wl->drag_source;
res = e_comp_wl_data_find_for_client(wl_resource_get_client(e_comp_wl->selection.target->comp_data->surface));
if (res)
{
if (data_source->accepted && data_source->current_dnd_action)
{
wl_data_device_send_drop(res);
if (wl_resource_get_version(data_source->resource) >=
WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION)
wl_data_source_send_dnd_drop_performed(data_source->resource);
data_source->offer->in_ask = data_source->current_dnd_action ==
WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK;
}
else if (wl_resource_get_version(data_source->resource) >=
WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION)
wl_data_source_send_cancelled(data_source->resource);
wl_data_device_send_leave(res);
}
#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_window_hide(e_comp->cm_selection);
}
#endif
e_comp_wl->selection.target = NULL;
e_comp_wl->drag_source = NULL;
}
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);
return;
}
#endif
if (e_comp_wl->selection.target)
res = e_comp_wl_data_find_for_client(wl_resource_get_client(e_comp_wl->selection.target->comp_data->surface));
if (res && data_source->accepted && data_source->current_dnd_action)
{
wl_data_device_send_drop(res);
if (wl_resource_get_version(data_source->resource) >=
WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION)
wl_data_source_send_dnd_drop_performed(data_source->resource);
data_source->offer->in_ask = data_source->current_dnd_action ==
WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK;
}
else if (wl_resource_get_version(data_source->resource) >=
WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION)
wl_data_source_send_cancelled(data_source->resource);
if (res) wl_data_device_send_leave(res);
#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_window_hide(e_comp->cm_selection);
}
#endif
e_comp_wl->selection.target = NULL;
e_comp_wl->drag_source = NULL;
}
static void
@ -645,6 +647,13 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
EC_CHANGED(ec);
e_comp_wl->drag_client = ec;
}
if (ec->comp_data->pending.input)
eina_tiler_clear(ec->comp_data->pending.input);
else
{
ec->comp_data->pending.input = eina_tiler_new(65535, 65535);
eina_tiler_tile_size_set(ec->comp_data->pending.input, 1, 1);
}
}
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
@ -763,16 +772,19 @@ static void
_e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data EINA_UNUSED, uint32_t version EINA_UNUSED, uint32_t id)
{
struct wl_resource *res;
pid_t pid;
/* try to create data manager resource */
e_comp_wl->mgr.resource = res =
wl_resource_create(client, &wl_data_device_manager_interface, 3, id);
res = wl_resource_create(client, &wl_data_device_manager_interface, 3, id);
if (!res)
{
ERR("Could not create data device manager");
wl_client_post_no_memory(client);
return;
}
wl_client_get_credentials(client, &pid, NULL, NULL);
if (pid == getpid())
e_comp_wl->mgr.resource = res;
wl_resource_set_implementation(res, &_e_manager_interface,
e_comp->wl_comp_data, NULL);
@ -938,15 +950,6 @@ _e_comp_wl_clipboard_create(void)
wl_signal_add(&e_comp_wl->selection.signal, &e_comp_wl->clipboard.listener);
}
static void
_e_comp_wl_data_device_target_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Client *ec = data;
if (e_comp_wl->selection.target == ec)
e_comp_wl->selection.target = NULL;
}
E_API void
e_comp_wl_data_device_send_enter(E_Client *ec)
{
@ -961,22 +964,16 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
if (!e_client_has_xwindow(ec))
{
E_Comp_Wl_Data_Source *drag_source = e_comp_wl->drag_source;
if (drag_source &&
drag_source->offer)
{
E_Comp_Wl_Data_Offer *offer;
/* Unlink the offer from the source */
offer = drag_source->offer;
offer->source = NULL;
drag_source->offer = NULL;
drag_source->accepted = 0;
wl_list_remove(&offer->source_destroy_listener.link);
}
data_device_res =
e_comp_wl_data_find_for_client(wl_resource_get_client(ec->comp_data->surface));
if (!data_device_res) return;
offer_res = e_comp_wl_data_device_send_offer(ec);
if (e_comp_wl->drag_source && (!offer_res)) return;
if (e_client_has_xwindow(e_comp_wl->drag_client))
{
drag_source->offer->dnd_actions = drag_source->dnd_actions;
drag_source->offer->preferred_dnd_action = drag_source->current_dnd_action;
}
data_offer_update_action(drag_source->offer);
if (offer_res)
{
@ -985,8 +982,6 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
}
}
e_comp_wl->selection.target = 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))
@ -1045,8 +1040,6 @@ e_comp_wl_data_device_send_leave(E_Client *ec)
e_client_has_xwindow(e_comp_wl->drag_client))
return;
if (e_comp_wl->drag && (e_comp_wl->drag->object == ec->frame)) 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
@ -1059,6 +1052,20 @@ e_comp_wl_data_device_send_leave(E_Client *ec)
return;
}
#endif
{
E_Comp_Wl_Data_Source *drag_source = e_comp_wl->drag_source;
if (drag_source &&
drag_source->offer)
{
E_Comp_Wl_Data_Offer *offer;
/* Unlink the offer from the source */
offer = drag_source->offer;
offer->source = NULL;
drag_source->offer = NULL;
drag_source->accepted = 0;
wl_list_remove(&offer->source_destroy_listener.link);
}
}
res = e_comp_wl_data_find_for_client(wl_resource_get_client(ec->comp_data->surface));
if (res)
wl_data_device_send_leave(res);
@ -1088,6 +1095,7 @@ e_comp_wl_data_device_keyboard_focus_set(void)
{
struct wl_resource *data_device_res, *offer_res = NULL, *focus;
E_Comp_Wl_Data_Source *source;
E_Client *focused;
if (!e_comp_wl->kbd.enabled)
{
@ -1100,6 +1108,7 @@ e_comp_wl_data_device_keyboard_focus_set(void)
ERR("No focused resource");
return;
}
focused = wl_resource_get_user_data(focus);
source = (E_Comp_Wl_Data_Source *)e_comp_wl->selection.data_source;
#ifndef HAVE_WAYLAND_ONLY
@ -1108,10 +1117,10 @@ e_comp_wl_data_device_keyboard_focus_set(void)
if (!e_comp_util_has_xwayland()) break;
if (e_comp_wl->clipboard.xwl_owner)
{
if (e_client_has_xwindow(e_client_focused_get())) return;
if (e_client_has_xwindow(focused)) return;
break;
}
else if (source && e_client_has_xwindow(e_client_focused_get()))
else if (source && e_client_has_xwindow(focused))
{
/* wl -> x11 */
ecore_x_selection_owner_set(e_comp->cm_selection,
@ -1267,6 +1276,10 @@ e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source)
}
_mime_types_free(&source->data_source);
if (source == e_comp_wl->clipboard.source)
e_comp_wl->clipboard.source = NULL;
if (&source->data_source == e_comp_wl->selection.data_source)
e_comp_wl->selection.data_source = NULL;
wl_signal_emit(&source->data_source.destroy_signal, &source->data_source);
wl_array_release(&source->contents);

View File

@ -37,10 +37,16 @@ _e_comp_wl_session_recovery_get_uuid(struct wl_client *client EINA_UNUSED, struc
if (ec->internal || ec->uuid) return;
uuid_generate(u);
uuid_unparse_lower(u, uuid);
eina_stringshare_replace(&ec->uuid, uuid);
zwp_e_session_recovery_send_create_uuid(resource, surface, uuid);
if (ec->remember)
e_remember_unuse(ec->remember);
else
{
ec->remember = e_remember_find_usable(ec);
if (ec->remember)
e_remember_apply(ec->remember, ec);
}
eina_stringshare_replace(&ec->uuid, uuid);
ec->remember = e_remember_new();
e_remember_use(ec->remember);
ec->remember->apply = E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE | E_REMEMBER_APPLY_DESKTOP |
@ -221,24 +227,18 @@ static const struct www_interface _e_www_interface =
#define GLOBAL_BIND_CB(NAME, IFACE, ...) \
static void \
_e_comp_wl_##NAME##_cb_unbind(struct wl_resource *resource EINA_UNUSED) \
{ \
e_comp_wl->extensions->NAME.global = NULL; \
} \
static void \
_e_comp_wl_##NAME##_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t version EINA_UNUSED, uint32_t id) \
_e_comp_wl_##NAME##_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, &(IFACE), 1, id))) \
if (!(res = wl_resource_create(client, &(IFACE), version, id))) \
{ \
ERR("Could not create %s interface", #NAME);\
wl_client_post_no_memory(client);\
return;\
}\
\
e_comp_wl->extensions->NAME.global = res; \
wl_resource_set_implementation(res, &_e_##NAME##_interface, NULL, _e_comp_wl_##NAME##_cb_unbind);\
wl_resource_set_implementation(res, &_e_##NAME##_interface, NULL, NULL);\
}
GLOBAL_BIND_CB(session_recovery, zwp_e_session_recovery_interface)
@ -248,12 +248,16 @@ GLOBAL_BIND_CB(www, www_interface)
#define GLOBAL_CREATE_OR_RETURN(NAME, IFACE) \
do { \
if (!wl_global_create(e_comp_wl->wl.disp, &(IFACE), 1, \
NULL, _e_comp_wl_##NAME##_cb_bind)) \
struct wl_global *global; \
\
global = wl_global_create(e_comp_wl->wl.disp, &(IFACE), 1, \
NULL, _e_comp_wl_##NAME##_cb_bind); \
if (!global) \
{ \
ERR("Could not add %s to wayland globals", #IFACE); \
return EINA_FALSE; \
} \
e_comp_wl->extensions->NAME.global = global; \
} while (0)
static Eina_Bool
@ -275,6 +279,8 @@ _dmabuf_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
EINTERN Eina_Bool
e_comp_wl_extensions_init(void)
{
e_comp_wl->extensions = E_NEW(E_Comp_Wl_Extension_Data, 1);
/* try to add session_recovery to wayland globals */
GLOBAL_CREATE_OR_RETURN(session_recovery, zwp_e_session_recovery_interface);
GLOBAL_CREATE_OR_RETURN(screenshooter, screenshooter_interface);
@ -285,6 +291,5 @@ e_comp_wl_extensions_init(void)
e_client_hook_add(E_CLIENT_HOOK_MOVE_BEGIN, _e_comp_wl_extensions_client_move_begin, NULL);
e_client_hook_add(E_CLIENT_HOOK_MOVE_END, _e_comp_wl_extensions_client_move_end, NULL);
e_comp_wl->extensions = E_NEW(E_Comp_Wl_Extension_Data, 1);
return EINA_TRUE;
}

View File

@ -58,21 +58,45 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
if (client != wl_resource_get_client(ec->comp_data->surface)) continue;
if (ec->mouse.in)
{
got_mouse = EINA_TRUE;
break;
if (e_client_has_xwindow(ec))
got_mouse = E_INSIDE(ec->mouse.current.mx, ec->mouse.current.my,
ec->client.x, ec->client.y, ec->client.w, ec->client.h);
else
got_mouse = EINA_TRUE;
break;
}
}
if (!got_mouse) return;
if (!got_mouse)
{
if (ec && ec->mouse.in && (!surface_resource))
e_pointer_object_set(e_comp->pointer, NULL, 0, 0);
return;
}
if (!surface_resource)
{
e_pointer_object_set(e_comp->pointer, NULL, x, y);
ecore_evas_cursor_unset(e_comp->ee);
evas_object_hide(e_comp->pointer->o_ptr);
return;
}
ec = wl_resource_get_user_data(surface_resource);
/* I think this only happens when we've deleted the resource from
* the client del callback - so the client is gone and shouldn't be
* setting a cursor, but the surface still exists so stale requests
* are being processed... let's BAIL.
*/
if (!ec) return;
if (ec->comp_data->pending.input)
eina_tiler_clear(ec->comp_data->pending.input);
else
{
ec->comp_data->pending.input = eina_tiler_new(65535, 65535);
eina_tiler_tile_size_set(ec->comp_data->pending.input, 1, 1);
}
if (!ec->re_manage)
{
ec->comp_data->cursor = ec->re_manage = 1;
ec->ignored = 0;
evas_object_layer_set(ec->frame, E_LAYER_CLIENT_PRIO);
ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1;
ec->icccm.title = eina_stringshare_add("noshadow");
@ -439,7 +463,7 @@ e_comp_wl_input_init(void)
{
/* set default seat name */
if (!e_comp_wl->seat.name)
e_comp_wl->seat.name = "default";
e_comp_wl->seat.name = "seat0";
e_comp_wl->xkb.fd = -1;
@ -650,8 +674,13 @@ _e_comp_wl_input_context_keymap_set(struct xkb_keymap *keymap, struct xkb_contex
dev = ecore_evas_data_get(e_comp->ee, "device");
if (dev)
{
ecore_drm2_device_keyboard_cached_context_set(dev, context);
ecore_drm2_device_keyboard_cached_keymap_set(dev, keymap);
#ifndef EFL_VERSION_1_20
if (!E_EFL_VERSION_MINIMUM(1, 19, 99))
{
ecore_drm2_device_keyboard_cached_context_set(dev, context);
ecore_drm2_device_keyboard_cached_keymap_set(dev, keymap);
}
#endif
}
}
# else
@ -747,9 +776,9 @@ _event_generate(const char *key, const char *keyname, int mods, Eina_Bool up)
* /usr/share/X11/xkb/keycodes/evdev is probably what your system is using
*/
keycode = _xkb_keymap_key_by_name(e_comp_wl->xkb.keymap, keyname ?: key);
if (!keycode)
if (keycode == -1)
{
ERR("no keycode found for key '%s'", key);
ERR("no keycode found for key '%s'", keyname ?: key);
return;
}
ev = calloc(1, sizeof(Ecore_Event_Key) + (2 * (strlen(key) + 1)));

View File

@ -42,6 +42,15 @@ struct _E_Comp_X_Data
Eina_Bool restack : 1;
};
typedef struct Pending_Configure
{
Evas_Point point;
Ecore_X_Window win;
Ecore_Timer *timer;
} Pending_Configure;
static Eina_Hash *pending_configures;
static unsigned int focus_time = 0;
static unsigned int focus_canvas_time = 0;
static Ecore_Timer *focus_timer;
@ -70,6 +79,8 @@ static int screen_size_index = -1;
static Ecore_X_Atom backlight_atom = 0;
extern double e_bl_val;
static Eina_Hash *dead_wins;
static void _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec);
static inline E_Comp_X_Client_Data *
@ -118,11 +129,14 @@ _e_comp_x_focus_check(void)
focused = e_client_focused_get();
/* if there is no new focused or it is a non-X client,
* focus comp canvas on focus-out */
if ((!focused) || (e_pixmap_type_get(focused->pixmap) != E_PIXMAP_TYPE_X))
if ((!focused) || (!e_client_has_xwindow(focused)))
{
focus_canvas_time = ecore_x_current_time_get();
focus_time = 0;
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
else
e_grabinput_focus(e_comp->root, E_FOCUS_METHOD_PASSIVE);
}
}
@ -1351,8 +1365,11 @@ _e_comp_x_show_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Eve
(!e_comp_find_by_window(ev->parent)) ||
(ev->parent != e_comp->root))
{
ecore_x_window_show(ev->win);
return ECORE_CALLBACK_RENEW;
if ((!ec) && (!eina_hash_find(dead_wins, &ev->parent)))
{
ecore_x_window_show(ev->win);
return ECORE_CALLBACK_RENEW;
}
}
if (!ec)
ec = _e_comp_x_client_new(ev->win, 0);
@ -1539,8 +1556,9 @@ _e_comp_x_hide(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Windo
{
hid = EINA_TRUE;
evas_object_hide(ec->frame);
e_hints_window_hidden_set(ec);
if (!ec->internal)
if (ec->internal)
e_hints_window_hidden_set(ec);
else
{
if (ec->exe_inst && ec->exe_inst->exe)
ec->exe_inst->phony = 0;
@ -1638,6 +1656,15 @@ _e_comp_x_configure(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
_e_comp_x_configure_request_timer(void *d)
{
Pending_Configure *pc = d;
eina_hash_list_remove(pending_configures, &pc->win, pc);
free(pc);
return EINA_FALSE;
}
static Eina_Bool
_e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Configure_Request *ev)
{
@ -1662,12 +1689,22 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
}
if (!ec)
{
if ((ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_X) ||
(ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_Y))
{
Pending_Configure *pc = E_NEW(Pending_Configure, 1);
pc->point.x = ev->x;
pc->point.y = ev->y;
pc->timer = ecore_timer_loop_add(5.0, _e_comp_x_configure_request_timer, pc);
pc->win = ev->win;
eina_hash_list_append(pending_configures, &ev->win, pc);
}
ecore_x_window_configure(ev->win, ev->value_mask,
ev->x, ev->y, ev->w, ev->h, ev->border,
ev->abovewin, ev->detail);
return ECORE_CALLBACK_PASS_ON;
}
x = ox = ec->client.x;
y = oy = ec->client.y;
w = ow = ec->client.w;
@ -1709,8 +1746,12 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
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);
resize = (w != ec->w) || (h != ec->h);
if ((ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_X) ||
(ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_Y))
move = (x != ec->x) || (y != ec->y);
if ((ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_W) ||
(ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_H))
resize = (w != ec->w) || (h != ec->h);
if (move && (!ec->lock_client_location))
{
@ -2315,12 +2356,20 @@ _e_comp_x_state_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Ev
{
int i;
E_Client *ec;
int max;
ec = _e_comp_x_client_find_by_window(ev->win);
if (!ec) return ECORE_CALLBACK_RENEW;
for (i = 0; i < 2; i++)
e_hints_window_state_update(ec, ev->state[i], ev->action);
max = (1 << ev->state[0]) | (1 << ev->state[1]);
if ((max & (1 << ECORE_X_WINDOW_STATE_MAXIMIZED_VERT)) &&
(max & (1 << ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ)))
e_hints_window_state_update(ec, INT_MAX, ev->action);
else
{
for (i = 0; i < 2; i++)
e_hints_window_state_update(ec, ev->state[i], ev->action);
}
return ECORE_CALLBACK_RENEW;
}
@ -2358,7 +2407,7 @@ static void
_e_comp_x_mouse_in_job(void *d EINA_UNUSED)
{
if (mouse_client)
e_client_mouse_in(mouse_client, e_comp_canvas_x_root_adjust(mouse_in_coords.x), e_comp_canvas_x_root_adjust(mouse_in_coords.y));
e_client_mouse_in(mouse_client, e_comp_canvas_x_root_adjust(mouse_in_coords.x), e_comp_canvas_y_root_adjust(mouse_in_coords.y));
mouse_in_job = NULL;
}
@ -2416,7 +2465,7 @@ _e_comp_x_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
E_FREE_FUNC(mouse_in_job, ecore_job_del);
}
if (ec->mouse.in)
e_client_mouse_out(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_x_root_adjust(ev->root.y));
e_client_mouse_out(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_y_root_adjust(ev->root.y));
return ECORE_CALLBACK_RENEW;
}
@ -2515,7 +2564,7 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M
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);
y = e_comp_canvas_y_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;
@ -2785,45 +2834,43 @@ _e_comp_x_move_resize_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecor
e_object_ref(E_OBJECT(ec->cur_mouse_action));
ec->cur_mouse_action->func.go(E_OBJECT(ec), NULL);
if (ev->direction != E_POINTER_RESIZE_NONE)
{
e_pointer_mode_pop(ec, ec->resize_mode);
ec->resize_mode = ev->direction;
e_pointer_mode_push(ec, ec->resize_mode);
}
switch (ev->direction)
{
case E_POINTER_RESIZE_TL:
ec->resize_mode = E_POINTER_RESIZE_TL;
GRAV_SET(ec, ECORE_X_GRAVITY_SE);
break;
case E_POINTER_RESIZE_T:
ec->resize_mode = E_POINTER_RESIZE_T;
GRAV_SET(ec, ECORE_X_GRAVITY_S);
break;
case E_POINTER_RESIZE_TR:
ec->resize_mode = E_POINTER_RESIZE_TR;
GRAV_SET(ec, ECORE_X_GRAVITY_SW);
break;
case E_POINTER_RESIZE_R:
ec->resize_mode = E_POINTER_RESIZE_R;
GRAV_SET(ec, ECORE_X_GRAVITY_W);
break;
case E_POINTER_RESIZE_BR:
ec->resize_mode = E_POINTER_RESIZE_BR;
GRAV_SET(ec, ECORE_X_GRAVITY_NW);
break;
case E_POINTER_RESIZE_B:
ec->resize_mode = E_POINTER_RESIZE_B;
GRAV_SET(ec, ECORE_X_GRAVITY_N);
break;
case E_POINTER_RESIZE_BL:
ec->resize_mode = E_POINTER_RESIZE_BL;
GRAV_SET(ec, ECORE_X_GRAVITY_NE);
break;
case E_POINTER_RESIZE_L:
ec->resize_mode = E_POINTER_RESIZE_L;
GRAV_SET(ec, ECORE_X_GRAVITY_E);
break;
@ -2884,6 +2931,22 @@ _e_comp_x_focus_in(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_W
E_Client *ec, *focused;
ec = _e_comp_x_client_find_by_window(ev->win);
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
focused = e_client_focused_get();
if (ec && focused)
{
if ((!ec->override) && (ec != focused))
{
ecore_x_window_focus(e_client_util_win_get(focused));
ecore_x_icccm_take_focus_send(e_client_util_win_get(focused), ecore_x_current_time_get());
}
}
else
ecore_x_window_focus(e_comp->root);
return ECORE_CALLBACK_RENEW;
}
if (!ec)
{
if ((ev->win == e_comp->ee_win) && (ev->time >= focus_canvas_time) && (!focus_time))
@ -3249,7 +3312,7 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
}
}
ecore_x_window_show(win);
if (!ec->iconic)
if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
ecore_x_window_show(pwin);
_e_comp_x_focus_init(ec);
@ -3581,7 +3644,13 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
&is_urgent))
{
if (ec->new_client)
ec->icccm.initial_state = ec->icccm.state;
{
/* clients may unset iconic state when no wm is present */
if (ec->netwm.state.hidden && (ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_NORMAL))
ec->icccm.initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
else
ec->icccm.initial_state = ec->icccm.state;
}
if (state != ec->icccm.state)
{
if (ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
@ -3590,7 +3659,8 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
{
ec->visible = 1;
ec->changes.visible = ec->new_client;
if (!ec->new_client)
if ((!ec->new_client) &&
(ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_NORMAL))
evas_object_show(ec->frame);
}
}
@ -3740,9 +3810,11 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
ec->placed = 1;
}
}
}
else
{
if (ec->placed && (!e_client_util_resizing_get(ec)) && (!ec->override))
{
e_client_res_change_geometry_save(ec);
e_client_res_change_geometry_restore(ec);
}
}
if (ec->icccm.min_w > 32767) ec->icccm.min_w = 32767;
if (ec->icccm.min_h > 32767) ec->icccm.min_h = 32767;
@ -3884,15 +3956,19 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
{
unsigned int val;
if (ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &val, 1) > 0)
if (ecore_x_netwm_opacity_get(win, &val))
{
val = (val >> 24);
if (ec->netwm.opacity != val)
{
ec->netwm.opacity = val;
evas_object_color_set(ec->frame,
ec->netwm.opacity, ec->netwm.opacity, ec->netwm.opacity, ec->netwm.opacity);
rem_change = 1;
}
ec->netwm.fetch.opacity = !ec->netwm.opacity;
}
else
ec->netwm.fetch.opacity = 0;
}
if (ec->netwm.fetch.icon)
{
@ -4501,16 +4577,14 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
}
if (cd->fetch_gtk_frame_extents)
{
unsigned char *data;
unsigned int *extents;
int count;
if (ecore_x_window_prop_property_get(win,
ATM_GTK_FRAME_EXTENTS,
ECORE_X_ATOM_CARDINAL, 32,
&data, &count))
(void *)(&extents), &count))
{
unsigned int *extents = (unsigned int*)data;
/* _GTK_FRAME_EXTENTS describes a region l/r/t/b pixels
* from the "window" object in which shadows will be drawn.
* this area should not be accounted for in sizing or
@ -4522,7 +4596,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
(ec->x == ec->comp_data->initial_attributes.x) &&
(ec->y == ec->comp_data->initial_attributes.y))
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &ec->x, &ec->y);
free(data);
free(extents);
}
cd->fetch_gtk_frame_extents = 0;
}
@ -4553,6 +4627,8 @@ static void
_e_comp_x_hook_client_new(void *d EINA_UNUSED, E_Client *ec)
{
Ecore_X_Window win;
Eina_List *pending;
Pending_Configure *pc;
E_COMP_X_PIXMAP_CHECK;
win = e_pixmap_window_get(ec->pixmap);
@ -4567,10 +4643,53 @@ _e_comp_x_hook_client_new(void *d EINA_UNUSED, E_Client *ec)
ec->changes.shape_input = 1;
ec->netwm.type = E_WINDOW_TYPE_UNKNOWN;
ec->icccm.state =ec->icccm.initial_state = ECORE_X_WINDOW_STATE_HINT_NONE;
ec->icccm.state = ec->icccm.initial_state = ECORE_X_WINDOW_STATE_HINT_NONE;
if (!_e_comp_x_client_new_helper(ec)) return;
ec->ignored |= e_comp->comp_type == E_PIXMAP_TYPE_WL;
pending = eina_hash_set(pending_configures, &win, NULL);
if (pending)
{
Eina_Bool request_pos = EINA_FALSE;
/* UGLY: round trip, but necessary to work around bad clients
* positioning windows anyway AND libreoffice trying to hack
* getting its windows across multiple screens this way
* which isnt really right either... */
ecore_x_icccm_size_pos_hints_get(win,
&request_pos,
&ec->icccm.gravity,
&ec->icccm.min_w,
&ec->icccm.min_h,
&ec->icccm.max_w,
&ec->icccm.max_h,
&ec->icccm.base_w,
&ec->icccm.base_h,
&ec->icccm.step_w,
&ec->icccm.step_h,
&ec->icccm.min_aspect,
&ec->icccm.max_aspect);
if (request_pos)
{
Eina_List *l;
E_Zone *zone;
pc = eina_list_last_data_get(pending);
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (E_INTERSECTS(pc->point.x, pc->point.y, ec->w, ec->h,
zone->x, zone->y, zone->w, zone->h))
{
e_client_zone_set(ec, zone);
break;
}
}
}
}
EINA_LIST_FREE(pending, pc)
{
ecore_timer_del(pc->timer);
free(pc);
}
ec->comp_data->first_damage = ec->internal;
@ -4599,6 +4718,7 @@ _e_comp_x_hook_client_focus_unset(void *d EINA_UNUSED, E_Client *ec)
focus_job_client = NULL;
E_FREE_FUNC(focus_job, ecore_job_del);
}
if (ec->override) return;
unfocus_job_client = ec;
if (!unfocus_job)
unfocus_job = ecore_job_add(_e_comp_x_hook_client_focus_unset_job, NULL);
@ -4615,7 +4735,7 @@ _e_comp_x_hook_client_focus_set_job(void *d EINA_UNUSED)
focus_canvas_time = 0;
if (!e_client_has_xwindow(ec))
{
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
e_grabinput_focus(e_comp->root, E_FOCUS_METHOD_PASSIVE);
return;
}
_e_comp_x_focus_setdown(ec);
@ -4643,6 +4763,7 @@ _e_comp_x_hook_client_focus_set(void *d EINA_UNUSED, E_Client *ec)
unfocus_job_client = NULL;
E_FREE_FUNC(unfocus_job, ecore_job_del);
}
if (ec->override) return;
focus_job_client = ec;
if (!focus_job)
focus_job = ecore_job_add(_e_comp_x_hook_client_focus_set_job, NULL);
@ -4693,6 +4814,15 @@ _e_comp_x_hook_client_unredirect(void *d EINA_UNUSED, E_Client *ec)
ecore_x_window_hide(e_comp->win);
}
static Eina_Bool
_e_comp_x_dead_win_timer(void *d)
{
uint32_t pwin = (uintptr_t)(uintptr_t*)d;
eina_hash_del_by_key(dead_wins, &pwin);
return EINA_FALSE;
}
static void
_e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
{
@ -4710,6 +4840,11 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
if (unfocus_job_client == ec) unfocus_job_client = NULL;
if ((!stopping) && cd && (!cd->deleted))
ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &visible, 1);
if (stopping && ec->iconic)
{
e_hints_window_iconic_set(ec);
e_hints_window_state_set(ec);
}
if ((!ec->already_unparented) && cd && cd->reparented)
{
_e_comp_x_focus_setdown(ec);
@ -4752,6 +4887,8 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
eina_hash_del_by_key(clients_win_hash, &pwin);
e_pixmap_parent_window_set(e_comp_x_client_pixmap_get(ec), 0);
ecore_x_window_free(pwin);
eina_hash_add(dead_wins, &pwin, (void*)1);
ecore_timer_add(0.5, _e_comp_x_dead_win_timer, (uintptr_t*)(uintptr_t)pwin);
}
if (ec->hacks.mapping_change)
@ -5107,6 +5244,8 @@ _e_comp_x_del(E_Comp *c)
E_FREE_FUNC(focus_job, ecore_job_del);
E_FREE_FUNC(unfocus_job, ecore_job_del);
free(c->x_comp_data);
c->x_comp_data = e_comp_x = NULL;
c->root = 0;
}
static void
@ -5225,7 +5364,7 @@ _e_comp_x_manage_windows(void)
}
if (ec)
{
if (ec->override)
if (ec->override || (!ec->icccm.fetch.hints))
{
_e_comp_x_client_evas_init(ec);
if (!ec->input_only)
@ -5374,7 +5513,6 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
}
if (!ecore_x_window_manage(root)) return EINA_FALSE;
E_OBJECT_DEL_SET(e_comp, _e_comp_x_del);
e_comp_x = e_comp->x_comp_data = E_NEW(E_Comp_X_Data, 1);
ecore_x_e_window_profile_supported_set(root, EINA_TRUE);
e_comp->cm_selection = ecore_x_window_input_new(root, 0, 0, 1, 1);
@ -5435,7 +5573,10 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
if (!e_comp_canvas_init(w, h)) return EINA_FALSE;
}
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
else
e_grabinput_focus(e_comp->root, E_FOCUS_METHOD_PASSIVE);
/* init layers */
for (i = e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); i <= e_comp_canvas_layer_map(E_LAYER_CLIENT_PRIO); i++)
@ -5485,6 +5626,7 @@ _e_comp_x_screens_setup(void)
{
Ecore_X_Window root;
int rw, rh;
Eina_Bool ret;
if (e_comp->comp_type == E_PIXMAP_TYPE_NONE)
{
@ -5500,7 +5642,12 @@ _e_comp_x_screens_setup(void)
ecore_x_window_size_get(root, &rw, &rh);
if (e_comp->comp_type == E_PIXMAP_TYPE_NONE)
e_randr2_screens_setup(rw, rh);
return _e_comp_x_setup(root, rw, rh);
ret = _e_comp_x_setup(root, rw, rh);
if (ret) return EINA_TRUE;
e_randr2_shutdown();
e_xinerama_screens_set(NULL);
e_comp->screen = NULL;
return EINA_FALSE;
}
E_API Eina_Bool
@ -5539,6 +5686,8 @@ e_comp_x_init(void)
clients_win_hash = eina_hash_int32_new(NULL);
damages_hash = eina_hash_int32_new(NULL);
alarm_hash = eina_hash_int32_new(NULL);
dead_wins = eina_hash_int32_new(NULL);
pending_configures = eina_hash_int32_new(NULL);
frame_extents = eina_hash_string_superfast_new(free);
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_DESK_SET, _e_comp_x_hook_client_desk_set, NULL));
@ -5590,7 +5739,8 @@ e_comp_x_init(void)
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_MAPPING_CHANGE, _e_comp_x_mapping_change, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_FOCUS_IN, _e_comp_x_focus_in, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_FOCUS_OUT, _e_comp_x_focus_out, NULL);
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_FOCUS_OUT, _e_comp_x_focus_out, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST,
_e_comp_x_move_resize_request, NULL);
@ -5668,17 +5818,18 @@ e_comp_x_init(void)
E_API void
e_comp_x_shutdown(void)
{
_e_comp_x_del(e_comp);
E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_FUNC(clients_win_hash, eina_hash_free);
E_FREE_FUNC(damages_hash, eina_hash_free);
E_FREE_FUNC(alarm_hash, eina_hash_free);
E_FREE_FUNC(pending_configures, eina_hash_free);
E_FREE_FUNC(frame_extents, eina_hash_free);
e_xsettings_shutdown();
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
ecore_x_screensaver_custom_blanking_disable();
if (x_fatal) return;
e_atoms_shutdown();
e_randr2_shutdown();
/* ecore_x_ungrab(); */
ecore_x_focus_reset();
ecore_x_events_allow_all();
@ -5759,6 +5910,7 @@ e_comp_x_xwayland_client_setup(E_Client *ec, E_Client *wc)
e_hints_window_visible_set(wc);
_e_comp_x_client_stack(wc);
wc->placed = placed;
if (!placed) wc->changes.pos = 0;
}
#endif

View File

@ -104,6 +104,8 @@ _is_lid_name(const char *name)
else if (strstr(name, "eDP")) return EINA_TRUE;
else if (strstr(name, "edp")) return EINA_TRUE;
else if (strstr(name, "EDP")) return EINA_TRUE;
else if (strstr(name, "DSI")) return EINA_TRUE;
else if (strstr(name, "dsi")) return EINA_TRUE;
return EINA_FALSE;
}

View File

@ -189,13 +189,7 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
if ((cfd->view->normal_win) || (e_config->cfgdlg_normal_wins))
cfd->dia = e_dialog_normal_win_new(cfd->parent, cfd->name, buf);
else
{
/* FIXME: REMOVE HACK FOR WAYLAND BEFORE RELEASE */
if (e_comp && e_comp->comp_type != E_PIXMAP_TYPE_WL)
cfd->dia = e_dialog_new(cfd->parent, cfd->name, buf);
else
cfd->dia = e_dialog_normal_win_new(cfd->parent, cfd->name, buf);
}
cfd->dia = e_dialog_new(cfd->parent, cfd->name, buf);
e_object_del_attach_func_set(E_OBJECT(cfd->dia),
_e_config_dialog_cb_dialog_del);
} /* window was created before - deleting content only */

View File

@ -52,7 +52,7 @@ e_confirm_dialog_show(const char *title, const char *icon, const char *text,
e_dialog_button_add(dia, !button_text ? _("Yes") : button_text, NULL, _e_confirm_dialog_yes, cd);
e_dialog_button_add(dia, !button2_text ? _("No") : button2_text, NULL, _e_confirm_dialog_no, cd);
e_dialog_button_focus_num(dia, 1);
e_dialog_button_focus_num(dia, 0);
elm_win_center(dia->win, 1, 1);
e_dialog_show(dia);

View File

@ -257,6 +257,7 @@ e_desk_show(E_Desk *desk)
E_OBJECT_CHECK(desk);
E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
if (desk->visible) return;
if (e_client_action_get() && e_client_util_resizing_get(e_client_action_get())) return;
desk2 = e_desk_at_xy_get(desk->zone, desk->zone->desk_x_current, desk->zone->desk_y_current);
if ((!starting) && (!desk2->visible)) return;
@ -290,6 +291,8 @@ e_desk_show(E_Desk *desk)
dy = desk->y - desk2->y;
}
_e_desk_hide_begin(desk2, dx, dy);
if (desk2->obstacles || desk->obstacles)
e_zone_useful_geometry_dirty(desk->zone);
}
desk->zone->desk_x_prev = desk->zone->desk_x_current;
@ -401,7 +404,9 @@ e_desk_last_focused_focus(E_Desk *desk)
EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
{
if ((!ec->iconic) && (evas_object_visible_get(ec->frame) || ec->changes.visible) &&
((ec->desk == desk) || ((ec->zone == desk->zone) && ec->sticky)) &&
((desk &&
((ec->desk == desk) || ((ec->zone == desk->zone) && ec->sticky))) ||
((!desk) && ec->desk->visible)) &&
(ec->icccm.accepts_focus || ec->icccm.take_focus) &&
(ec->netwm.type != E_WINDOW_TYPE_DOCK) &&
(ec->netwm.type != E_WINDOW_TYPE_TOOLBAR) &&
@ -616,6 +621,7 @@ e_desk_flip_end(E_Desk *desk)
{
E_Event_Desk_After_Show *ev;
E_Client *ec;
Eina_Bool do_global_focus = EINA_FALSE;
ev = E_NEW(E_Event_Desk_After_Show, 1);
ev->desk = desk;
@ -624,6 +630,21 @@ e_desk_flip_end(E_Desk *desk)
_e_desk_event_desk_after_show_free, NULL);
e_comp_shape_queue();
if (desk->zone->desk_flip_sync)
{
Eina_List *l;
E_Zone *zone;
Eina_Bool sync = EINA_FALSE;
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (zone != desk->zone)
sync |= zone->desk_flip_sync;
}
do_global_focus = !sync;
desk->zone->desk_flip_sync = 0;
if (!do_global_focus) return;
}
if (!e_config->focus_last_focused_per_desktop) return;
if ((e_config->focus_policy == E_FOCUS_MOUSE) ||
(e_config->focus_policy == E_FOCUS_SLOPPY))
@ -632,10 +653,17 @@ e_desk_flip_end(E_Desk *desk)
/* only set focus/warp pointer if currently focused window
* is on same screen (user hasn't switched screens during transition)
*/
if (ec && ec->desk && (ec->desk->zone != desk->zone)) return;
if (do_global_focus)
{
if (ec && e_client_util_desk_visible(ec, ec->desk)) return;
}
else
{
if (ec && ec->desk && (ec->desk->zone != desk->zone)) return;
}
}
if (starting) return;
ec = e_desk_last_focused_focus(desk);
ec = e_desk_last_focused_focus(do_global_focus ? NULL : desk);
if ((e_config->focus_policy != E_FOCUS_MOUSE) && (!ec))
{
/* we didn't previously have a focused window on this desk
@ -647,7 +675,7 @@ e_desk_flip_end(E_Desk *desk)
{
/* start with top and go down... */
if (e_client_util_ignored_get(ec)) continue;
if (!e_client_util_desk_visible(ec, desk)) continue;
if (!evas_object_visible_get(ec->frame)) continue;
if (ec->iconic) continue;
evas_object_focus_set(ec->frame, 1);
if (e_config->raise_on_revert_focus)

View File

@ -255,6 +255,7 @@ e_desklock_show(Eina_Bool suspend)
_e_custom_desklock_exe =
ecore_exe_run(e_config->desklock_custom_desklock_cmd, NULL);
_e_desklock_state = EINA_TRUE;
e_bindings_disabled_set(1);
/* TODO: ensure layer is correct on external desklocks? */
return 1;
}
@ -342,6 +343,7 @@ e_desklock_show(Eina_Bool suspend)
e_util_env_set("E_DESKLOCK_UNLOCKED", NULL);
e_util_env_set("E_DESKLOCK_LOCKED", "locked");
_e_desklock_state = EINA_TRUE;
e_bindings_disabled_set(1);
return 1;
lang_fail:
if (e_config->desklock_language)
@ -391,6 +393,7 @@ e_desklock_hide(void)
}
_e_desklock_state = EINA_FALSE;
e_bindings_disabled_set(0);
ev = E_NEW(E_Event_Desklock, 1);
ev->on = 0;
ev->suspend = 1;

View File

@ -716,6 +716,16 @@ _comp_object_add(E_Smart_Data *sd, int type EINA_UNUSED, E_Event_Comp_Object *ev
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
_client_del(E_Smart_Data *sd, int type EINA_UNUSED, E_Event_Client *ev)
{
Mirror *m = eina_hash_find(sd->mirror_hash, &ev->ec->frame);
if (m) m->ec = NULL;
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
_client_add(E_Smart_Data *sd, int type EINA_UNUSED, E_Event_Client *ev)
{
@ -818,6 +828,7 @@ e_deskmirror_add(E_Desk *desk, Eina_Bool pager, Eina_Bool taskbar)
E_LIST_HANDLER_APPEND(sd->handlers, E_EVENT_COMP_OBJECT_ADD, (Ecore_Event_Handler_Cb)_comp_object_add, sd);
E_LIST_HANDLER_APPEND(sd->handlers, E_EVENT_CLIENT_ADD, (Ecore_Event_Handler_Cb)_client_add, sd);
E_LIST_HANDLER_APPEND(sd->handlers, E_EVENT_CLIENT_REMOVE, (Ecore_Event_Handler_Cb)_client_del, sd);
E_LIST_HANDLER_APPEND(sd->handlers, E_EVENT_CLIENT_PROPERTY, (Ecore_Event_Handler_Cb)_client_property, sd);
E_LIST_HANDLER_APPEND(sd->handlers, E_EVENT_CLIENT_DESK_SET, (Ecore_Event_Handler_Cb)_client_desk_set, sd);
return o;

View File

@ -41,6 +41,7 @@ _e_dialog_internal_new(Evas_Object *parent, const char *name, const char *class,
elm_win_resize_object_add(dia->win, o);
e_theme_edje_object_set(o, "base/theme/dialog",
"e/widgets/dialog/main");
elm_layout_signal_emit(dia->bg_object, "e,state,buttons,off", "e");
evas_object_show(o);
o = e_widget_list_add(evas_object_evas_get(dia->win), 1, 1);
@ -97,6 +98,8 @@ e_dialog_button_add(E_Dialog *dia, const char *label, const char *icon, E_Dialog
if (!func) func = _e_dialog_del_func_cb;
o = e_widget_button_add(evas_object_evas_get(dia->win), label, icon, (void (*)(void *, void *))func, data, dia);
e_widget_list_object_append(dia->box_object, o, 1, 0, 0.5);
if (!dia->buttons)
elm_layout_signal_emit(dia->bg_object, "e,state,buttons,on", "e");
dia->buttons = eina_list_append(dia->buttons, o);
}
@ -201,17 +204,10 @@ e_dialog_border_icon_set(E_Dialog *dia, const char *icon)
E_API void
e_dialog_content_set(E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
{
int mw, mh;
dia->content_object = obj;
e_widget_on_focus_hook_set(obj, _e_dialog_cb_wid_on_focus, dia);
evas_object_size_hint_min_set(obj, minw, minh);
elm_object_part_content_set(dia->bg_object, "e.swallow.content", obj);
elm_layout_sizing_eval(dia->bg_object);
evas_object_smart_calculate(dia->bg_object);
evas_object_size_hint_min_get(dia->bg_object, &mw, &mh);
evas_object_resize(dia->win, mw, mh);
dia->min_w = mw;
dia->min_h = mh;
evas_object_show(obj);
}
@ -223,8 +219,7 @@ e_dialog_resizable_set(E_Dialog *dia, int resizable)
{
if (resizable)
{
evas_object_size_hint_max_set(dia->bg_object, 99999, 99999);
evas_object_size_hint_weight_set(dia->bg_object, 1, 1);
E_EXPAND(dia->bg_object);
e_util_win_auto_resize_fill(dia->win);
elm_layout_signal_emit(dia->bg_object, "e,state,resizable", "e");
}
@ -232,7 +227,6 @@ e_dialog_resizable_set(E_Dialog *dia, int resizable)
{
evas_object_resize(dia->win, dia->min_w, dia->min_h);
evas_object_size_hint_weight_set(dia->bg_object, 0, 0);
evas_object_size_hint_max_set(dia->bg_object, dia->min_w, dia->min_h);
elm_layout_signal_emit(dia->bg_object, "e,state,no_resizable", "e");
}
}
@ -248,26 +242,33 @@ e_dialog_show(E_Dialog *dia)
if (o)
elm_object_part_content_set(dia->bg_object, "e.swallow.content", o);
if (dia->min_w && dia->min_h)
mw = dia->min_w, mh = dia->min_h;
else
evas_object_size_hint_min_get(dia->bg_object, &mw, &mh);
edje_object_message_signal_process(elm_layout_edje_get(dia->bg_object));
elm_layout_sizing_eval(dia->bg_object);
evas_object_smart_calculate(dia->bg_object);
evas_object_size_hint_min_get(dia->bg_object, &mw, &mh);
dia->min_w = mw;
dia->min_h = mh;
evas_object_resize(dia->win, mw, mh);
if (!dia->resizable)
{
evas_object_size_hint_weight_set(dia->bg_object, 0, 0);
evas_object_size_hint_max_set(dia->bg_object, mw, mh);
e_util_win_auto_resize_fill(dia->win);
}
else
{
evas_object_size_hint_max_set(dia->win, 99999, 99999);
E_EXPAND(dia->bg_object);
e_util_win_auto_resize_fill(dia->win);
}
evas_object_show(dia->win);
if (!e_widget_focus_get(dia->box_object))
e_widget_focus_set(dia->box_object, 1);
{
E_Client *ec = e_win_client_get(dia->win);
if (ec->focused && (e_config->pointer_slide || (!e_client_focus_policy_click(ec))))
e_client_pointer_warp_to_center_now(ec);
}
}
/* local subsystem functions */

View File

@ -48,6 +48,7 @@ static Ecore_Window _drag_win_root = 0;
static Eina_List *_drag_list = NULL;
static E_Drag *_drag_current = NULL;
static Ecore_Window drop_win;
static XDnd *_xdnd = NULL;
static Ecore_X_Atom _text_atom = 0;
@ -670,7 +671,7 @@ _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy)
break;
case E_GADCON_CLIENT_TYPE:
gc = ((E_Gadcon_Client *)(h->obj))->gadcon;
gc = ((E_Gadcon_Client *)(void *)(h->obj))->gadcon;
e_gadcon_canvas_zone_geometry_get(gc, &px, &py, NULL, NULL);
if (!gc->toolbar) break;
{
@ -689,8 +690,8 @@ _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy)
break;
case E_CLIENT_TYPE:
px = ((E_Client *)(h->obj))->x;
py = ((E_Client *)(h->obj))->y;
px = ((E_Client *)(void *)(h->obj))->x;
py = ((E_Client *)(void *)(h->obj))->y;
break;
/* FIXME: add more types as needed */
@ -716,7 +717,7 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd)
switch (h->obj->type)
{
case E_GADCON_CLIENT_TYPE:
gc = ((E_Gadcon_Client *)(h->obj))->gadcon;
gc = ((E_Gadcon_Client *)(void *)(h->obj))->gadcon;
if (!gc) return 0;
/* no break */
case E_GADCON_TYPE:
@ -732,11 +733,10 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd)
case E_CLIENT_TYPE:
case E_ZONE_TYPE:
hwin = e_comp->ee_win;
break;
/* FIXME: add more types as needed */
default:
/* protect against crashes during shutdown */
if (e_comp)
hwin = e_comp->ee_win;
break;
}
}
@ -769,7 +769,7 @@ _e_drag_win_show(E_Drop_Handler *h)
break;
case E_GADCON_CLIENT_TYPE:
shelf = e_gadcon_shelf_get(((E_Gadcon_Client *)(h->obj))->gadcon);
shelf = e_gadcon_shelf_get(((E_Gadcon_Client *)(void *)(h->obj))->gadcon);
if (shelf) e_shelf_toggle(shelf, 1);
break;
@ -796,7 +796,7 @@ _e_drag_win_hide(E_Drop_Handler *h)
break;
case E_GADCON_CLIENT_TYPE:
shelf = e_gadcon_shelf_get(((E_Gadcon_Client *)(h->obj))->gadcon);
shelf = e_gadcon_shelf_get(((E_Gadcon_Client *)(void *)(h->obj))->gadcon);
if (shelf) e_shelf_toggle(shelf, 0);
break;
@ -829,6 +829,30 @@ _e_dnd_object_layer_get(E_Drop_Handler *h)
return adjust;
}
static Ecore_Window
_dnd_top_window_at_xy_get(Evas_Coord x, Evas_Coord y)
{
E_Client *ec;
Eina_List *objs, *l;
Evas_Object *o;
if (_drag_current->type == E_DRAG_INTERNAL)
return e_comp_top_window_at_xy_get(x, y);
objs = evas_objects_at_xy_get(e_comp->evas, x, y, 0, 0);
if (!objs) return e_comp->ee_win;
EINA_LIST_FOREACH(objs, l, o)
{
ec = evas_object_data_get(o, "E_Client");
if (ec)
{
eina_list_free(objs);
return e_client_util_pwin_get(ec);
}
}
eina_list_free(objs);
return e_comp->ee_win;
}
static int
_e_drag_update(Ecore_Window root, int x, int y, unsigned int action)
{
@ -845,7 +869,7 @@ _e_drag_update(Ecore_Window root, int x, int y, unsigned int action)
// double t1 = ecore_time_get(); ////
if (_drag_current && !_xdnd)
win = e_comp_top_window_at_xy_get(x, y);
win = _dnd_top_window_at_xy_get(x, y);
else
win = root;
@ -969,7 +993,7 @@ _e_drag_end(int x, int y)
int dropped = 0;
if (!_drag_current) return;
win = e_comp_top_window_at_xy_get(x, y);
win = _dnd_top_window_at_xy_get(x, y);
zone = e_comp_zone_xy_get(x, y);
/* Pass -1, -1, so that it is possible to drop at the edge. */
if (zone) e_zone_flip_coords_handle(zone, -1, -1);
@ -986,6 +1010,8 @@ _e_drag_end(int x, int y)
{
if (!(dropped = ecore_x_dnd_drop()))
break;
else
drop_win = win;
}
else
#endif
@ -1028,6 +1054,7 @@ _e_drag_end(int x, int y)
((h->cb.drop) && (E_INSIDE(ev.x, ev.y, h->x, h->y, h->w, h->h))))
{
Eina_Bool need_free = EINA_FALSE;
Eina_List *list;
if (_drag_current->cb.convert)
{
@ -1061,7 +1088,8 @@ _e_drag_end(int x, int y)
ev.data = _drag_current->data;
}
h->cb.drop(h->cb.data, h->active_type, &ev);
if (need_free) E_FREE_LIST(ev.data, free);
list = ev.data;
if (need_free) E_FREE_LIST(list, free);
dropped = 1;
}
h->entered = 0;
@ -1072,8 +1100,6 @@ _e_drag_end(int x, int y)
_drag_current->cb.finished = NULL;
e_object_del(E_OBJECT(_drag_current));
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
e_comp_ungrab_input(1, 1);
}
static void
@ -1134,6 +1160,7 @@ _e_drag_free(E_Drag *drag)
if (drag->cb.finished)
drag->cb.finished(drag, 0);
drag->cb.finished = NULL;
drop_win = 0;
}
_drag_current = NULL;
@ -1153,7 +1180,11 @@ _e_drag_free(E_Drag *drag)
ecore_x_window_free(_drag_win);
ecore_x_window_shadow_tree_flush();
}
else
#endif
{
e_comp_ungrab_input(1, 1);
}
e_bindings_disabled_set(0);
_drag_win = 0;
}
@ -1311,7 +1342,12 @@ _e_dnd_cb_event_hide(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event
const Eina_List *l;
id = e_util_winid_str_get(ev->win);
if (!eina_hash_find(_drop_win_hash, id)) return ECORE_CALLBACK_PASS_ON;
if (!eina_hash_find(_drop_win_hash, id))
{
if (_drag_current && _drag_current->ended && (drop_win == ev->win))
e_object_del(E_OBJECT(_drag_current));
return ECORE_CALLBACK_RENEW;
}
leave_ev.x = 0;
leave_ev.y = 0;

View File

@ -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;

View File

@ -65,7 +65,7 @@ static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas,
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static Evas_Object *_dialog_scrolltext_create(Evas *evas, char *title, Ecore_Exe_Event_Data_Line *lines);
static void _dialog_save_cb(void *data, void *data2);
static void _e_exec_instance_free(E_Exec_Instance *inst);
static Eina_Bool _e_exec_instance_free(E_Exec_Instance *inst);
/* local subsystem globals */
static Eina_List *e_exec_start_pending = NULL;
@ -211,14 +211,14 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
return inst;
}
E_API void
E_API Eina_Bool
e_exec_phony_del(E_Exec_Instance *inst)
{
if (!inst) return;
EINA_SAFETY_ON_TRUE_RETURN(!inst->phony);
if (!inst) return EINA_TRUE;
EINA_SAFETY_ON_TRUE_RETURN_VAL(!inst->phony, EINA_FALSE);
inst->ref--;
_e_exe_instance_watchers_call(inst, E_EXEC_WATCH_STOPPED);
_e_exec_instance_free(inst);
return _e_exec_instance_free(inst);
}
E_API E_Exec_Instance *
@ -270,8 +270,6 @@ e_exec_phony(E_Client *ec)
return NULL;
}
inst->used = 1;
ec->exe_inst = inst;
inst->clients = eina_list_append(inst->clients, ec);
if (ec->zone) inst->screen = ec->zone->num;
if (ec->desk)
{
@ -284,6 +282,7 @@ e_exec_phony(E_Client *ec)
else eina_hash_add(e_exec_instances, inst->key, lnew);
inst->ref++;
ecore_event_add(E_EVENT_EXEC_NEW, inst, _e_exec_cb_exec_new_free, inst);
e_exec_instance_client_add(inst, ec);
return inst;
}
@ -505,10 +504,11 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
else if (desktop && desktop->url)
{
char *sb;
size_t size = 4096, len = sizeof(E_BINDIR "/enlightenment_open ") - 1;
size_t size = 65536, len;
sb = malloc(size);
memcpy(sb, E_BINDIR "/enlightenment_open ", len);
snprintf(sb, size, "%s/enlightenment_open ", e_prefix_bin_get());
len = strlen(sb);
sb = e_util_string_append_quoted(sb, &size, &len, desktop->url);
exe = ecore_exe_run(sb, inst);
free(sb);
@ -586,13 +586,13 @@ _e_exec_cb_expire_timer(void *data)
return ECORE_CALLBACK_CANCEL;
}
static void
static Eina_Bool
_e_exec_instance_free(E_Exec_Instance *inst)
{
Eina_List *instances;
E_Client *ec;
if (inst->ref) return;
if (inst->ref) return EINA_FALSE;
E_FREE_LIST(inst->watchers, free);
if (inst->key)
{
@ -611,8 +611,9 @@ _e_exec_instance_free(E_Exec_Instance *inst)
{
inst->deleted = 1;
inst->ref++;
E_LIST_FOREACH(inst->clients, e_object_ref);
ecore_event_add(E_EVENT_EXEC_DEL, inst, _e_exec_cb_exec_del_free, inst);
return;
return EINA_FALSE;
}
if (inst->desktop)
e_exec_start_pending = eina_list_remove(e_exec_start_pending,
@ -621,6 +622,7 @@ _e_exec_instance_free(E_Exec_Instance *inst)
EINA_LIST_FREE(inst->clients, ec)
{
ec->exe_inst = NULL;
e_object_unref(E_OBJECT(ec));
}
if (inst->desktop) efreet_desktop_free(inst->desktop);
if (!inst->phony)
@ -628,6 +630,7 @@ _e_exec_instance_free(E_Exec_Instance *inst)
if (inst->exe) ecore_exe_data_set(inst->exe, NULL);
}
free(inst);
return EINA_TRUE;
}
/*

View File

@ -36,7 +36,7 @@ EINTERN int e_exec_shutdown(void);
E_API void e_exec_executor_set(E_Exec_Instance *(*func) (void *data, E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method), const void *data);
E_API E_Exec_Instance *e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method);
E_API E_Exec_Instance *e_exec_phony(E_Client *ec);
E_API void e_exec_phony_del(E_Exec_Instance *inst);
E_API Eina_Bool e_exec_phony_del(E_Exec_Instance *inst);
E_API E_Exec_Instance *e_exec_startup_id_pid_instance_find(int id, pid_t pid);
E_API Efreet_Desktop *e_exec_startup_id_pid_find(int startup_id, pid_t pid);
E_API E_Exec_Instance *e_exec_startup_desktop_instance_find(Efreet_Desktop *desktop);

View File

@ -547,7 +547,7 @@ _e_fm2_icon_path(const E_Fm2_Icon *ic, char *buf, int buflen)
static inline Eina_Bool
_e_fm2_ext_is_edje(const char *ext)
{
#if E_FM2_SIMPLE_STRCASE_FILES
#ifdef E_FM2_SIMPLE_STRCASE_FILES
if ((ext[0] == 'e') && (ext[1] == 'd') && (ext[2] == 'j'))
return 1;
else if ((ext[0] == 'E') && (ext[1] == 'D') && (ext[2] == 'J'))
@ -562,7 +562,7 @@ _e_fm2_ext_is_edje(const char *ext)
static inline Eina_Bool
_e_fm2_ext_is_desktop(const char *ext)
{
#if E_FM2_SIMPLE_STRCASE_FILES
#ifdef E_FM2_SIMPLE_STRCASE_FILES
if ((ext[0] == 'd') &&
((strcmp(ext + 1, "esktop") == 0) ||
(strcmp(ext + 1, "irectory") == 0)))
@ -586,7 +586,7 @@ _e_fm2_ext_is_desktop(const char *ext)
static inline Eina_Bool
_e_fm2_ext_is_imc(const char *ext)
{
#if E_FM2_SIMPLE_STRCASE_FILES
#ifdef E_FM2_SIMPLE_STRCASE_FILES
if ((ext[0] == 'i') && (ext[1] == 'm') && (ext[2] == 'c'))
return 1;
else if ((ext[0] == 'I') && (ext[1] == 'M') && (ext[2] == 'C'))
@ -1513,6 +1513,22 @@ e_fm2_all_list_get(Evas_Object *obj)
return list;
}
E_API E_Fm2_Icon_Info *
e_fm2_icon_file_get(Evas_Object *obj, const char *file)
{
Eina_List *l;
E_Fm2_Icon *ic;
EFM_SMART_CHECK(NULL);
if (!file) return NULL;
EINA_LIST_FOREACH(sd->icons, l, ic)
{
if ((ic->info.file) && (!strcmp(ic->info.file, file)))
return &(ic->info);
}
return NULL;
}
E_API void
e_fm2_deselect_all(Evas_Object *obj)
{
@ -3207,7 +3223,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
if (!e->data) return;
#define UP(value, type) (value) = *(type *)p; p += sizeof(type)
#define UP(value, type) (value) = *(type *)(void *)p; p += sizeof(type)
UP(percent, int);
UP(seconds, int);
UP(done, off_t);
@ -7045,7 +7061,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
}
}
}
else
else if (sd->realpath)
{
if (_e_fm2_view_mode_get(sd) == E_FM2_VIEW_MODE_LIST && sd->order_file) /* list */
{
@ -9065,6 +9081,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
Eina_List *l = NULL;
int x, y, can_w, can_w2, protect;
char buf[PATH_MAX], *ext;
Eina_Bool writable;
sd = ic->sd;
if (ic->menu) return;
@ -9077,6 +9094,8 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
sd->icon_menu.replace.func(sd->icon_menu.replace.data, sd->obj, mn, &ic->info);
else
{
writable = ecore_file_can_write(sd->realpath);
if (sd->icon_menu.start.func)
sd->icon_menu.start.func(sd->icon_menu.start.data, sd->obj, mn, &ic->info);
if (!(sd->icon_menu.flags & E_FM2_MENU_NO_VIEW_MENU))
@ -9115,7 +9134,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
}
/* FIXME: stat the dir itself - move to e_fm_main */
if (ecore_file_can_write(sd->realpath) && !(sd->icon_menu.flags & E_FM2_MENU_NO_NEW))
if (writable && !(sd->icon_menu.flags & E_FM2_MENU_NO_NEW))
{
mi = e_menu_item_new(mn);
e_menu_item_separator_set(mi, 1);
@ -9194,7 +9213,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
{
if (!(sd->icon_menu.flags & E_FM2_MENU_NO_CUT))
{
if (ecore_file_can_write(sd->realpath))
if (writable)
{
mi = e_menu_item_new(mn);
e_menu_item_separator_set(mi, 1);
@ -9207,7 +9226,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
}
if (!(sd->icon_menu.flags & E_FM2_MENU_NO_COPY))
{
if (!ecore_file_can_write(sd->realpath))
if (!writable)
{
mi = e_menu_item_new(mn);
e_menu_item_separator_set(mi, 1);
@ -9222,7 +9241,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
if (((!(sd->icon_menu.flags & E_FM2_MENU_NO_PASTE)) ||
(!(sd->icon_menu.flags & E_FM2_MENU_NO_SYMLINK))) &&
(eina_list_count(_e_fm_file_buffer) > 0) &&
ecore_file_can_write(sd->realpath))
writable)
{
if (!(sd->icon_menu.flags & E_FM2_MENU_NO_PASTE))
{
@ -10032,8 +10051,12 @@ _e_fm2_view_menu_pre(void *data, E_Menu *subm)
if (_e_fm2_desktop_open(sd) < 0) return;
e_object_data_set(E_OBJECT(subm), sd);
e_object_del_attach_func_set(E_OBJECT(subm), _e_fm2_view_menu_del);
mi = e_menu_item_new(subm);
e_menu_item_separator_set(mi, 1);
if (e_menu_item_nth(subm, 0) != NULL)
{
mi = e_menu_item_new(subm);
e_menu_item_separator_set(mi, 1);
}
mi = e_menu_item_new(subm);
e_menu_item_label_set(mi, _("Set background..."));
@ -10997,7 +11020,7 @@ _e_fm2_file_delete(Evas_Object *obj)
e_object_del_attach_func_set(E_OBJECT(dialog), _e_fm2_file_delete_delete_cb);
e_dialog_button_add(dialog, _("Delete"), NULL, _e_fm2_file_delete_yes_cb, ic);
e_dialog_button_add(dialog, _("No"), NULL, _e_fm2_file_delete_no_cb, ic);
e_dialog_button_focus_num(dialog, 1);
e_dialog_button_focus_num(dialog, 0);
e_dialog_title_set(dialog, _("Confirm Delete"));
e_dialog_icon_set(dialog, "dialog-warning", 64);
sel = e_fm2_selected_list_get(obj);
@ -11087,6 +11110,7 @@ _e_fm2_file_delete_yes_cb(void *data, E_Dialog *dialog)
}
}
}
evas_object_pass_events_set(ici->ic->obj, 1);
}
eina_list_free(sel);
}
@ -11095,6 +11119,7 @@ _e_fm2_file_delete_yes_cb(void *data, E_Dialog *dialog)
if (sel) eina_list_free(sel);
_e_fm2_icon_realpath(ic, buf, sizeof(buf));
if (e_filereg_file_protected(buf)) return;
evas_object_pass_events_set(ic->obj, 1);
files = e_util_string_append_quoted(files, &size, &len, buf);
}
if (files)

View File

@ -169,6 +169,7 @@ E_API void e_fm2_config_set(Evas_Object *obj, E_Fm2_Config *cfg);
E_API E_Fm2_Config *e_fm2_config_get(Evas_Object *obj);
E_API Eina_List *e_fm2_selected_list_get(Evas_Object *obj);
E_API Eina_List *e_fm2_all_list_get(Evas_Object *obj);
E_API E_Fm2_Icon_Info *e_fm2_icon_file_get(Evas_Object *obj, const char *file);
E_API void e_fm2_select_set(Evas_Object *obj, const char *file, int select);
E_API void e_fm2_deselect_all(Evas_Object *obj);
E_API void e_fm2_file_show(Evas_Object *obj, const char *file);

View File

@ -9,6 +9,7 @@ EFM_CPPFLAGS = \
@VALGRIND_CFLAGS@ \
@EDJE_DEF@ \
@WAYLAND_CFLAGS@ \
@WAYLAND_EGL_CFLAGS@ \
-DPACKAGE_BIN_DIR=\"@PACKAGE_BIN_DIR@\" \
-DPACKAGE_LIB_DIR=\"@PACKAGE_LIB_DIR@\" \
-DPACKAGE_DATA_DIR=\"@PACKAGE_DATA_DIR@\" \

View File

@ -718,7 +718,7 @@ _e_fm_ipc_cb_server_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *eve
relative = p;
p += strlen(relative) + 1;
after = *((int *)p);
memcpy(&after, p, sizeof(int));
_e_fm_ipc_reorder(file, dst, relative, after);
}

View File

@ -683,9 +683,11 @@ _e_fm2_device_check_desktop_icons_list_cb(const char *name, const char *path, vo
static void
_e_fm2_device_check_desktop_icons_cb(void *data, Ecore_Thread *eth EINA_UNUSED)
{
Eina_List *list = data;
eina_file_dir_list(efreet_desktop_dir_get(), EINA_FALSE, _e_fm2_device_check_desktop_icons_list_cb, data);
E_FREE_LIST(data, free);
E_FREE_LIST(list, free);
}
E_API void

View File

@ -557,7 +557,7 @@ _e_fm_op_stdin_data(void *data EINA_UNUSED, Ecore_Fd_Handler *fd_handler)
begin = buf;
/* Check magic. */
if (*((int *)buf) != E_FM_OP_MAGIC)
if (*((int *)(void *)buf) != E_FM_OP_MAGIC)
{
E_FM_OP_DEBUG("Error while reading from STDIN: magic is not correct!\n");
break;
@ -975,9 +975,9 @@ _e_fm_op_send_error(E_Fm_Op_Task *task, E_Fm_Op_Type type, const char *fmt, ...)
vsnprintf(str, READBUFSIZE - 3 * sizeof(int), fmt, ap);
len = strlen(str);
*((int *)buf) = E_FM_OP_MAGIC;
*((int *)(buf + sizeof(int))) = type;
*((int *)(buf + (2 * sizeof(int)))) = len + 1;
*((int *)(void *)buf) = E_FM_OP_MAGIC;
*((int *)(void *)(buf + sizeof(int))) = type;
*((int *)(void *)(buf + (2 * sizeof(int)))) = len + 1;
if (write(STDOUT_FILENO, buf, (3 * sizeof(int)) + len + 1) < 0)
perror("write");

View File

@ -389,69 +389,75 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
of = e_widget_frametable_add(evas, _("General"), 1);
ob = e_widget_label_add(evas, _("Name:"));
e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->file), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 0, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("Location:"));
e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->location), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 1, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("Size:"));
e_widget_table_object_append(ot, ob, 0, 2, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->size), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 2, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("Occupied blocks on disk:"));
e_widget_table_object_append(ot, ob, 0, 3, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 3, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->blocks), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 3, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 3, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("Last Accessed:"));
e_widget_table_object_append(ot, ob, 0, 4, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 4, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->acc_date), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 4, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 4, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("Last Modified:"));
e_widget_table_object_append(ot, ob, 0, 5, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 5, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->mod_date), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 5, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 5, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("Last Modified Permissions:"));
e_widget_table_object_append(ot, ob, 0, 6, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 6, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->pms_date), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 6, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 6, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("File Type:"));
e_widget_table_object_append(ot, ob, 0, 7, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 0, 7, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(win, &(cfdata->mime), NULL, NULL, NULL);
e_widget_size_min_get(ob, NULL, &mh);
e_widget_size_min_set(ob, 140, mh);
e_widget_entry_readonly_set(ob, 1);
e_widget_table_object_append(ot, ob, 1, 7, 1, 1, 1, 0, 1, 0);
e_widget_frametable_object_append(of, ob, 1, 7, 1, 1, 1, 0, 1, 0);
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, ot, 1, 0, 0, 1, 1, 1, 1, 1);
of = e_widget_frametable_add(evas, _("Permissions"), 0);
ob = e_widget_entry_add(win, &(cfdata->owner), NULL, NULL, NULL);
@ -483,10 +489,10 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
ob = e_widget_check_add(evas, _("execute"), &(cfdata->others_exec));
e_widget_frametable_object_append(of, ob, 2, 3, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(ot, of, 0, 8, 2, 1, 1, 0, 1, 0);
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, ot, 0, 0, 1, 1, 1, 1, 1, 1);
of = e_widget_frametable_add(evas, _("Preview"), 0);
ot = e_widget_table_add(e_win_evas_win_get(evas), 0);

View File

@ -22,10 +22,10 @@ _e_fm_shared_device_storage_free(E_Storage *s)
eina_stringshare_del(s->serial);
eina_stringshare_del(s->icon.drive);
eina_stringshare_del(s->icon.volume);
#if HAVE_UDISKS_MOUNT
#ifdef HAVE_UDISKS_MOUNT
eina_stringshare_del(s->dbus_path);
#endif
#if HAVE_EEZE_MOUNT
#ifdef HAVE_EEZE_MOUNT
if (s->disk) eeze_disk_free(s->disk);
#endif
free(s);
@ -47,7 +47,7 @@ _e_fm_shared_device_volume_free(E_Volume *v)
if (v->partition_label) eina_stringshare_del(v->partition_label);
if (v->mount_point) eina_stringshare_del(v->mount_point);
if (v->parent) eina_stringshare_del(v->parent);
#if HAVE_UDISKS_MOUNT
#ifdef HAVE_UDISKS_MOUNT
eina_stringshare_del(v->dbus_path);
#endif
free(v);

View File

@ -69,8 +69,8 @@ struct E_Gadget_Config
Evas_Point offset; //offset from mouse down
Evas_Point down; //coords from mouse down
E_Gadget_Config *orig; //gadget is a copy of the original gadget during a move
E_Gadget_Site_Anchor resizing;
Eina_Bool moving : 1;
Eina_Bool resizing : 1;
Eina_Bool display_del : 1; //deleted using ->display
};
@ -99,7 +99,7 @@ static Evas_Object *desklock_rect;
static Eina_Bool added = 1;
static Evas_Object *pointer_site;
static Eina_List *handlers;
static Eina_List *pointer_site_handlers;
static Eina_Hash *gadget_types;
static E_Gadget_Sites *sites;
@ -186,6 +186,9 @@ _gadget_reparent(E_Gadget_Site *zgs, E_Gadget_Config *zgc)
if (!zgs->orient)
{
evas_object_layer_set(zgc->display, evas_object_layer_get(zgs->layout));
evas_object_stack_below(zgc->display, zgs->events);
if (evas_object_visible_get(zgs->events))
evas_object_show(zgc->display);
return;
}
switch (zgs->gravity)
@ -262,6 +265,7 @@ _gadget_object_free(E_Object *eobj)
evas_object_event_callback_del_full(zgc->display, EVAS_CALLBACK_DEL, _gadget_del, zgc);
E_FREE_FUNC(zgc->display, evas_object_del);
}
zgc->gadget = NULL;
E_FREE_FUNC(zgc->gadget, evas_object_del);
E_FREE_FUNC(zgc->cfg_object, evas_object_del);
E_FREE_FUNC(zgc->style.obj, evas_object_del);
@ -269,6 +273,16 @@ _gadget_object_free(E_Object *eobj)
E_FREE(zgc->e_obj_inherit);
zgc->configure = NULL;
zgc->display_del = zgc->moving = zgc->resizing = 0;
if (zgc->id == -1) _gadget_free(zgc);
}
static void
_gadget_remove(E_Gadget_Config *zgc)
{
evas_object_smart_callback_call(zgc->site->layout, "gadget_removed", zgc->gadget);
zgc->site->gadget_list = eina_inlist_remove(zgc->site->gadget_list, EINA_INLIST_GET(zgc));
zgc->site->gadgets = eina_list_remove(zgc->site->gadgets, zgc);
_gadget_free(zgc);
}
static void
@ -277,7 +291,11 @@ _gadget_wizard_end(void *data, int id)
E_Gadget_Config *zgc = data;
zgc->id = id;
_gadget_object_finalize(zgc);
evas_object_smart_callback_call(zgc->site->layout, "gadget_site_unlocked", NULL);
if (id)
_gadget_object_finalize(zgc);
else
_gadget_remove(zgc);
}
static Eina_Bool
@ -293,7 +311,9 @@ _gadget_object_create(E_Gadget_Config *zgc)
{
if (t->wizard)
{
evas_object_smart_callback_call(zgc->site->layout, "gadget_site_locked", NULL);
t->wizard(_gadget_wizard_end, zgc);
added = 1;
return EINA_TRUE;
}
}
@ -303,6 +323,7 @@ _gadget_object_create(E_Gadget_Config *zgc)
*/
g = t->cb(zgc->site->layout, &zgc->id, zgc->site->orient);
EINA_SAFETY_ON_NULL_RETURN_VAL(g, EINA_FALSE);
added = 1;
zgc->e_obj_inherit = E_OBJECT_ALLOC(E_Object, E_GADGET_TYPE, _gadget_object_free);
e_object_data_set(zgc->e_obj_inherit, g);
@ -312,7 +333,9 @@ _gadget_object_create(E_Gadget_Config *zgc)
if (zgc->site->style_cb)
zgc->site->style_cb(zgc->site->layout, zgc->style.name, g);
evas_object_event_callback_add(g, EVAS_CALLBACK_DEL, _gadget_del, zgc);
if (!zgc->site->orient)
evas_object_smart_need_recalculate_set(zgc->site->layout, 1);
evas_object_event_callback_priority_add(g, EVAS_CALLBACK_DEL, EVAS_CALLBACK_PRIORITY_AFTER, _gadget_del, zgc);
_gadget_reparent(zgc->site, zgc);
elm_object_tree_focus_allow_set(zgc->gadget, 0);
evas_object_raise(zgc->site->events);
@ -368,32 +391,39 @@ _site_gadget_resize(Evas_Object *g, int w, int h, Evas_Coord *ww, Evas_Coord *hh
else
{
*ww = mnw, *hh = mnh;
if (!(*ww)) *ww = w;
if (!(*hh)) *hh = h;
if ((!(*ww)) || ((*ww) < w)) *ww = w;
if ((!(*hh)) || ((*hh) < h)) *hh = h;
}
if (aspect && ax && ay)
{
switch (aspect)
{
case EVAS_ASPECT_CONTROL_HORIZONTAL:
*hh = (*ww * ay / ax);
*hh = (*ww * (double)ay / ax);
break;
case EVAS_ASPECT_CONTROL_VERTICAL:
*ww = (*hh * ax / ay);
*ww = (*hh * (double)ax / ay);
break;
default:
if (IS_HORIZ(zgc->site->orient))
*ww = (*hh * ax / ay);
*ww = (*hh * (double)ax / ay);
else if (IS_VERT(zgc->site->orient))
*hh = (*ww * ay / ax);
else
*hh = (*ww * (double)ay / ax);
else if (aspect)
{
double ar = ax / (double) ay;
if (ar > 1.0)
*hh = (*ww * ay / ax);
if (ax == ay)
{
if (*ww > *hh)
*hh = *ww;
else
*ww = *hh;
}
else if (ar > 1.0)
*hh = (*ww * (double)ay / ax);
else
*ww = (*hh * ax / ay);
*ww = (*hh * (double)ax / ay);
}
}
}
@ -405,6 +435,11 @@ _site_gadget_resize(Evas_Object *g, int w, int h, Evas_Coord *ww, Evas_Coord *hh
if ((mxw >= 0) && (mxw < *ow)) *ow = mxw;
if ((mxh >= 0) && (mxh < *oh)) *oh = mxh;
}
if (!zgc->site->orient)
{
if ((w < (*ow)) || (h < (*oh)))
evas_object_smart_need_recalculate_set(zgc->gadget, 1);
}
//fprintf(stderr, "%s: %dx%d\n", zgc->type, *ow, *oh);
evas_object_resize(zgc->display, *ow, *oh);
}
@ -429,8 +464,12 @@ _site_layout_orient(Evas_Object *o, E_Gadget_Site *zgs)
Eina_List *l;
double ax, ay;
E_Gadget_Config *zgc;
int mw, mh, sw, sh;
evas_object_geometry_get(o, &x, &y, &w, &h);
if ((!w) && (!h)) return;
evas_object_size_hint_min_get(o, &mw, &mh);
evas_object_size_hint_min_get(zgs->layout, &sw, &sh);
evas_object_geometry_set(zgs->events, x, y, w, h);
evas_object_box_align_get(o, &ax, &ay);
@ -495,9 +534,14 @@ _site_layout_orient(Evas_Object *o, E_Gadget_Site *zgs)
else if (IS_VERT(zgs->orient))
zgs->cur_size = abs(yy - y);
evas_object_size_hint_min_set(o,
IS_HORIZ(zgs->orient) ? zgs->cur_size : w,
IS_VERT(zgs->orient) ? zgs->cur_size : h);
w = IS_HORIZ(zgs->orient) ? zgs->cur_size : w;
h = IS_VERT(zgs->orient) ? zgs->cur_size : h;
if ((w == mw) && (h == mh) && (sw == sh) && (sw == -1))
{
/* FIXME: https://phab.enlightenment.org/T4747 */
evas_object_size_hint_min_set(o, -1, -1);
}
evas_object_size_hint_min_set(o, w, h);
}
static void
@ -521,22 +565,28 @@ _site_layout(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data)
_site_layout_orient(o, zgs);
return;
}
if ((!w) || (!h)) return;
EINA_LIST_FOREACH(zgs->gadgets, l, zgc)
{
Evas_Coord gx = xx, gy = yy;
int ww, hh, ow, oh;
if (!zgc->display) continue;
_site_gadget_resize(zgc->gadget, w * zgc->w, h * zgc->h, &ww, &hh, &ow, &oh);
if (zgc->x > -1.0)
if (zgc->moving)
_site_gadget_resize(zgc->gadget, w, h, &ww, &hh, &ow, &oh);
else
{
gx = zgc->x * w;
gx += (Evas_Coord)(((double)(ww - ow)) * 0.5 * -ax);
}
if (zgc->y > -1.0)
{
gy = zgc->y * h;
gy += (Evas_Coord)(((double)(hh - oh)) * 0.5 * -ay);
_site_gadget_resize(zgc->gadget, w * zgc->w, h * zgc->h, &ww, &hh, &ow, &oh);
if (zgc->x > -1.0)
{
gx = zgc->x * w;
gx += (Evas_Coord)(((double)(ww - ow)) * 0.5 * -ax);
}
if (zgc->y > -1.0)
{
gy = zgc->y * h;
gy += (Evas_Coord)(((double)(hh - oh)) * 0.5 * -ay);
}
}
if (zgs->gravity)
{
@ -569,7 +619,18 @@ _site_layout(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data)
py = gy + (-ay * oh);
#endif
if (eina_list_count(zgs->gadgets) == 1)
evas_object_size_hint_min_set(o, ow, oh);
{
int mw, mh, sw, sh;
evas_object_size_hint_min_get(o, &mw, &mh);
evas_object_size_hint_min_get(zgs->layout, &sw, &sh);
if ((ow == mw) && (oh == mh) && (sw == sh) && (sw == -1))
{
/* FIXME: https://phab.enlightenment.org/T4747 */
evas_object_size_hint_min_set(o, -1, -1);
}
evas_object_size_hint_min_set(o, ow, oh);
}
}
}
@ -584,8 +645,20 @@ _gadget_mouse_resize(E_Gadget_Config *zgc, int t EINA_UNUSED, Ecore_Event_Mouse_
evas_object_geometry_get(zgc->display, &ox, &oy, &ow, &oh);
gw = zgc->w * w;
gh = zgc->h * h;
gw += (ev->x - zgc->down.x);
gh += (ev->y - zgc->down.y);
if (zgc->resizing & E_GADGET_SITE_ANCHOR_LEFT)
{
gw -= (ev->x - zgc->down.x);
zgc->x = ev->x / (double)w;
}
else
gw += (ev->x - zgc->down.x);
if (zgc->resizing & E_GADGET_SITE_ANCHOR_TOP)
{
gh -= (ev->y - zgc->down.y);
zgc->y = ev->y / (double)h;
}
else
gh += (ev->y - zgc->down.y);
zgc->w = gw / w;
zgc->h = gh / h;
zgc->down.x = ev->x;
@ -629,9 +702,10 @@ _gadget_act_resize_end(E_Object *obj, const char *params EINA_UNUSED, E_Binding_
if (obj->type != E_GADGET_TYPE) return EINA_FALSE;
g = e_object_data_get(obj);
zgc = evas_object_data_get(g, "__e_gadget");
zgc->moving = 0;
zgc->resizing = 0;
E_FREE_FUNC(zgc->site->move_handler, ecore_event_handler_del);
evas_object_smart_need_recalculate_set(zgc->site->layout, 1);
return EINA_TRUE;
}
@ -640,35 +714,54 @@ _gadget_act_move(E_Object *obj, const char *params EINA_UNUSED, E_Binding_Event_
{
E_Gadget_Config *zgc, *z;
Evas_Object *g;
int w, h;
if (obj->type != E_GADGET_TYPE) return EINA_FALSE;
g = e_object_data_get(obj);
zgc = evas_object_data_get(g, "__e_gadget");
zgc->moving = 1;
evas_object_pass_events_set(zgc->site->layout, 1);
_editor_pointer_site_init(zgc->site->orient, NULL, NULL, 1);
e_gadget_site_owner_setup(pointer_site, zgc->site->anchor, NULL);
ZGS_GET(pointer_site);
_gadget_util_add(zgs, zgc->type, zgc->id);
z = eina_list_data_get(zgs->gadgets);
if (!z)
{
E_FREE_FUNC(pointer_site, evas_object_del);
zgc->moving = 0;
return EINA_TRUE;
}
z->moving = 1;
evas_object_pass_events_set(zgc->site->layout, 1);
evas_object_geometry_get(g, NULL, NULL, &w, &h);
evas_object_resize(pointer_site, w, h);
eina_stringshare_refplace(&z->style.name, zgc->style.name);
z->orig = zgc;
return EINA_TRUE;
}
static Eina_Bool
_gadget_act_resize(E_Object *obj, const char *params EINA_UNUSED, E_Binding_Event_Mouse_Button *ev EINA_UNUSED)
_gadget_act_resize(E_Object *obj, const char *params EINA_UNUSED, E_Binding_Event_Mouse_Button *ev)
{
E_Gadget_Config *zgc;
Evas_Object *g;
int x, y, w, h;
if (obj->type != E_GADGET_TYPE) return EINA_FALSE;
g = e_object_data_get(obj);
zgc = evas_object_data_get(g, "__e_gadget");
if (zgc->site->orient) return EINA_FALSE;
zgc->resizing = 1;
evas_object_geometry_get(g, &x, &y, &w, &h);
if (ev->canvas.x < x + (w / 2))
zgc->resizing = E_GADGET_SITE_ANCHOR_LEFT;
else
zgc->resizing = E_GADGET_SITE_ANCHOR_RIGHT;
if (ev->canvas.y < y + (h / 2))
zgc->resizing |= E_GADGET_SITE_ANCHOR_TOP;
else
zgc->resizing |= E_GADGET_SITE_ANCHOR_BOTTOM;
if (!zgc->site->move_handler)
zgc->site->move_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, (Ecore_Event_Handler_Cb)_gadget_mouse_resize, zgc);
return EINA_TRUE;
@ -695,6 +788,7 @@ _gadget_configure(E_Gadget_Config *zgc)
zgc->cfg_object = zgc->configure(zgc->gadget);
if (!zgc->cfg_object) return;
evas_object_event_callback_add(zgc->cfg_object, EVAS_CALLBACK_DEL, _gadget_act_configure_object_del, zgc);
evas_object_smart_callback_call(zgc->display, "gadget_popup", zgc->cfg_object);
}
static Eina_Bool
@ -716,11 +810,7 @@ _gadget_menu_remove(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUS
{
E_Gadget_Config *zgc = data;
evas_object_smart_callback_call(zgc->site->layout, "gadget_removed", zgc->gadget);
zgc->site->gadget_list = eina_inlist_remove(zgc->site->gadget_list, EINA_INLIST_GET(zgc));
zgc->site->gadgets = eina_list_remove(zgc->site->gadgets, zgc);
evas_object_smart_need_recalculate_set(zgc->site->layout, 1);
_gadget_free(zgc);
_gadget_remove(zgc);
e_config_save_queue();
}
@ -860,11 +950,16 @@ _site_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_
E_Gadget_Config *zgc;
E_Action *act;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
zgc = _gadget_at_xy(zgs, ev->output.x, ev->output.y, NULL);
if (!zgc) return;
act = e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, zgc->e_obj_inherit, event_info);
if (!act) return;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
act = e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, zgc->e_obj_inherit, event_info);
if (!act)
{
ev->event_flags &= ~EVAS_EVENT_FLAG_ON_HOLD;
return;
}
if (act->func.end_mouse)
{
int x, y;
@ -895,6 +990,7 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
evas_pointer_canvas_xy_get(e_comp->evas, &mx, &my);
evas_object_geometry_get(zgs->layout, &x, &y, &w, &h);
if (!E_INSIDE(mx, my, x, y, w, h)) return;
EINA_LIST_FOREACH(zgs->gadgets, l, zgc)
{
if (!zgc->display) continue;
@ -924,24 +1020,24 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
EINA_LIST_REVERSE_FOREACH(drop->gadgets, ll, dzgc)
{
evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget);
if (dzgc->id == -1) dzgc->id = 0;
evas_object_del(dzgc->gadget);
zgs->gadget_list = eina_inlist_prepend_relative(zgs->gadget_list,
EINA_INLIST_GET(dzgc), EINA_INLIST_GET(zgc));
zgs->gadgets = eina_list_prepend_relative_list(zgs->gadgets, dzgc, l);
dzgc->site = zgs;
if (dzgc->id == -1) dzgc->id = 0;
_gadget_object_finalize(dzgc);
}
else
EINA_LIST_REVERSE_FOREACH(drop->gadgets, ll, dzgc)
{
evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget);
if (dzgc->id == -1) dzgc->id = 0;
evas_object_del(dzgc->gadget);
zgs->gadget_list = eina_inlist_append_relative(zgs->gadget_list,
EINA_INLIST_GET(dzgc), EINA_INLIST_GET(zgc));
zgs->gadgets = eina_list_append_relative_list(zgs->gadgets, dzgc, l);
dzgc->site = zgs;
if (dzgc->id == -1) dzgc->id = 0;
_gadget_object_finalize(dzgc);
}
}
@ -963,8 +1059,8 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
zgs->gadgets = eina_list_append(zgs->gadgets, dzgc);
dzgc->x = ((gx - dx) / (double)dw) + ((mx - x) / (double)w);
dzgc->y = ((gy - dy) / (double)dh) + ((my - y) / (double)h);
dzgc->w = gw / (double)dw;
dzgc->h = gh / (double)dh;
dzgc->w = gw / (double)w;
dzgc->h = gh / (double)h;
dzgc->site = zgs;
if (dzgc->id == -1) dzgc->id = 0;
_gadget_object_finalize(dzgc);
@ -980,12 +1076,12 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
EINA_LIST_FOREACH(drop->gadgets, l, dzgc)
{
evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget);
if (dzgc->id == -1) dzgc->id = 0;
evas_object_del(dzgc->gadget);
zgs->gadget_list = eina_inlist_append(zgs->gadget_list,
EINA_INLIST_GET(dzgc));
zgs->gadgets = eina_list_append(zgs->gadgets, dzgc);
dzgc->site = zgs;
if (dzgc->id == -1) dzgc->id = 0;
_gadget_object_finalize(dzgc);
}
}
@ -1015,16 +1111,16 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
/* calculate positioning offsets and normalize based on drop point */
evas_object_geometry_get(dzgc->display, &gx, &gy, &gw, &gh);
evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget);
if (dzgc->id == -1) dzgc->id = 0;
evas_object_del(dzgc->gadget);
zgs->gadget_list = eina_inlist_append(zgs->gadget_list,
EINA_INLIST_GET(dzgc));
zgs->gadgets = eina_list_append(zgs->gadgets, dzgc);
dzgc->x = ((gx - dx) / (double)dw) + ((mx - x) / (double)w);
dzgc->y = ((gy - dy) / (double)dh) + ((my - y) / (double)h);
dzgc->x = ((gx - dx) / (double)dw) + ((mx - x - (mx - gx)) / (double)w);
dzgc->y = ((gy - dy) / (double)dh) + ((my - y - (my - gy)) / (double)h);
dzgc->w = gw / (double)w;
dzgc->h = gh / (double)h;
dzgc->site = zgs;
if (dzgc->id == -1) dzgc->id = 0;
_gadget_object_finalize(dzgc);
}
}
@ -1063,17 +1159,17 @@ _site_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
{
E_Gadget_Site *zgs = data;
E_Gadget_Config *zgc;
Eina_List *l;
Eina_List *l, *ll;
E_FREE_FUNC(zgs->events, evas_object_del);
E_FREE_FUNC(zgs->move_handler, ecore_event_handler_del);
E_FREE_FUNC(zgs->mouse_up_handler, ecore_event_handler_del);
EINA_LIST_FOREACH_SAFE(zgs->gadgets, l, ll, zgc)
evas_object_del(zgc->display);
zgs->layout = NULL;
zgs->cur_size = 0;
zgs->action = NULL;
zgs->style_cb = NULL;
E_FREE_FUNC(zgs->move_handler, ecore_event_handler_del);
E_FREE_FUNC(zgs->mouse_up_handler, ecore_event_handler_del);
EINA_LIST_FOREACH(zgs->gadgets, l, zgc)
evas_object_del(zgc->gadget);
if (zgs->name) return;
eina_stringshare_del(zgs->name);
free(zgs);
@ -1092,6 +1188,22 @@ _site_style(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS
zgc->site->style_cb(zgc->site->layout, zgc->style.name, zgc->gadget);
}
static void
_site_visibility(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
E_Gadget_Site *zgs = data;
E_Gadget_Config *zgc;
Eina_List *l;
Eina_Bool vis = evas_object_visible_get(obj);
EINA_LIST_FOREACH(zgs->gadgets, l, zgc)
if (zgc->display)
{
if (vis) evas_object_show(zgc->display);
else evas_object_hide(zgc->display);
}
}
static void
_site_create(E_Gadget_Site *zgs)
{
@ -1117,6 +1229,11 @@ _site_create(E_Gadget_Site *zgs)
evas_object_repeat_events_set(zgs->events, 1);
evas_object_show(zgs->events);
evas_object_event_callback_add(zgs->events, EVAS_CALLBACK_MOUSE_DOWN, _site_mouse_down, zgs);
if (!zgs->orient)
{
evas_object_event_callback_add(zgs->layout, EVAS_CALLBACK_SHOW, _site_visibility, zgs);
evas_object_event_callback_add(zgs->layout, EVAS_CALLBACK_HIDE, _site_visibility, zgs);
}
evas_object_data_set(zgs->layout, "__e_gadget_site", zgs);
E_LIST_FOREACH(zgs->gadgets, _gadget_object_create);
@ -1124,13 +1241,26 @@ _site_create(E_Gadget_Site *zgs)
evas_object_raise(zgs->events);
}
static void
_site_auto_add_comp_object_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Gadget_Site *zgs = data;
Eina_List *l, *ll;
E_Gadget_Config *zgc;
/* prune unconfigured gadgets */
EINA_LIST_FOREACH_SAFE(zgs->gadgets, l, ll, zgc)
if (zgc->id <= 0) _gadget_remove(zgc);
evas_object_del(zgs->layout);
}
static void
_site_auto_add(E_Gadget_Site *zgs, Evas_Object *comp_object)
{
int x, y, w, h;
_site_create(zgs);
e_comp_object_util_del_list_append(comp_object, zgs->layout);
evas_object_event_callback_add(comp_object, EVAS_CALLBACK_DEL, _site_auto_add_comp_object_del, zgs);
evas_object_layer_set(zgs->layout, evas_object_layer_get(comp_object));
evas_object_stack_above(zgs->layout, comp_object);
evas_object_geometry_get(comp_object, &x, &y, &w, &h);
@ -1218,8 +1348,13 @@ e_gadget_site_auto_add(E_Gadget_Site_Orient orient, const char *name)
E_API void
e_gadget_site_del(Evas_Object *obj)
{
Eina_List *l, *ll;
E_Gadget_Config *zgc;
ZGS_GET(obj);
EINA_LIST_FOREACH_SAFE(zgs->gadgets, l, ll, zgc)
_gadget_remove(zgc);
sites->sites = eina_list_remove(sites->sites, zgs);
evas_object_del(zgs->layout);
eina_stringshare_del(zgs->name);
@ -1326,6 +1461,7 @@ e_gadget_configure(Evas_Object *g)
{
E_Gadget_Config *zgc;
if (e_desklock_state_get()) return;
EINA_SAFETY_ON_NULL_RETURN(g);
zgc = evas_object_data_get(g, "__e_gadget");
EINA_SAFETY_ON_NULL_RETURN(zgc);
@ -1357,9 +1493,10 @@ e_gadget_type_add(const char *type, E_Gadget_Create_Cb callback, E_Gadget_Wizard
t->wizard = wizard;
eina_hash_add(gadget_types, type, t);
EINA_LIST_FOREACH(sites->sites, l, zgs)
EINA_LIST_FOREACH(zgs->gadgets, ll, zgc)
if (eina_streq(type, zgc->type))
_gadget_object_create(zgc);
if (zgs->layout)
EINA_LIST_FOREACH(zgs->gadgets, ll, zgc)
if (eina_streq(type, zgc->type))
_gadget_object_create(zgc);
}
E_API void
@ -1389,6 +1526,13 @@ e_gadget_type_iterator_get(void)
return gadget_types ? eina_hash_iterator_key_new(gadget_types) : NULL;
}
static void
_gadget_style_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Gadget_Config *zgc = data;
evas_object_smart_need_recalculate_set(zgc->site->layout, 1);
}
E_API Evas_Object *
e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style)
{
@ -1401,12 +1545,13 @@ e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style)
EINA_SAFETY_ON_NULL_RETURN_VAL(zgc, NULL);
prev = zgc->style.obj;
if ((!prev) && (!style)) return NULL;
zgc->style.obj = style;
if (style)
{
elm_layout_file_get(style, NULL, &grp);
eina_stringshare_replace(&zgc->style.name, strrchr(grp, '/') + 1);
evas_object_event_callback_add(style, EVAS_CALLBACK_DEL, _gadget_del, zgc);
evas_object_event_callback_priority_add(style, EVAS_CALLBACK_DEL, EVAS_CALLBACK_PRIORITY_AFTER, _gadget_del, zgc);
}
else
eina_stringshare_replace(&zgc->style.name, NULL);
@ -1423,6 +1568,7 @@ e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style)
elm_box_unpack(zgc->site->layout, prev);
}
evas_object_raise(zgc->site->events);
evas_object_event_callback_del(prev, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _gadget_style_hints);
if (!style) return prev;
evas_object_data_set(style, "__e_gadget", zgc);
@ -1430,24 +1576,80 @@ e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style)
elm_layout_sizing_eval(style);
evas_object_smart_calculate(style);
evas_object_size_hint_min_get(style, &zgc->style.minw, &zgc->style.minh);
evas_object_event_callback_add(style, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _gadget_style_hints, zgc);
evas_object_show(style);
evas_object_smart_callback_add(zgc->display, "gadget_popup", _gadget_popup, zgc->site);
return prev;
}
static void
_gadget_util_ctxpopup_visibility(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
e_comp_shape_queue();
}
static void
_gadget_util_ctxpopup_move(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
e_comp_shape_queue();
}
static void
_gadget_util_ctxpopup_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
int x, y, w, h;
int zx, zy, zw, zh;
evas_object_geometry_get(obj, &x, &y, &w, &h);
e_zone_useful_geometry_get(e_comp_object_util_zone_get(obj), &zx, &zy, &zw, &zh);
if (!E_CONTAINS(zx, zy, zw, zh, x, y, w, h))
{
evas_object_hide(obj);
if (!E_CONTAINS(zx, zy, zw, zh, x, y, 1, h))
{
if (!E_CONTAINS(zx, zy, zw, zh, x, y, 1, 1))
evas_object_move(data, x, zy + (h / 2) + 10);
else
evas_object_move(data, x, zy + zh - (h / 2) - 10);
}
else
{
if (!E_CONTAINS(zx, zy, zw, zh, x, y, 1, 1))
evas_object_move(data, zx + (w / 2) + 10, y);
else
evas_object_move(data, zx + zw - (w / 2) - 10, y);
}
evas_object_show(obj);
}
e_comp_shape_queue();
}
E_API void
e_gadget_util_ctxpopup_place(Evas_Object *g, Evas_Object *ctx, Evas_Object *pos_obj)
{
int x, y, w, h;
int zx, zy, zw, zh;
int pw = 1, ph = 1;
E_Layer layer;
E_Gadget_Config *zgc;
Evas_Object *content;
E_Zone *zone;
Elm_Ctxpopup_Direction first, second;
EINA_SAFETY_ON_NULL_RETURN(g);
zgc = evas_object_data_get(g, "__e_gadget");
EINA_SAFETY_ON_NULL_RETURN(zgc);
content = elm_object_content_get(ctx);
elm_ctxpopup_hover_parent_set(ctx, e_comp->elm);
evas_object_layer_set(ctx, evas_object_layer_get(pos_obj ?: g));
layer = MAX(evas_object_layer_get(pos_obj ?: g), E_LAYER_POPUP);
evas_object_layer_set(ctx, layer);
if (content) evas_object_geometry_get(content, NULL, NULL, &pw, &ph);
evas_object_geometry_get(pos_obj ?: g, &x, &y, &w, &h);
zone = e_comp_object_util_zone_get(pos_obj ?: g);
e_zone_useful_geometry_get(zone, &zx, &zy, &zw, &zh);
if (zgc->site->anchor & E_GADGET_SITE_ANCHOR_TOP)
y += h;
if (zgc->site->anchor & E_GADGET_SITE_ANCHOR_LEFT)
@ -1455,15 +1657,48 @@ e_gadget_util_ctxpopup_place(Evas_Object *g, Evas_Object *ctx, Evas_Object *pos_
if (zgc->site->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
{
x += w / 2;
elm_ctxpopup_direction_priority_set(ctx, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_DOWN, 0, 0);
x = E_CLAMP(x, zx, zx + zw - MAX(pw, w));
first = ELM_CTXPOPUP_DIRECTION_UP, second = ELM_CTXPOPUP_DIRECTION_DOWN;
if (zgc->site->anchor & E_GADGET_SITE_ANCHOR_TOP)
first = ELM_CTXPOPUP_DIRECTION_DOWN, second = ELM_CTXPOPUP_DIRECTION_UP;
}
else if (zgc->site->orient == E_GADGET_SITE_ORIENT_VERTICAL)
{
y += h / 2;
elm_ctxpopup_direction_priority_set(ctx, ELM_CTXPOPUP_DIRECTION_RIGHT, ELM_CTXPOPUP_DIRECTION_LEFT, 0, 0);
y = E_CLAMP(y, zy, zy + zh - MAX(ph, h));
first = ELM_CTXPOPUP_DIRECTION_LEFT, second = ELM_CTXPOPUP_DIRECTION_RIGHT;
if (zgc->site->anchor & E_GADGET_SITE_ANCHOR_LEFT)
first = ELM_CTXPOPUP_DIRECTION_RIGHT, second = ELM_CTXPOPUP_DIRECTION_LEFT;
}
else
{
if (x < zx + (zw / 2))
{
second = ELM_CTXPOPUP_DIRECTION_RIGHT;
x += w / 2;
}
else
second = ELM_CTXPOPUP_DIRECTION_LEFT;
if (y < zy + (zh / 2))
{
first = ELM_CTXPOPUP_DIRECTION_DOWN;
y += h;
}
else
first = ELM_CTXPOPUP_DIRECTION_UP;
}
elm_ctxpopup_direction_priority_set(ctx, first, second, 0, 0);
evas_object_move(ctx, x, y);
evas_object_event_callback_add(ctx, EVAS_CALLBACK_SHOW, _gadget_util_ctxpopup_visibility, NULL);
evas_object_event_callback_add(ctx, EVAS_CALLBACK_HIDE, _gadget_util_ctxpopup_visibility, NULL);
if (content)
{
evas_object_event_callback_add(content, EVAS_CALLBACK_MOVE, _gadget_util_ctxpopup_move, NULL);
evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE, _gadget_util_ctxpopup_resize, ctx);
}
evas_object_smart_callback_call(zgc->site->layout, "gadget_site_popup", ctx);
if (evas_object_visible_get(ctx))
e_comp_shape_queue();
}
static void
@ -1548,6 +1783,21 @@ e_gadget_save(void)
e_config_domain_save("e_gadget_sites", edd_sites, sites);
}
EINTERN void
e_gadget_site_rename(const char *name, const char *newname)
{
Eina_List *l;
E_Gadget_Site *zgs;
EINA_LIST_FOREACH(sites->sites, l, zgs)
if (eina_streq(zgs->name, name))
{
eina_stringshare_replace(&zgs->name, newname);
e_config_save_queue();
break;
}
}
EINTERN void
e_gadget_init(void)
{
@ -1650,7 +1900,8 @@ e_gadget_shutdown(void)
static void
_editor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_FREE_LIST(data, free);
Eina_List *list = data;
E_FREE_LIST(list, free);
}
static void
@ -1659,7 +1910,7 @@ _editor_pointer_site_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
e_comp_ungrab_input(1, 1);
free(data);
pointer_site = NULL;
E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_LIST(pointer_site_handlers, ecore_event_handler_del);
}
static void
@ -1681,8 +1932,11 @@ _editor_pointer_button(Gadget_Item *active, int t EINA_UNUSED, Ecore_Event_Mouse
if (active->site)
{
evas_object_geometry_get(active->site, &x, &y, &w, &h);
if (evas_object_smart_need_recalculate_get(active->site))
evas_object_smart_calculate(active->site);
if ((ev->buttons == 1) && E_INSIDE(ev->x, ev->y, x, y, w, h))
evas_object_smart_callback_call(active->site, "gadget_site_dropped", pointer_site);
e_comp_canvas_feed_mouse_up(0);
evas_object_pass_events_set(active->site, 0);
elm_object_disabled_set(active->editor, 1);
e_comp_object_util_del_list_remove(active->editor, pointer_site);
@ -1697,7 +1951,7 @@ _editor_pointer_button(Gadget_Item *active, int t EINA_UNUSED, Ecore_Event_Mouse
EINA_LIST_FOREACH(sites->sites, l, zgs)
{
if (!zgs->layout) continue;
if (!evas_object_visible_get(zgs->layout)) continue;
if (!evas_object_visible_get(zgs->events)) continue;
evas_object_geometry_get(zgs->layout, &x, &y, &w, &h);
if (!E_INSIDE(ev->x, ev->y, x, y, w, h)) continue;
/* FIXME: technically not accurate since objects on the same layer
@ -1710,6 +1964,7 @@ _editor_pointer_button(Gadget_Item *active, int t EINA_UNUSED, Ecore_Event_Mouse
}
zgs = evas_object_data_get(pointer_site, "__e_gadget_site");
zgc = eina_list_data_get(zgs->gadgets);
e_comp_canvas_feed_mouse_up(0);
evas_object_pass_events_set(zgc->orig->site->layout, 0);
if (zzgs)
{
@ -1717,12 +1972,16 @@ _editor_pointer_button(Gadget_Item *active, int t EINA_UNUSED, Ecore_Event_Mouse
z = zgc->orig;
zgc->site->gadget_list = eina_inlist_remove(zgc->site->gadget_list, EINA_INLIST_GET(zgc));
zgc->site->gadgets = eina_list_remove(zgc->site->gadgets, zgc);
_gadget_free(zgc);
if (evas_object_smart_need_recalculate_get(zzgs->layout))
evas_object_smart_calculate(zzgs->layout);
evas_object_geometry_get(zgc->display, &x, &y, NULL, NULL);
evas_object_move(z->display, x, y);
z->site->gadget_list = eina_inlist_remove(z->site->gadget_list, EINA_INLIST_GET(z));
z->site->gadgets = eina_list_remove(z->site->gadgets, z);
zgs->gadgets = eina_list_append(zgs->gadgets, z);
z->site = zgs;
evas_object_smart_callback_call(zzgs->layout, "gadget_site_dropped", pointer_site);
_gadget_free(zgc);
}
}
@ -1737,6 +1996,19 @@ _editor_pointer_move(Gadget_Item *active EINA_UNUSED, int t EINA_UNUSED, Ecore_E
evas_object_geometry_get(pointer_site, NULL, NULL, &w, &h);
evas_object_move(pointer_site, ev->x - (w / 2), ev->y - (h / 2));
if (!e_gadget_site_orient_get(pointer_site))
evas_object_smart_need_recalculate_set(pointer_site, 1);
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
_editor_pointer_wheel(Gadget_Item *active EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_Wheel *ev)
{
int w, h;
evas_object_geometry_get(pointer_site, NULL, NULL, &w, &h);
evas_object_resize(pointer_site, w - (ev->z * 10 * e_scale), h - (ev->z * 10 * e_scale));
evas_object_smart_need_recalculate_set(pointer_site, 1);
return ECORE_CALLBACK_RENEW;
}
@ -1765,8 +2037,10 @@ _editor_pointer_site_init(E_Gadget_Site_Orient orient, Evas_Object *site, Evas_O
evas_object_pass_events_set(active->site, 1);
evas_object_event_callback_add(pointer_site, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _editor_site_hints, active);
evas_object_event_callback_add(pointer_site, EVAS_CALLBACK_DEL, _editor_pointer_site_del, active);
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_MOVE, _editor_pointer_move, active);
E_LIST_HANDLER_APPEND(handlers,
E_LIST_HANDLER_APPEND(pointer_site_handlers, ECORE_EVENT_MOUSE_MOVE, _editor_pointer_move, active);
if (!orient)
E_LIST_HANDLER_APPEND(pointer_site_handlers, ECORE_EVENT_MOUSE_WHEEL, _editor_pointer_wheel, active);
E_LIST_HANDLER_APPEND(pointer_site_handlers,
up ? ECORE_EVENT_MOUSE_BUTTON_UP : ECORE_EVENT_MOUSE_BUTTON_DOWN, _editor_pointer_button, active);
rect = evas_object_rectangle_add(e_comp->evas);
@ -1845,12 +2119,21 @@ E_API Evas_Object *
e_gadget_site_edit(Evas_Object *site)
{
Evas_Object *comp_object, *popup, *editor;
E_Zone *zone;
E_Zone *zone, *czone;
zone = e_comp_object_util_zone_get(site);
if (!zone) zone = e_zone_current_get();
czone = e_zone_current_get();
if (zone != czone)
{
int x, y, w, h;
evas_object_geometry_get(site, &x, &y, &w, &h);
if (E_INTERSECTS(x, y, w, h, czone->x, czone->y, czone->w, czone->h))
zone = czone;
}
popup = elm_popup_add(e_comp->elm);
elm_popup_scrollable_set(popup, EINA_TRUE);
elm_popup_allow_events_set(popup, 1);
editor = e_gadget_editor_add(e_comp->elm, site);
@ -1861,7 +2144,7 @@ e_gadget_site_edit(Evas_Object *site)
evas_object_layer_set(comp_object, E_LAYER_POPUP);
evas_object_show(comp_object);
evas_object_resize(comp_object, zone->w / 2, zone->h / 2);
e_comp_object_util_center(comp_object);
e_comp_object_util_center_on_zone(comp_object, zone);
return comp_object;
}
@ -1879,11 +2162,27 @@ _edit_end()
e_comp_ungrab_input(1, 1);
}
static void
_gadget_desklock_clear(void)
{
Eina_List *l;
E_Gadget_Site *zgs;
EINA_LIST_FOREACH(sites->sites, l, zgs)
if (zgs->autoadd && zgs->layout && strstr(zgs->name, "desklock."))
{
E_LIST_FOREACH(zgs->gadgets, _gadget_remove);
}
e_config_save_queue();
}
static Eina_Bool
_gadget_key_handler(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Key *ev)
{
if (eina_streq(ev->key, "Escape"))
_gadget_desklock_del();
else if (eina_streq(ev->key, "Delete") || eina_streq(ev->key, "Backspace"))
_gadget_desklock_clear();
return ECORE_CALLBACK_DONE;
}
@ -1922,7 +2221,8 @@ _gadget_desklock_handler(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Comp_Ob
memset(&n, 0, sizeof(E_Notification_Notify));
n.timeout = 3000;
n.summary = _("Lockscreen Gadgets");
n.body = _("Press Escape or click the background to exit.");
n.body = _("Press Escape or click the background to exit.<ps/>"
"Use Backspace or Delete to remove all gadgets from this screen");
n.urgency = E_NOTIFICATION_NOTIFY_URGENCY_NORMAL;
e_notification_client_send(&n, NULL, NULL);
return ECORE_CALLBACK_RENEW;

View File

@ -14,7 +14,10 @@
"gadget_created"
- a gadget object was created on the site
"gadget_destroyed"
- a gadget object was destroyed on the site
- a gadget object was destroyed on the site; all objects created by the
gadget infrastructure are now dead
- do not watch both this and EVAS_CALLBACK_DEL, as the ordering of these
callbacks is not consistent
"gadget_moved"
- a gadget is preparing to move from its current site
"gadget_removed"
@ -28,6 +31,10 @@
- the anchor of the gadget site changed
"gadget_site_gravity"
- the gravity of the gadget site changed
"gadget_site_locked"
- the gadget site's visibility has been locked (must be visible)
"gadget_site_unlocked"
- the gadget site's visibility has been unlocked (can be hidden)
* }
* have E_Menu as event_info
@ -109,6 +116,7 @@ typedef void (*E_Gadget_Style_Cb)(Evas_Object *owner, Eina_Stringshare *name, Ev
EINTERN void e_gadget_init(void);
EINTERN void e_gadget_shutdown(void);
EINTERN void e_gadget_site_rename(const char *name, const char *newname);
E_API Evas_Object *e_gadget_site_add(E_Gadget_Site_Orient orient, const char *name);
E_API Evas_Object *e_gadget_site_auto_add(E_Gadget_Site_Orient orient, const char *name);

View File

@ -411,14 +411,6 @@ e_hints_window_init(E_Client *ec)
if (ec->remember)
rem = ec->remember;
if (ec->icccm.initial_state == ECORE_X_WINDOW_STATE_HINT_NONE)
{
if (ec->netwm.state.hidden)
ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
else
ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
}
if ((rem) && (rem->apply & E_REMEMBER_APPLY_LAYER))
{
ec->layer = rem->prop.layer;
@ -800,37 +792,44 @@ e_hints_window_state_update(E_Client *ec, int state, int action)
case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT:
case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ:
case INT_MAX:
{
E_Maximize max[] =
int max[] =
{
[ECORE_X_WINDOW_STATE_MAXIMIZED_VERT] = E_MAXIMIZE_VERTICAL,
[ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ] = E_MAXIMIZE_HORIZONTAL,
};
E_Maximize m;
if (state > ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ)
m = E_MAXIMIZE_BOTH;
else
m = max[state];
if (ec->lock_client_maximize) return;
switch (action)
{
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
if ((ec->maximized & max[state]) == max[state])
e_client_unmaximize(ec, max[state]);
if ((ec->maximized & m) == m)
e_client_unmaximize(ec, m);
break;
case ECORE_X_WINDOW_STATE_ACTION_ADD:
if ((ec->maximized & max[state]) == max[state]) break;
if ((ec->maximized & m) == m) break;
ec->changes.need_maximize = 1;
ec->maximized &= ~E_MAXIMIZE_TYPE;
ec->maximized |= (e_config->maximize_policy & E_MAXIMIZE_TYPE) | max[state];
ec->maximized |= (e_config->maximize_policy & E_MAXIMIZE_TYPE) | m;
EC_CHANGED(ec);
break;
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
if ((ec->maximized & max[state]) == max[state])
if ((ec->maximized & m) == m)
{
e_client_unmaximize(ec, max[state]);
e_client_unmaximize(ec, m);
break;
}
ec->changes.need_maximize = 1;
ec->maximized &= ~E_MAXIMIZE_TYPE;
ec->maximized |= (e_config->maximize_policy & E_MAXIMIZE_TYPE) | max[state];
ec->maximized |= (e_config->maximize_policy & E_MAXIMIZE_TYPE) | m;
EC_CHANGED(ec);
break;
}

View File

@ -269,6 +269,8 @@ e_int_client_menu_del(E_Client *ec)
if (!ec->border_menu) return;
e_menu_post_deactivate_callback_set(ec->border_menu, NULL, NULL);
E_FREE_FUNC(ec->border_menu, e_object_del);
if (ec->cur_mouse_action && eina_streq(ec->cur_mouse_action->name, "window_menu"))
E_FREE_FUNC(ec->cur_mouse_action, e_object_unref);
}
static void
@ -949,7 +951,7 @@ _e_client_menu_cb_skip_winlist(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *m
ec->user_skip_winlist = e_menu_item_toggle_get(mi);
else
ec->user_skip_winlist = 0;
ec->changed = 1;
EC_CHANGED(ec);
e_remember_update(ec);
}
@ -964,7 +966,7 @@ _e_client_menu_cb_skip_pager(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi)
ec->netwm.state.skip_pager = e_menu_item_toggle_get(mi);
else
ec->netwm.state.skip_pager = 0;
ec->changed = 1;
EC_CHANGED(ec);
e_remember_update(ec);
}
@ -979,7 +981,7 @@ _e_client_menu_cb_skip_taskbar(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *m
ec->netwm.state.skip_taskbar = e_menu_item_toggle_get(mi);
else
ec->netwm.state.skip_taskbar = 0;
ec->changed = 1;
EC_CHANGED(ec);
e_remember_update(ec);
}
@ -1382,13 +1384,13 @@ _e_client_menu_cb_stacking_pre(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *m
"e/widgets/border/default/stack_below"),
"e/widgets/border/default/stack_below");
submi = e_menu_item_new(subm);
e_menu_item_separator_set(submi, 1);
// Only allow to change layer for windows in "normal" layers
if ((!ec->lock_user_stacking) &&
((ec->layer == 50) || (ec->layer == 100) || (ec->layer == 150)))
{
submi = e_menu_item_new(subm);
e_menu_item_separator_set(submi, 1);
submi = e_menu_item_new(subm);
e_menu_item_label_set(submi, _("Raise"));
e_menu_item_callback_set(submi, _e_client_menu_cb_raise, ec);
@ -1571,7 +1573,7 @@ _e_client_menu_cb_iconpref_e(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi
ec->icon_preference = E_ICON_PREF_E_DEFAULT;
ec->changes.icon = 1;
ec->changed = 1;
EC_CHANGED(ec);
}
static void
@ -1583,7 +1585,7 @@ _e_client_menu_cb_iconpref_user(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *
ec->icon_preference = E_ICON_PREF_USER;
ec->changes.icon = 1;
ec->changed = 1;
EC_CHANGED(ec);
}
static void
@ -1595,7 +1597,7 @@ _e_client_menu_cb_iconpref_netwm(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item
ec->icon_preference = E_ICON_PREF_NETWM;
ec->changes.icon = 1;
ec->changed = 1;
EC_CHANGED(ec);
}
static void

View File

@ -418,7 +418,10 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
{
/* Actually take our cfdata settings and apply them in real life */
E_Client *ec = cfdata->client;
E_Remember *rem = cfdata->backup_rem ?: ec->remember;
E_Remember *rem = ec->remember;
if (rem && (rem->apply & E_REMEMBER_APPLY_UUID))
rem = cfdata->backup_rem;
if (cfdata->mode == MODE_NOTHING)
{
@ -434,14 +437,10 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
if (!rem)
{
rem = e_remember_new();
if (rem)
{
if ((!ec->remember) || (!(ec->remember->apply & E_REMEMBER_APPLY_UUID)))
ec->remember = rem;
cfdata->applied = 0;
}
else
return 0;
if (!rem) return 0;
cfdata->applied = 0;
if (ec->remember && (ec->remember->apply & E_REMEMBER_APPLY_UUID))
cfdata->backup_rem = rem;
}
e_remember_default_match_set(rem, cfdata->client);

View File

@ -1601,11 +1601,7 @@ _e_int_menus_clients_item_cb(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi
if (!ec->iconic) e_desk_show(ec->desk);
if (!ec->lock_user_stacking) evas_object_raise(ec->frame);
if (!ec->lock_focus_out)
{
e_util_pointer_center(ec);
evas_object_focus_set(ec->frame, 1);
}
e_client_focus_set_with_pointer(ec);
}
static void

View File

@ -619,10 +619,10 @@ e_intl_locale_parts_get(const char *locale)
{
/* Parse Results */
E_Locale_Parts *locale_parts;
char language[4];
char language[4] = {0};
char territory[4] = {0};
char codeset[32];
char modifier[32];
char codeset[32] = {0};
char modifier[32] = {0};
/* Parse State */
int state = 0; /* start out looking for the language */

View File

@ -9,6 +9,7 @@ static Eina_Bool _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNU
/* local subsystem globals */
static Ecore_Ipc_Server *_e_ipc_server = NULL;
static Eina_Stringshare *_e_ipc_dir = NULL;
#endif
/* externally accessible functions */
@ -80,6 +81,7 @@ e_ipc_init(void)
if (!mkdir(buf, S_IRWXU))
{
#ifdef USE_IPC
_e_ipc_dir = eina_stringshare_add(buf);
snprintf(buf3, sizeof(buf3), "%s/%i",
buf, pid);
_e_ipc_server = ecore_ipc_server_add
@ -96,6 +98,12 @@ e_ipc_init(void)
#ifdef USE_IPC
if (!_e_ipc_server)
{
if (_e_ipc_dir)
{
ecore_file_recursive_rm(_e_ipc_dir);
eina_stringshare_del(_e_ipc_dir);
_e_ipc_dir = NULL;
}
ERR("Gave up after 4096 sockets in '%s'. All failed", base);
return 0;
}
@ -122,6 +130,12 @@ e_ipc_shutdown(void)
ecore_ipc_server_del(_e_ipc_server);
_e_ipc_server = NULL;
}
if (_e_ipc_dir)
{
ecore_file_recursive_rm(_e_ipc_dir);
eina_stringshare_del(_e_ipc_dir);
_e_ipc_dir = NULL;
}
#endif
E_FREE(e_ipc_socket);
return 1;

View File

@ -187,9 +187,11 @@ _xdg_data_dirs_augment(void)
if (!dir) dir = "/tmp";
else
{
char buf2[4096];
e_util_env_set("XDG_RUNTIME_DIR", dir);
snprintf(buf, sizeof(buf), "%s/.e-deleteme", dir);
ecore_file_mkdir(buf);
snprintf(buf2, sizeof(buf2), "%s/.e-deleteme", dir);
ecore_file_mkdir(buf2);
}
}
@ -327,21 +329,6 @@ main(int argc, char **argv)
e_util_env_set("DESKTOP", "Enlightenment");
TS("Environment Variables Done");
/* KDE5 applications don't understand anything other then gnome or kde */
/* They expect everyone else to set QT_QPA_PLATFORMTHEME to tell them how */
/* to theme there apps otherwise they use a fallback mode which results in */
/* missing icons and a inability to change the appearance of applications */
/* see https://bugzilla.suse.com/show_bug.cgi?id=920792 for more info. */
/* There are two sensible defaults for this variable, "kde" which will */
/* make apps appear the same as they do if they are run in kde. and gtk2 */
/* which will make kde applications follow the gtk/gnome theme, we have */
/* decided on choosing gtk2 as it means that kde/qt apps will follow the */
/* app and icon theme set in the enlightenment settings dialog. Some users */
/* who wish to use Qt apps without any gnome or gtk usage may choose to */
/* install qt5ct and overwrite this variable with qt5ct and use that to */
/* configure there Qt5 applications. */
e_util_env_set("QT_QPA_PLATFORMTHEME", "gtk2");
TS("Parse Arguments");
_e_main_parse_arguments(argc, argv);
TS("Parse Arguments Done");
@ -565,6 +552,26 @@ main(int argc, char **argv)
TS("E_Config Init Done");
_e_main_shutdown_push(e_config_shutdown);
if (e_config->xsettings.match_e17_theme)
{
/* KDE5 applications don't understand anything other then gnome or kde */
/* They expect everyone else to set QT_QPA_PLATFORMTHEME to tell them how */
/* to theme there apps otherwise they use a fallback mode which results in */
/* missing icons and a inability to change the appearance of applications */
/* see https://bugzilla.suse.com/show_bug.cgi?id=920792 for more info. */
/* There are two sensible defaults for this variable, "kde" which will */
/* make apps appear the same as they do if they are run in kde. and gtk2 */
/* which will make kde applications follow the gtk/gnome theme, we have */
/* decided on choosing gtk2 as it means that kde/qt apps will follow the */
/* app and icon theme set in the enlightenment settings dialog. Some users */
/* who wish to use Qt apps without any gnome or gtk usage may choose to */
/* install qt5ct and overwrite this variable with qt5ct and use that to */
/* configure there Qt5 applications. */
e_util_env_set("QT_QPA_PLATFORMTHEME", "gtk2");
e_util_env_set("QT_STYLE_OVERRIDE", "gtk2");
}
TS("E_Env Init");
if (!e_env_init())
{
@ -702,14 +709,6 @@ main(int argc, char **argv)
if (e_config->show_splash)
e_init_status_set(_("Setup Screensaver"));
TS("E_Screensaver Init");
if (!e_screensaver_init())
{
e_error_message_show(_("Enlightenment cannot configure the X screensaver.\n"));
_e_main_shutdown(-1);
}
TS("E_Screensaver Init Done");
_e_main_shutdown_push(e_screensaver_shutdown);
if (e_config->show_splash)
e_init_status_set(_("Setup Screens"));
@ -1528,6 +1527,14 @@ _e_main_test_formats(void)
Evas_Object *im, *txt;
Evas_Coord tw, th;
char buff[PATH_MAX];
char *types[] =
{
"svg",
"jpg",
"png",
"edj"
};
unsigned int i, t_edj = 3;
if (e_config->show_splash)
e_init_status_set(_("Testing Format Support"));
@ -1541,45 +1548,37 @@ _e_main_test_formats(void)
evas = ecore_evas_get(ee);
im = evas_object_image_add(evas);
e_prefix_data_concat_static(buff, "data/images/test.svg");
evas_object_image_file_set(im, buff, NULL);
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
for (i = 0; i < EINA_C_ARRAY_LENGTH(types); i++)
{
e_error_message_show(_("Enlightenment found Evas can't load SVG files. "
"Check Evas has SVG loader support.\n"));
}
else
efreet_icon_extension_add(".svg");
char b[128], *t = types[i];
const char *key = NULL;
e_prefix_data_concat_static(buff, "data/images/test.jpg");
evas_object_image_file_set(im, buff, NULL);
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load JPEG files. "
"Check Evas has JPEG loader support.\n"));
_e_main_shutdown(-1);
snprintf(b, sizeof(b), "data/images/test.%s", types[i]);
e_prefix_data_concat_static(buff, b);
if (i == t_edj)
{
t = "eet";
key = "images/0";
}
evas_object_image_file_set(im, buff, key);
switch (evas_object_image_load_error_get(im))
{
default:
e_error_message_show(_("Enlightenment found Evas can't load '%s' files. "
"Check Evas has '%s' loader support.\n"), t, t);
if (i) _e_main_shutdown(-1);
break;
case EVAS_LOAD_ERROR_CORRUPT_FILE:
case EVAS_LOAD_ERROR_DOES_NOT_EXIST:
case EVAS_LOAD_ERROR_PERMISSION_DENIED:
e_error_message_show(_("Enlightenment cannot access test image for '%s' filetype. "
"Check your install for setup issues.\n"), t);
case EVAS_LOAD_ERROR_NONE:
snprintf(b, sizeof(b), ".%s", types[i]);
efreet_icon_extension_add(b);
break;
}
}
efreet_icon_extension_add(".jpg");
e_prefix_data_concat_static(buff, "data/images/test.png");
evas_object_image_file_set(im, buff, NULL);
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load PNG files. "
"Check Evas has PNG loader support.\n"));
_e_main_shutdown(-1);
}
efreet_icon_extension_add(".png");
e_prefix_data_concat_static(buff, "data/images/test.edj");
evas_object_image_file_set(im, buff, "images/0");
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load EET files. "
"Check Evas has EET loader support.\n"));
_e_main_shutdown(-1);
}
efreet_icon_extension_add(".edj");
evas_object_del(im);
@ -1602,6 +1601,8 @@ _e_main_screens_init(void)
{
TS("\tscreens: client");
if (!e_client_init()) return 0;
TS("E_Screensaver Init");
if (!e_screensaver_init()) return 0;
TS("\tscreens: win");
if (!e_win_init()) return 0;
TS("Compositor Init");
@ -1636,6 +1637,7 @@ _e_main_screens_shutdown(void)
e_menu_shutdown();
e_shelf_shutdown();
e_comp_shutdown();
e_screensaver_shutdown();
e_client_shutdown();
e_exehist_shutdown();
e_backlight_shutdown();
@ -1785,21 +1787,10 @@ _e_main_cb_idle_after(void *data EINA_UNUSED)
eet_clearcache();
edje_freeze();
#ifdef E_RELEASE_BUILD
if (first_idle)
{
TS("SLEEP");
first_idle = 0;
e_precache_end = EINA_TRUE;
}
#else
if (first_idle++ < 60)
{
TS("SLEEP");
if (!first_idle)
e_precache_end = EINA_TRUE;
}
#endif
TS("SLEEP");
first_idle = 0;
e_precache_end = EINA_TRUE;
return ECORE_CALLBACK_RENEW;
}

View File

@ -103,6 +103,9 @@ static int _e_menu_autoscroll_y = 0;
static Eina_List *handlers = NULL;
static Eina_Bool _e_menu_lock = EINA_FALSE;
static Eina_Bool pending_feed;
static unsigned int pending_activate_time;
static Eina_List *
_e_active_menus_copy_ref(void)
{
@ -238,6 +241,7 @@ e_menu_activate_key(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir
break;
case E_MENU_POP_DIRECTION_RIGHT:
_e_menu_realize(m);
m->cur.x = x + w;
m->cur.y = y;
_e_menu_activate_first();
@ -293,7 +297,7 @@ e_menu_activate_mouse(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int d
E_OBJECT_CHECK(zone);
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
if (_e_active_menus) e_menu_hide_all();
_e_menu_activate_time = activate_time;
_e_menu_activate_time = 0;
_e_menu_activate_floating = 0;
_e_menu_activate_internal(m, zone);
if (!m->zone)
@ -346,7 +350,9 @@ e_menu_activate_mouse(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int d
}
pmi = _e_menu_item_active_get();
if (pmi) e_menu_item_active_set(pmi, 0);
e_comp_canvas_feed_mouse_up(activate_time);
pending_feed = 1;
if (!activate_time) activate_time = lround(ecore_loop_time_get() * 1000);
_e_menu_activate_time = pending_activate_time = activate_time;
}
E_API void
@ -1087,6 +1093,12 @@ e_menu_idler_before(void)
Eina_List *l, *removals = NULL, *tmp;
E_Menu *m;
if (pending_feed)
{
e_comp_canvas_feed_mouse_up(pending_activate_time);
pending_feed = 0;
}
/* add refcount to all menus we will work with */
tmp = _e_active_menus_copy_ref();
/* phase 1. hide all the menus that want to be hidden */
@ -1143,8 +1155,9 @@ e_menu_idler_before(void)
}
m->prev.x = m->cur.x;
m->prev.y = m->cur.y;
_e_menu_lock = 1;
evas_object_move(m->comp_object, m->cur.x, m->cur.y);
_e_menu_lock = 0;
}
}
/* phase 3. show all the menus that want to be shown */
@ -1954,6 +1967,7 @@ static void
_e_menu_submenu_activate(E_Menu_Item *mi)
{
if (!mi->menu->active) return;
if (mi->submenu && mi->submenu->active) return;
if (mi->menu->fast_mouse)
{
mi->menu->pending_new_submenu = 1;
@ -2529,10 +2543,7 @@ _e_menu_item_ensure_onscreen(E_Menu_Item *mi)
if (!mi->menu) return;
if (!mi->menu->zone) return;
x = mi->menu->cur.x;
y = mi->menu->cur.y;
w = mi->menu->cur.w;
h = mi->menu->cur.h;
evas_object_geometry_get(mi->container_object, &x, &y, &w, &h);
if ((x + w) > (mi->menu->zone->x + mi->menu->zone->w))
dx = (mi->menu->zone->x + mi->menu->zone->w) - (x + w);
else if (x < mi->menu->zone->x)
@ -2545,6 +2556,28 @@ _e_menu_item_ensure_onscreen(E_Menu_Item *mi)
_e_menu_scroll_by(dx, dy);
}
static void
_e_menu_auto_place_vert(E_Menu *m, int x, int y, int w, int h)
{
int zx, zy, zw, zh;
e_zone_useful_geometry_get(m->zone, &zx, &zy, &zw, &zh);
if (E_CONTAINS(zx, zy, zw, zh, m->cur.x, y, m->cur.w, m->cur.h))
{
if (w + h > 2)
{
if (E_INTERSECTS(m->cur.x, y, m->cur.w, m->cur.h, x, y, w, h))
m->cur.y = y + h - m->cur.h;
else
m->cur.y = y;
}
else
m->cur.y = y;
}
else
m->cur.y = y + h - m->cur.h;
}
static int
_e_menu_auto_place(E_Menu *m, int x, int y, int w, int h)
{
@ -2571,18 +2604,14 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h)
(double)(m->zone->h - h);
else
yr = 0.0;
if ((xr + yr) < 0.99) /* top or left */
{
if (((1.0 - yr) + xr) <= 1.0)
{
/* L */
m->cur.x = x + w;
if (y < (m->zone->y + ((m->zone->h * 1) / 3)))
m->cur.y = y;
else if (y < (m->zone->y + ((m->zone->h * 2) / 3)))
m->cur.y = y + ((h - m->cur.h) / 2);
else
m->cur.y = y + h - m->cur.h;
_e_menu_auto_place_vert(m, x, y, w, h);
return 1;
}
else
@ -2616,12 +2645,7 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h)
{
/* R */
m->cur.x = x - m->cur.w;
if (y < (m->zone->y + ((m->zone->h * 1) / 3)))
m->cur.y = y;
else if (y < (m->zone->y + ((m->zone->h * 2) / 3)))
m->cur.y = y + ((h - m->cur.h) / 2);
else
m->cur.y = y + h - m->cur.h;
_e_menu_auto_place_vert(m, x, y, w, h);
return 2;
}
}

View File

@ -416,7 +416,7 @@ e_notification_notify_raw_image_get(E_Notification_Notify *notify, Evas *evas)
for (y = 0; y < notify->icon.raw.height; y++)
{
s = notify->icon.raw.data + (y * notify->icon.raw.rowstride);
d = (int *)(imgdata + (y * rowstride));
d = (int *)(void *)(imgdata + (y * rowstride));
for (x = 0; x < notify->icon.raw.width;
x++, s += notify->icon.raw.channels, d++)

View File

@ -17,11 +17,10 @@ e_order_init(void)
{
char *menu_file = NULL;
handlers =
eina_list_append(handlers,
ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE,
_e_order_cb_efreet_cache_update,
NULL));
E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_DESKTOP_CACHE_UPDATE,
_e_order_cb_efreet_cache_update, NULL);
E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_DESKTOP_CACHE_BUILD,
_e_order_cb_efreet_cache_update, NULL);
if (e_config->default_system_menu)
menu_file = strdup(e_config->default_system_menu);
if (!menu_file)

View File

@ -18,7 +18,6 @@
#endif
#include <sys/mman.h>
#include <uuid.h>
static Eina_Hash *pixmaps[2] = {NULL};
static Eina_Hash *aliases[2] = {NULL};
@ -47,13 +46,11 @@ struct _E_Pixmap
#ifdef HAVE_WAYLAND
E_Comp_Wl_Buffer *buffer;
E_Comp_Wl_Buffer *native_buffer;
E_Comp_Wl_Buffer *held_buffer;
struct wl_listener buffer_destroy_listener;
struct wl_listener held_buffer_destroy_listener;
void *data;
Eina_Rectangle opaque;
uuid_t uuid;
Eina_List *free_buffers;
#endif
@ -64,6 +61,8 @@ struct _E_Pixmap
#ifdef HAVE_WAYLAND
double wayland_time_base;
static void
_e_pixmap_cb_deferred_buffer_destroy(struct wl_listener *listener, void *data EINA_UNUSED)
{
@ -127,7 +126,8 @@ _e_pixmap_clear(E_Pixmap *cp, Eina_Bool cache)
static void
_e_pixmap_image_clear_x(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_FREE_LIST(data, ecore_x_image_free);
Eina_List *list = data;
E_FREE_LIST(list, ecore_x_image_free);
}
#endif
@ -161,8 +161,6 @@ _e_pixmap_wl_buffers_free(E_Pixmap *cp)
{
E_Comp_Wl_Buffer *b;
if (e_comp->rendering) return;
EINA_LIST_FREE(cp->free_buffers, b)
{
wl_list_remove(&b->deferred_destroy_listener.link);
@ -343,11 +341,13 @@ e_pixmap_new(E_Pixmap_Type type, ...)
}
}
else
pixmaps[type] = eina_hash_int64_new((Eina_Free_Cb)_e_pixmap_free);
{
pixmaps[type] = eina_hash_int64_new((Eina_Free_Cb)_e_pixmap_free);
wayland_time_base = ecore_time_get();
}
cp = _e_pixmap_new(type);
cp->win = id;
eina_hash_add(pixmaps[type], &id, cp);
uuid_generate(cp->uuid);
#endif
break;
default: break;
@ -453,11 +453,6 @@ e_pixmap_refresh(E_Pixmap *cp)
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE);
if (!cp->usable)
{
cp->failures++;
return EINA_FALSE;
}
if (!cp->dirty) return EINA_TRUE;
switch (cp->type)
{
@ -468,6 +463,11 @@ e_pixmap_refresh(E_Pixmap *cp)
int pw, ph;
E_Comp_X_Client_Data *cd = NULL;
if (!cp->usable)
{
cp->failures++;
return EINA_FALSE;
}
pixmap = ecore_x_composite_name_window_pixmap_get(cp->parent ?: (Ecore_X_Window)cp->win);
if (cp->client)
{
@ -703,6 +703,17 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns)
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(ns, EINA_FALSE);
/* This structure is stack automatic in the caller, so it's all
* uninitialized. Clear it to 0 so we don't have uninit data for
* variables only present in a newer version of native surface
* than this code was written for.
*
* The other option would be to set ns->version to whatever version
* this code was actually written against, but I've been told all
* native surface users are expected to set ns->version to the
* version provided in the headers (EVAS_NATIVE_SURFACE_VERSION)
*/
memset(ns, 0, sizeof(*ns));
ns->version = EVAS_NATIVE_SURFACE_VERSION;
switch (cp->type)
{
@ -720,17 +731,14 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns)
if (cp->buffer->dmabuf_buffer)
{
ns->type = EVAS_NATIVE_SURFACE_WL_DMABUF;
ns->version = EVAS_NATIVE_SURFACE_VERSION;
ns->data.wl_dmabuf.attr = &cp->buffer->dmabuf_buffer->attributes;
ns->data.wl_dmabuf.resource = cp->buffer->resource;
cp->native_buffer = cp->buffer;
ret = EINA_TRUE;
}
else if (!cp->buffer->shm_buffer)
{
ns->type = EVAS_NATIVE_SURFACE_WL;
ns->version = EVAS_NATIVE_SURFACE_VERSION;
ns->data.wl.legacy_buffer = cp->buffer->resource;
ret = EINA_TRUE;
}
@ -800,10 +808,13 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
cd->frames = NULL;
EINA_LIST_FREE(free_list, cb)
{
wl_callback_send_done(cb, ecore_time_unix_get() * 1000);
double t = ecore_time_get() - wayland_time_base;
wl_callback_send_done(cb, t * 1000);
wl_resource_destroy(cb);
}
}
else
_e_pixmap_wl_buffers_free(cp);
#endif
break;
default:
@ -845,6 +856,11 @@ e_pixmap_image_refresh(E_Pixmap *cp)
if (cp->held_buffer) _e_pixmap_wayland_image_clear(cp);
/* This catches the case where a client (*cough* xwayland)
* deletes a buffer we haven't released
*/
if (!cp->buffer) return EINA_FALSE;
if (!cp->buffer->shm_buffer) return EINA_TRUE;
cp->held_buffer = cp->buffer;
@ -878,7 +894,8 @@ e_pixmap_image_exists(const E_Pixmap *cp)
return !!cp->image;
#endif
#ifdef HAVE_WAYLAND
return (!!cp->data) || (e_comp->gl && (!cp->buffer->shm_buffer)) || cp->buffer->dmabuf_buffer;
return (!!cp->data) ||
(cp->buffer && ((e_comp->gl && (!cp->buffer->shm_buffer)) || cp->buffer->dmabuf_buffer));
#endif
return EINA_FALSE;
@ -897,7 +914,10 @@ e_pixmap_image_is_argb(const E_Pixmap *cp)
#endif
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
return ((cp->buffer != NULL) && (cp->image_argb));
if (cp->usable)
return cp->image_argb;
/* only cursors can be override in wayland */
if (cp->client->override) return EINA_TRUE;
#endif
default: break;
}
@ -1049,10 +1069,26 @@ e_pixmap_alias(E_Pixmap *cp, E_Pixmap_Type type, ...)
E_API Eina_Bool
e_pixmap_dmabuf_test(struct linux_dmabuf_buffer *dmabuf)
{
Evas_Native_Surface ns;
Evas_Object *test;
Eina_Bool ret;
int size;
void *data;
if (e_comp->gl) return EINA_TRUE;
memset(&ns, 0, sizeof(ns));
ns.type = EVAS_NATIVE_SURFACE_WL_DMABUF;
ns.version = EVAS_NATIVE_SURFACE_VERSION;
ns.data.wl_dmabuf.attr = &dmabuf->attributes;
ns.data.wl_dmabuf.resource = NULL;
test = evas_object_image_add(e_comp->evas);
evas_object_image_native_surface_set(test, &ns);
ret = evas_object_image_load_error_get(test) == EVAS_LOAD_ERROR_NONE;
evas_object_del(test);
if (!ns.data.wl_dmabuf.attr) return EINA_FALSE;
if (e_comp->gl || !ret)
return ret;
/* TODO: Software rendering for multi-plane formats */
if (dmabuf->attributes.n_planes != 1) return EINA_FALSE;
@ -1061,7 +1097,7 @@ e_pixmap_dmabuf_test(struct linux_dmabuf_buffer *dmabuf)
/* This is only legit for ARGB8888 */
size = dmabuf->attributes.height * dmabuf->attributes.stride[0];
data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf->attributes.fd[0], 0);
data = mmap(NULL, size, PROT_READ, MAP_SHARED, dmabuf->attributes.fd[0], 0);
if (data == MAP_FAILED) return EINA_FALSE;
munmap(data, size);

Some files were not shown because too many files have changed in this diff Show More