Compare commits

...

458 Commits

Author SHA1 Message Date
maxerba 59f21dee45 Updating spanish translation 2016-07-30 23:50:11 +02:00
Chris Michael c461d84e2d 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:52:20 -04:00
Carsten Haitzler 3c0ef76768 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:33 +09:00
Carsten Haitzler 0be1551658 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:41 +09:00
Mike Blumenkrantz f8d20b2646 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:17:10 -04:00
Chris Michael 6405077de5 add missing EINA_UNUSED for unused function params
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-19 14:17:09 -04:00
Mike Blumenkrantz 9312ecb434 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:17:01 -04:00
Cedric Bail 38ec80896b filepreview: avoid race condition when destroying txt file preview with slow hard drive.
@fix T4119
2016-07-19 14:16:04 -04:00
Carsten Haitzler 5eb57b0886 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-19 14:15:57 -04:00
Al Poole 560cd87a5b 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:43 -04:00
Derek Foreman d9a660bff9 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 09:59:55 -04:00
Marcel Hollerbach bc54ad58f7 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 09:59:55 -04:00
Mike Blumenkrantz b6cfd00993 match wl_wl output sizing in wl_x11 when running in an existing wm session
global sizing policy++
2016-07-15 09:59:55 -04:00
Mike Blumenkrantz 235f05ccd5 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 09:59:55 -04:00
Mike Blumenkrantz 9e95e7a93b 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 09:59:55 -04:00
Chidambar Zinnoury 93ba9cba26 e desks config: Bring some flip settings back.
These were inadvertently removed by e1369a24bd.

 @fix
2016-07-15 09:59:55 -04:00
Mariusz Bialonczyk 3771347cc3 modules/temperature: cosmetics: typo fix (celcius -> celsius)
Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4129
2016-07-15 09:59:55 -04:00
Derek Foreman cba292d9a9 Don't send keyboard leaves to unmapped wayland surfaces
There are actually toolkits that create surfaces, do nothing with them,
and destroy them.  Sending keyboard leave events for this causes problems.

Fixes a bug in handling of some GTK popups.
2016-07-15 09:59:55 -04:00
Mike Blumenkrantz 867be86d04 destroy evry's focus-out timer if focus-in occurs before timer triggers
fixes dismissal during comp input regrabs
2016-07-15 09:59:55 -04:00
Derek Foreman cdadc386d1 Add a pixel get callback for mirrors
Mirrors can be rendered independently of what they're mirroring,
which (at least under wayland) can result in a situation where the
mirror is rendered before the parent sets up their image pointers
properly.

We give mirrors their own callback to prevent that from causing a
crash.
2016-07-15 09:59:55 -04:00
Derek Foreman 07c619b47c Fix wayland pixmap ids again
Wayland pixmap ids are a different data type for internal and
external windows.  cast them both to 64-bits so they're the same
size regardless of arch.

ref d3ba524a62
2016-07-15 09:59:55 -04:00
Marcel Hollerbach 52f33c985a emix: update sink of sink_input when changed
this fixes none changing sinks in the app.
2016-07-15 09:59:55 -04:00
Marcel Hollerbach ad3b76970a music-player: add spotify 2016-07-15 09:59:55 -04:00
Mike Blumenkrantz 66772892ac disallow pager window drags for popups and ignored windows 2016-07-15 09:59:54 -04:00
Mike Blumenkrantz e679a37fe9 freeze events on comp object input rects during deletion
prevents some event propagation which would cause flickering
2016-07-15 09:59:54 -04:00
Mike Blumenkrantz 23335127c5 store maximize property from E_Remember to disk 2016-07-15 09:59:54 -04:00
Mike Blumenkrantz 4b2659aabe match deskmirror client opacity with original object
fix T3911
2016-07-15 09:59:54 -04:00
Mike Blumenkrantz 24af4b7429 prevent E_Remember->used_count from going negative 2016-07-15 09:59:54 -04:00
Mike Blumenkrantz 23a03a3344 enforce mouse grabs and block client/compositor event propagation while active
fixes cases where mouse events could filter to objects and cause unwanted effects,
such as evry hiding randomly under wayland
2016-07-15 09:59:54 -04:00
Derek Foreman 0edb50f5bf Fix eo object use after deletion in evry
On window hide the focus out callback is triggering and causing a new
timer to be set up.  This timer fires when the window no longer exists.

Remove the focus_out callback when we hide the window.
2016-07-15 09:59:54 -04:00
Mike Blumenkrantz 49c3b7ae82 force unset override and do reshadow on evry when switching to normal win mode
fixes window movement and close animations
2016-07-15 09:59:54 -04:00
Derek Foreman 5f5b471c15 Fix wl_shell popup livelock
Trying to put wl_shell popups in the popup layer results in stacking
problems later and a never ending loop.

Just don't.

fix T3433
2016-07-15 09:59:54 -04:00
Mike Blumenkrantz fbb30b1887 do not mouse-out of clients on focus out when focusing a popup
popups are transient in nature and do not interfere with mouse-based focus
policies

ref 3e6d6b348f
2016-07-15 09:59:54 -04:00
Mike Blumenkrantz 7871d58ce3 add separate mouse in/out handlers for internal wins
internal wayland windows are windows with ssd, meaning they can only receive
pointer events on the contents of the window and not the entire window including
decoration regions

ref T3819
2016-07-15 09:59:54 -04:00
Mike Blumenkrantz fc4f5d4f83 use focused client for window actions if passed object is not a client object
in the case where an action is triggered from the compositor or manager contexts
the passed object will not be a client, causing actions to fail when they should
succeed

fix T3854
2016-07-15 09:59:54 -04:00
Al Poole 89efcfd2d2 fix openbsd battery calc on amd64 2016-07-15 09:59:54 -04:00
Derek Foreman 5d818684aa Allow pixmap argb state to override window state for wayland clients
Wayland argb state depends entirely on the attached buffer, so we
should use that for determining object argb state on wayland.

ref 6d397e313b
ref 60da58d8ad
2016-07-15 09:48:41 -04:00
Jean-Philippe Andre e0bcdaa403 e20: Fix compilation with (deprecated) ecore drm 2016-07-06 16:28:30 +09:00
Simon Lees 7f15166ee0
20.9 NEWS Updates 2016-06-08 12:48:33 +09:30
Simon Lees c5ac8134be
20.9 release 2016-06-08 12:41:01 +09:30
Mike Blumenkrantz 08867e5440 force mouse-in again during comp ungrab if client previously had mouse-in
unfocus performs a mouse-out, so this is necessary in order to allow events
to reach the client again after a grab ends
2016-06-03 11:33:11 -04:00
Mike Blumenkrantz 90ecf5401b unset comp_grabbed flag before action client compositor ungrab
this flag was blocking accurate event propagation in some cases
2016-06-03 11:33:07 -04:00
Mike Blumenkrantz 4c64703f74 only block mouse-out callback for wl action clients if the mouse is grabbed 2016-06-03 11:33:03 -04:00
Mike Blumenkrantz ea1b0a2b02 handle shaded state when receiving x11 configure requests
previously this would resize the window without unshading it, leading to
a confusing state for the window and the user
2016-06-03 11:32:54 -04:00
Mike Blumenkrantz e8c495b2f2 use current zone when activating a client's menu with the mouse
the mouse defines position of a mouse-activated menu

fix T3701
2016-06-03 11:32:49 -04:00
Mike Blumenkrantz a4011ee2d6 delete x11 mouse-in job when hiding the job's client
spurious x11 mouse events will be received when activating a mouse binding which
flips the active desk

fix T3716
2016-06-03 11:32:44 -04:00
Hannes Janetzek ce6da215fd just a small patch to make sure evry_hide does not get called synchronously from an Evry_Action 2016-06-03 11:32:37 -04:00
Mike Blumenkrantz 5cdd0deb58 set x11 maximized window hint correctly on resize end
fix T3702
2016-06-03 11:32:33 -04:00
Chris Michael 1aee967667 change 'if' clause to make gcc-6 happy
Gcc 6 was spitting a nasty little compiler warning here:

src/bin/e_fm.c: In function ‘e_fm2_icon_geometry_get’:
src/bin/e_fm.c:2354:4: warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
^~
src/bin/e_fm.c:2354:19: note: ...this statement, but the
latter is misleadingly indented as if it is guarded by the ‘if’
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-03 11:32:26 -04:00
Mike Blumenkrantz f4f42e8a28 use current zone for shelf config dialog
fix T3683
2016-06-03 11:32:17 -04:00
Mike Blumenkrantz c31b607ba6 update client remember on opacity change
fix T3681
2016-06-03 11:32:13 -04:00
Mike Blumenkrantz 6c93189233 update README.wayland to include xwayland crash bug
https://bugs.freedesktop.org/show_bug.cgi?id=95337
2016-06-03 11:32:08 -04:00
maxerba e8e41b1879 Updating italian translation 2016-06-03 11:32:02 -04:00
Davide Andreoli 2237793917 enlightenment_open: correctly return the exist status code of the executed command
@fix and close T3555
2016-06-03 11:31:56 -04:00
Mike Blumenkrantz d7a934c09a add client util function for detecting popups, block popups in ibar/tasks
mainly a wayland issue where popup menus would cause the tasks gadget to
grow and shrink uncontrollably
2016-06-03 11:31:49 -04:00
Mike Blumenkrantz 608650a2b8 fix e_place_zone_region_smart_cleanup()
this function was adding the same client multiple times, failing to cleanup
windows effectively, and misusing the skiplist functionality of e_place functions

fix T3654
2016-06-03 11:31:33 -04:00
Mike Blumenkrantz a71b5170dc remove pulse sinks/sources from list before running cbs which access the list
this guarantees a crash any time the default sink gets removed since it will
always re-set the about-to-be-deleted default sink as the default sink

fix T3277 probably
2016-06-03 11:31:30 -04:00
Carsten Haitzler cad34648c6 e - suspend.hibernat intelligently - dont account for ac power
this means only lid/screen status affects intelligent suspending. it's
not what people expect and doesnt rely on ecore getting mains power
stuff right too.
2016-06-03 11:31:24 -04:00
Carsten Haitzler 1f0e9fb0ab e start - no it doesny need dbus-launch
no. perhaps you should see the

        execvp("dbus-launch", dbus_argv);

code that auto re-launches using dbus-launch if a dbus session bus etc.
is not "found" (env vars). if your issue is that its mis-detecting the
fix the detection, but this coe went into e_start like a decade ago or
so... and it's worked every since in x11 mode and gave us a dbus
session. it SHOULD work for wayland too. don't make instructions
change and become more complex if not absoultely needed. :)
2016-06-03 11:31:20 -04:00
Chris Michael 1d5a19a54c stop filling logs with buffer transform/scale spam
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-03 11:31:16 -04:00
Simon Lees 951ce44749 20.8 NEWS Updates 2016-05-16 19:54:55 -04:00
Simon Lees 538b33be0c 20.8 release 2016-05-16 19:54:28 -04:00
Mike Blumenkrantz eedbfb4f5f more tweaks for manual window placement in client eval 2016-05-13 11:39:07 -04:00
Mike Blumenkrantz 479ed14872 prevent double emission of E_EVENT_CLIENT_SHOW 2016-05-13 11:39:05 -04:00
Mike Blumenkrantz 9005332468 ensure that client eval correctly handles retries on visibility-pending clients
ref 2854352bc8
fix T3636
2016-05-13 11:25:06 -04:00
Mike Blumenkrantz 57f7f4f5e0 force cursor placement to obey useful zone geometry 2016-05-12 12:43:53 -04:00
Mike Blumenkrantz 00e427b126 adjust some client eval parts to make manual placement work again
activating the window_move action doesn't require the client to successfully
be shown, and failing this check would cause the window_move action to be
deleted until the next restart
2016-05-12 12:43:49 -04:00
Mike Blumenkrantz 90f0740d27 use parent windows for x11 binding grabs
ensure that internal windows do not receive mouse events before the compositor

fix T3347
2016-05-12 12:43:45 -04:00
Mike Blumenkrantz e4f3e73d7d only check pixmap argb state for non-X11 clients
non-argb windows can have argb pixmaps.

ref 6d397e313b
2016-05-12 12:43:40 -04:00
Mike Blumenkrantz 30f3a75366 avoid infinitely looping when applying x11 window grouping
#ThatTimeKainXFoundABug
2016-05-12 12:43:36 -04:00
Mike Blumenkrantz 93a2233f28 use window id for internal window pixmaps again on wayland
this was breaking internal windows when more than one was open, and
especially if any were open which had a parent-child relationship, by
using the same id for all internal window pixmaps
2016-05-12 12:43:32 -04:00
Mike Blumenkrantz 1629ea5c63 set E_Client->override flag for internal wins as needed 2016-05-12 12:43:28 -04:00
Mike Blumenkrantz 68f4a7b75e remove some cruft from _e_comp_wl_client_cb_new() 2016-05-12 12:43:21 -04:00
Mike Blumenkrantz d54f51af57 ensure int64_t is used in all cases for wl pixmap ids 2016-05-12 12:43:18 -04:00
Mike Blumenkrantz 877a1c46f4 enforce setting alpha on comp objects only after image data has been set
setting alpha can trigger a render sync, crashing if the old data is no
longer valid
2016-05-12 12:43:13 -04:00
Mike Blumenkrantz 3de65edc23 also check pixmap argb state when setting comp object alpha
more accurate for wayland
2016-05-12 12:43:04 -04:00
Mike Blumenkrantz c5f8eeeed9 fix usage of e_object_unref in xkbswitch when managing new kbd dialog
probably harmless?
2016-05-12 12:43:00 -04:00
Mike Blumenkrantz 0d20333eb3 toggle compositor canvas focus during init
this sets the toplevel focus flag in elm, allowing widgets on the compositor
canvas to receive focus in wayland compositors
2016-05-12 12:42:54 -04:00
Mike Blumenkrantz 5ea743800c change efm icon entry to only toggle focus in x11 compositors (runtime) 2016-05-12 12:42:49 -04:00
Mike Blumenkrantz 2ddd4d9bda handle positioning of x11 overrides with csd accurately
when first applying the csd region to this type of window the coords must
be adjusted in order to account for the shadow

fix T2934, T2931
2016-05-12 12:42:43 -04:00
Mike Blumenkrantz c5c115c530 only load wayland-specific modules on startup if they have been built 2016-05-12 12:42:39 -04:00
Mike Blumenkrantz 961d3177da block keyboard sending for wl clients if a compositor grab is active
fix T3599
2016-05-12 12:42:35 -04:00
Mike Blumenkrantz eee1ee8fb0 disable focus effects for windows with csd
fix T3408
2016-05-12 12:42:29 -04:00
Mike Blumenkrantz 5cd256da78 ensure child windows are placed on screen
when centering a child over its parent, checks were not made to ensure that
by centering the child it had not gone offscreen
2016-05-12 12:42:21 -04:00
Mike Blumenkrantz 729de96672 do not add ignored clients to ibar menu
fix T3603
2016-05-12 12:42:12 -04:00
Mike Blumenkrantz a0d6b35ae1 update README.wayland to include dbus-launch 2016-05-12 12:42:06 -04:00
Mike Blumenkrantz c86c239d72 make init fail if a dbus session connection cannot be created
typically this indicates a broken session manager or someone trying to run
a wayland session without using dbus-launch
2016-05-12 12:42:00 -04:00
Mike Blumenkrantz b1e4f3d1da flag wl surfaces as internal during create() based on pid matching
fix T3596
2016-05-12 12:41:40 -04:00
Mike Blumenkrantz de03be5131 ensure xwayland module init does not fail due to early startup
comp_type may not be set at the time of init
2016-05-12 12:36:38 -04:00
Mike Blumenkrantz aef99290d0 unset DISPLAY during mixer's pulse backend startup
fixes more xwayland deadlocks
2016-05-12 12:36:31 -04:00
Mike Blumenkrantz a4a6ac0537 clean up mixer includes
config.h needs to be included. always.
2016-05-12 12:36:26 -04:00
Mike Blumenkrantz a259de324e add configure flag for xwayland binary 2016-05-12 12:36:21 -04:00
Mike Blumenkrantz 44526e6ae1 bad copy/paste in _e_place_desk_region_smart_obstacle_add()
CID 1354988
2016-05-12 12:36:14 -04:00
Mike Blumenkrantz f49979bb72 evry null deref
CID 1355061
2016-05-12 12:34:41 -04:00
Chris Michael ed349d4751 disable option for mouse to use Application theme if we are running in Wayland
Small patch to disable selecting Application themed mouse pointers
when running in wayland as this option is currently broken when
running in wayland (gives no mouse cursor at all)

e_pointer calls _e_pointer_x11_setup (from _e_pointer_type_set) which
only sets the cursor via ecore_x_cursor_shape_get calls...

essentially you end up with no mouse cursor because e_pointer is
missing codepaths to lookup system mouse cursor images when running in
wayland.

ref T3585

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-12 12:34:37 -04:00
Mike Blumenkrantz 16f6ef4d9c don't revert focus to desktop fileman during compositor grab
grabs indicate an action is already occurring and focus shouldn't be altered
2016-05-12 12:34:31 -04:00
Mike Blumenkrantz 37aa6a191c hide evry on focus-out
handles case where focus is lost due to compositor grab
2016-05-12 12:34:26 -04:00
Mike Blumenkrantz d21b44b019 ensure lifetime for wl client focus timer
fixes some focus-out crashing
2016-05-12 12:34:22 -04:00
Mike Blumenkrantz 1faf199f45 don't refocus deleted clients during wl compositor grab 2016-05-12 12:34:17 -04:00
Mike Blumenkrantz 5b2cb3ddc7 further optimize window smart placement by reducing obstacle calcs
previously the obstacle list would build from the bottom up, skipping
fullscreen and maximized windows. this would lead to cases where windows
would be moved to avoid windows which were fully obscured, and also cases
where unnecessarily large amounts of looping would occur related to the
existence of maximized windows
2016-05-12 12:34:14 -04:00
Mike Blumenkrantz d525ba8589 directly load extra wl modules during compositor init
speed++++++++
2016-05-12 12:34:09 -04:00
Mike Blumenkrantz a0d5d4b839 ensure that the startup apps cache handler has run before trying to start apps
fixes timing issues when running startup apps
2016-05-12 12:34:05 -04:00
Mike Blumenkrantz dc0ec2339e feed mouse up events to internal wins before mouse out during action exec
ref 609276e12d

fix T3347
2016-05-12 12:34:00 -04:00
Mike Blumenkrantz 12a1894dad Revert "handle recursion more effectively in e_menu_hide_all()"
This reverts commit 5764bf680e.

this was a workaround for a behavior change in efl
2016-05-12 12:33:44 -04:00
Mike Blumenkrantz f7b7a92c5e 20.7 NEWS updates 2016-04-26 10:57:49 -04:00
Mike Blumenkrantz 94b18bec23 20.7 release 2016-04-26 10:57:00 -04:00
Mike Blumenkrantz 75d967cba3 handle recursion more effectively in e_menu_hide_all()
there were recent changes to evas object deletion mechanics which caused
this to begin crashing due to recent changes to evas object deletion mechanics
2016-04-26 10:57:00 -04:00
Mike Blumenkrantz c7a2c55805 distribute all weekeyboard edj files
fixes a build failure in packaging
2016-04-26 10:57:00 -04:00
Mike Blumenkrantz 4750aa6d77 move wayland surface E_Client del check to a place where it's more useful
completely breaks wayland on first commit? off to an auspicious start!

ref d9679f765f
2016-04-26 10:57:00 -04:00
Derek Foreman 5d1dfdf33e wayland: Fix crash when attempting to create surfaces for deleted clients
Internal clients can be deleted by keybind before the surface create
callback fires resulting in a NULL pointer dereference.
2016-04-26 10:57:00 -04:00
Mike Blumenkrantz 4c311d301e protect xdg-shell functions from accessing deleted client data
this is mostly an issue for internal windows since they get deleted by
the compositor before the client is aware
2016-04-26 10:57:00 -04:00
Mike Blumenkrantz 80e46c59bf ensure evry gadget popups effectively clamp to their zones 2016-04-26 10:57:00 -04:00
Mike Blumenkrantz 648f9e14f5 remove explicit edje_init/shutdown calls
elm already handles this
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz f5c7df414d always end drag operations on failure
fix T3507
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz c8f1e02171 treat POPUP_MENU window type as an override window for comp theme matching
ensures that the menu theme gets picked for wayland popups; probably needs
a more comprehensive solution for xdgs v6
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 93e47dda3a remove some X references in settings dialogs
fix T3435
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz dd07d01737 only set "dialog" border for transient clients if window type is unset
fix T3157

from https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html :
_NET_WM_WINDOW_TYPE_DIALOG indicates that this is a dialog window.
If _NET_WM_WINDOW_TYPE is not set, then managed windows with
WM_TRANSIENT_FOR set MUST be taken as this type
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 2085721ce7 set NULL image data in _e_comp_object_pixels_get() on failure
ensure that nothing is rendered here
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 12534a9564 do not show unsized comp objects during theme apply 2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 42b84fb7c8 ensure resize is still deferred for changes.shape clients during failed resize
ref c212bb4e21
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 72374fee7f set NULL image pixel data during x11 render when no damages exist
fixes a weird corner case where shapeless clients try to sneak a fast one
by and you gotta be like http://i.imgur.com/irwmnCT.webm

ref T3157
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz b431fa2939 slightly simplify image data setting in e_comp_object_render() 2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 3ca83ffcb8 remove unnecessary conditional in e_comp_object_render() 2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 29f30d678d ensure damages do not get added for shapeless x11 clients
ref 32d4c2f2b9

ref T3157
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 615bc7f7e5 don't defer resizes+queue render updates for shapeless or pending shaped clients
this basically guarantees a misrender
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 0803d07f7b don't force full damage on x11 override clients
reverts f6be761226

this didn't fix anything and can cause irregularities in rendering
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 24aa26b724 do not attempt to show x11 override windows
fix T3444, T1759, T2735
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz ed4a503ccd unify client filtering checks from e_place_desk_region_smart() 2016-04-26 10:56:59 -04:00
Mike Blumenkrantz 2e52e59f4a ensure that wl clients do not run extra render on hide twice
fixes crash when applications crash
2016-04-26 10:56:59 -04:00
Mike Blumenkrantz cb291348c3 do not perform input ungrab twice during dnd end in wayland
this was happening in both drag free and drag end: once is sufficient
2016-04-26 10:56:59 -04:00
Carsten Haitzler 136b99dff8 e syscon - dont show syscon if desklock is up - you can't respond
this also will lock desklock as syscon grabs input away from desklock.
press pwr button while desklock is up to find out. this fixes that.

@fix
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 13f8b1f158 more accurately reject wl selection setting based on whether serial is invalid
copycopycopycopy
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz cce8ce6401 add copyright headers (MIT) from weston to e_comp_wl_data
these files were created containing code which was very obviously copied from
weston. when copying code, copyright headers must also be copied in order to
comply with licenses.
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 0565f5aa5b redo wl (xdg)shell surface ping
- remove (wrong) global variables which tracked client-specific resources
- start ping upon creating a shell surface
- track client-specific shell resources on a per-client basis
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 84ee6c0300 trivial wl shell module cleanups
remove some old comments, don't pass global data as function param
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz b5ef01ddac make startup/restart app exec timing protocol-specific
this allows different display protocols to start their applications at
different times to ensure that any initialization has completed prior to
starting anything requiring a window

fix T3475
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 46cbc02939 reject xwayland clients in wl client resize handlers
fix T3461
2016-04-26 10:56:58 -04:00
Shuhrat Dehkanov be742c4adc xkbswitch: establish parent/child relationship
Summary:
There is an edge case that results in SIGFAULT in Enlightenment when
"Keyboard Settings" dialog is closed prior to "Add New Configuration"
dialog and "OK" button is pressed in the latter one.
This makes sure that closing the dialogs follows the parent/child logic.

@fix

Test Plan:
1. Go to Settings -> All -> Input -> Keyboard and press "Add"
2. Observe that "Add New Configuration" dialog is opened
3. Select/highlight any new layout
4. Go back to "Keyboard Settings" dialog and close it
5. Press "OK" in "Keyboard Settings" dialog
6. Observe that Enlightenment sigfaults

Reviewers: zmike, raster

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3901
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 0c0377c686 allow mixer volume increase actions to exceed 100%
ref 0bbb20a3be

cc @raster probably should have some kind of theme indicator in the theme
for "high" volumes > 100%
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 6c6ba942da redo e_place_desk_region_smart() to handle multiple screens
this code is unbelievably bad.

fix T3404
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 8c8432598c unify a large portion of repeated code in e_place
this is still a nonsensical nightmare, but at least now it's all in
one place
2016-04-26 10:56:58 -04:00
Carsten Haitzler 2dfc64e220 e intel - fix number 2
so the crazieness in e+intl was because of eina_str_tolower()
silliness... so work with it and another patch to follow on from
01e53356f8 ...

@fix
2016-04-26 10:56:58 -04:00
Carsten Haitzler d70a1b71ba e intl - fix string buffer length size
this intl code was broken using sizeof a pointer (sizef char *) vs
size of the actual buffer used.

@fix
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 334cf0062f ignore maximized+fullscreen windows when placing new clients
this should improve perf and placement

ref T3404
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz 203a118eb4 change client un/maximize_pre callback location to occur after safety checks 2016-04-26 09:59:17 -04:00
Mike Blumenkrantz b4f664b7bc make e_client_has_xwindow() more wayland-only friendly 2016-04-26 09:59:17 -04:00
Mike Blumenkrantz f2486ed7fc directly include e.h in efm device backends
fixes some compile errors related to include ordering

ref 68587276cf
2016-04-26 09:59:17 -04:00
Mike Blumenkrantz 6f1c09689d don't send duplicate configure to wayland clients during unfullscreen
this causes unnecessary client-side resizing
2016-04-26 09:59:16 -04:00
Derek Foreman adaea026a8 Remove unwanted debug detritus from last commit
#Oops

Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-26 09:59:16 -04:00
Derek Foreman 7060ce6567 Clean up some header inclusion
Including certain headers in the wrong order can cause problems if
we're configured to use beta api (right now wayland forces this).

In most cases we should just be including e.h and not the individual
EFL headers anyway.  This fixes some of that.

fix T3426, T3428
2016-04-26 09:59:16 -04:00
Mike Blumenkrantz 8f1dfe0d79 do not unconditionally update position+size when changing wl client csd geometry
this breaks...everything
2016-04-26 09:59:16 -04:00
Mike Blumenkrantz eef14b3619 do not send shell configures for deleted wl clients 2016-04-26 09:56:39 -04:00
Mike Blumenkrantz 5ed82b8e38 set WAYLAND_DEBUG=0 during wl compositor init
ensures that debug logs won't get both compositor and client output,
making the log impossible to read
2016-04-26 09:56:35 -04:00
Mike Blumenkrantz 12d1d70ca4 reject client maximize attempts using identical maximize params 2016-04-26 09:56:31 -04:00
Mike Blumenkrantz 3ad934b7c2 disable xwayland module if exe cannot be found during configure
should probably make this a --flag at some point

fix T3415
2016-04-26 09:56:22 -04:00
Mike Blumenkrantz a2d6a3e0ed don't print xwayland path twice... 2016-04-26 09:56:05 -04:00
Mike Blumenkrantz da2f778897 print xwayland exe path in debug logs
ref T3415
2016-04-26 09:56:02 -04:00
Mike Blumenkrantz f65a5bb3bb wl popup surfaces should not receive focus on show if parent is not focused
fix T3339 harder
2016-04-26 09:55:37 -04:00
Mike Blumenkrantz 350dcf13f0 remove video child references from wl compositor
this is an x11-only thing
2016-04-26 09:55:25 -04:00
Mike Blumenkrantz 4471c63aa4 add back CTRL to keybindings editor display
ref fcac68958e

fix T3412
2016-04-26 09:55:20 -04:00
maxerba dcab7b5a28 Updating italian translation 2016-04-26 09:55:11 -04:00
Mike Blumenkrantz add8af06a9 delete internal wayland elm windows in wl client delete request callback
fix T2874
2016-04-26 09:55:06 -04:00
Mike Blumenkrantz 025c130a45 restrict shelf border_fix to only affect clients affected by the shelf
fixes random other clients changing sizes based on irrelevant shelf hiding
2016-04-26 09:55:02 -04:00
Mike Blumenkrantz 635e056e08 do not incrementally remaximize clients during shelf hide animation
this looks really bad and forces unnecessary spinning
2016-04-26 09:52:16 -04:00
Derek Foreman 8a40d9c6ef wayland: Fix xdg-popup crash
We need to remove the destroy listener when we delete a pixmap or it
leaves an invalid node on the signal list.
2016-04-26 09:51:33 -04:00
Mike Blumenkrantz 9f9dbb3b5e reapply client focus after input grab, only handle focus for wayland compositors
this was looking too weird

ref 4a73e9f29a
2016-04-26 09:51:23 -04:00
Derek Foreman 4b643d8c96 xwayland: Don't leak memory on dnd read failure 2016-04-26 09:51:13 -04:00
Mike Blumenkrantz 0bc84ac6b0 remove clamping for wl xdg popup configures
I don't remember why I added it but it's wrong and so was I
2016-04-26 09:51:07 -04:00
Derek Foreman b2715d2586 wayland: Stop E from consuming all CPU as soon as a selection is made
Clipboard fds from clients are regular files, which shouldn't be passed
to fd_handler_add.  Using the wrong add function causes epoll to return
immediately and we end up running idle handlers and burning cpu.

Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-26 09:51:03 -04:00
Derek Foreman 3eecf5904c wayland: Don't leak a clipboard source if adding fd handler fails
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-26 09:50:59 -04:00
Mike Blumenkrantz 15806cbbf9 don't set wl xdg popups to POPUP layer, set popups as placed on creation
resolves random popup placements
2016-04-26 09:50:53 -04:00
Mike Blumenkrantz bf6ba1b003 enforce wl xdg popup stacking relative to parent stacking 2016-04-26 09:50:46 -04:00
Mike Blumenkrantz 0656da9d2f set destructor for xdg popups when setting implementation
popups never get deleted without this
2016-04-26 09:50:42 -04:00
Mike Blumenkrantz 656a1982bd do not reset previously-set ec->placed state when attempting early client moves 2016-04-26 09:50:38 -04:00
Mike Blumenkrantz 17e32f5786 apply compositor keybinds if an action client that is not focus exists 2016-04-26 09:50:32 -04:00
Mike Blumenkrantz 783c35622d only attempt to rescue offscreen clients if they are completely offscreen 2016-04-26 09:50:26 -04:00
Mike Blumenkrantz 7a2d7cacb6 allow some client zone/desk move actions to occur on action client 2016-04-26 09:50:12 -04:00
Mike Blumenkrantz aa686641b1 remove wl xdg popup new_client stuff from get_popup method
ref d7f7eb9448
2016-04-26 09:50:08 -04:00
Mike Blumenkrantz ae6d22ac40 optimize case where an x11 client is focused/unfocused in same loop iteration 2016-04-26 09:49:51 -04:00
Mike Blumenkrantz 76b76af8ea explicitly manage client focus when setting/unsetting input grabs
clients cannot retain focus during a compositor grab, so ensure that
they do not think they have focus in such cases

fix T3338
2016-04-26 09:49:46 -04:00
Mike Blumenkrantz 7b201be6b3 block wl keyboard modifier updating during input grabs 2016-04-26 09:49:41 -04:00
Mike Blumenkrantz 165f470d7c force keyboard modifier update on wl client focus-in
ensure that clients always receive up-to-date modifiers when they get focus
2016-04-26 09:49:38 -04:00
Mike Blumenkrantz 83faf58fdb don't show some x11-specific compositor settings under wayland 2016-04-26 09:49:33 -04:00
Mike Blumenkrantz 2fdc1096c5 remove old compositor reset code 2016-04-26 09:49:28 -04:00
Mike Blumenkrantz fbb24d9e13 reshuffle notifications on replace 2016-04-26 09:49:24 -04:00
Mike Blumenkrantz 32839ee8f2 track offline/presentation mode notification ids and replace on toggle 2016-04-26 09:49:19 -04:00
Mike Blumenkrantz 3980f4bac3 move notification text escaping into dbus notify method callback
this ensures that notification text reaching the module can be considered
"usable" without forcing multiple escape passes onto the same notification

fix T2757
2016-04-26 09:49:15 -04:00
Mike Blumenkrantz d546536c60 selectively reject comp object signal emissions based on action_client state
in the case where a mouse binding is active and a signal binding is triggered
by the same mouse-up event which also ends the mouse binding, the deferred
nature of edje emissions will result in the signal being received by the
corresponding callback some time after the mouse-up event has been handled by
the client and the mouse binding has ended

to accurately handle these cases, signal bindings triggered in the same event
loop in which a mouse binding has ended after a mouse-up must be rejected in
order to enforce the compositor's mouse grab

fix T3347
2016-04-26 09:49:10 -04:00
Mike Blumenkrantz bdc8078f87 feed mouse out to internal clients upon activating a mouse binding
this prevents internal windows from effectively processing pending
mouse-up events

ref T3347
2016-04-26 09:49:04 -04:00
Mike Blumenkrantz 005de524fb add even more systray/dbusmenu hacks
mrw Qt systray devs take working (4.X) and then break it in 5.X to
be worse than steam: http://gfycat.com/CloudyPinkEmperorshrimp

fix T3139
2016-04-26 09:48:58 -04:00
Mike Blumenkrantz a7e28b6e76 ignore x11 ConfigureRequest events when maximize_override is set 2016-04-26 09:48:52 -04:00
Mike Blumenkrantz c635bf8d5e use canvas pointer coords in systray mouse cb 2016-04-26 09:48:44 -04:00
Mike Blumenkrantz 669d598ef4 remove deleted clients from tasks client list during repop
fix T3369
2016-04-26 09:48:38 -04:00
Mike Blumenkrantz 5a21fd6ee3 do not add deleted clients to tasks gadgets 2016-04-26 09:48:33 -04:00
Mike Blumenkrantz d1568b832f redo wayland client unignore mechanism
wayland clients were previously set as ignored until they obtained
a shell surface in order to avoid early execution of things like placement.

this had no effect.

the ignore must last until the first commit, at which point surfaces have been
sized and can be placed accurately without needing to move the surface around
a lot of times due to resize/frame adjust/birthdays
2016-04-26 09:48:29 -04:00
Mike Blumenkrantz 56e96ce294 do not set initial changed state for new clients if they are ignored
this loops the client idler for no reason
2016-04-26 09:48:22 -04:00
Mike Blumenkrantz 39717a8a38 feed mouse-up events for all buttons on internal wins when activating a binding
bindings enforce compositor grabs, which will result in stuck canvas buttons and
break internal windows which have already received button presses

fix T3347
2016-04-26 09:48:06 -04:00
Carsten Haitzler 586d1ac505 e mod: cpufreq - handle the case where cpu has zero freqs - dont crash
it can be that if you remove setuid bits on cpufreq binary we can end
up with zero freqs on bsd. this causes a crash.

@fix
2016-04-26 09:47:47 -04:00
Mike Blumenkrantz 845cabf732 send resize edges to wl clients on resize start and end 2016-04-26 09:47:41 -04:00
Mike Blumenkrantz 783ae4cae4 remove lots of impossible null checks from pager move callback
CID 1237302
2016-04-26 09:46:55 -04:00
Mike Blumenkrantz fbda06d657 use snprintf for string handling in batget
CID 1039801
2016-04-26 09:46:50 -04:00
Mike Blumenkrantz 9731acfe4a rework systray theme applying code
potentially the most overoptimized string handling code I've ever seen.

CID 1039843
2016-04-26 09:46:45 -04:00
Mike Blumenkrantz ffbe9de1ce use snprintf for string handling in batget
CID 1039801
2016-04-26 09:46:40 -04:00
Mike Blumenkrantz 8344b79020 use eina_streq for e_util_binding_match() comparisons
optimizes what is likely a stringshare comparison as well as avoiding
null derefs

CID 1191998
2016-04-26 09:46:35 -04:00
Mike Blumenkrantz d7e22929c2 avoid null deref in during pager_plain dnd
CID 1237302
2016-04-26 09:46:29 -04:00
Mike Blumenkrantz da00500c11 unset opaque region during comp object render if none exists
fixes case where opaque region has been unset after previously being set
2016-04-26 09:46:24 -04:00
Mike Blumenkrantz fd2a30c767 cast eina_list_count() in flowlayout, not entire expression
CID 1267211
2016-04-26 09:46:20 -04:00
Mike Blumenkrantz 5e27e5f302 ignore xwayland clients in wl client delete request callback
this breaks the compositor!
2016-04-26 09:46:12 -04:00
Mike Blumenkrantz d624b4f4e4 store (internal) elm win geometry when set prior to showing the win
this fixes the case where attempts to manipulate a window would fail
prior to showing the window
2016-04-26 09:45:57 -04:00
Mike Blumenkrantz cc8d773dfc use zone geometry when clamping evry gadget popup to gadget's screen
fix T3238
2016-04-26 09:45:48 -04:00
Mike Blumenkrantz eb596299ad remove wl selection hacks from f0ba92d39e
https://gfycat.com/ChiefDeafeningGull
2016-04-26 09:45:40 -04:00
Mike Blumenkrantz d6e31b30fe hide wl clients before deleting them when surface is destroyed
clients without hide animations will fail to run cleanup operations during
hide if they are not marked as deleted
2016-04-26 09:45:33 -04:00
Mike Blumenkrantz 02c1a2db71 ignore deleted clients when reapplying zone geometry policy in canvas update
this breaks the compositor!
2016-04-26 09:45:29 -04:00
Mike Blumenkrantz 57e60ac77b do not update client coords on csd geom update if it would change the zone
in the case where a client is at 0,0 relative to a zone, changing the coords
in this case will result in the client moving out of the zone by the size of the
csd
2016-04-26 09:45:22 -04:00
Mike Blumenkrantz af1fa7e6e1 always update saved coords for maximized/fullscreen clients on csd geom update
this was causing clients to position themselves wrongly in some cases after
removing the related states
2016-04-26 09:45:17 -04:00
Mike Blumenkrantz ab0e48d268 reduce wizard connman timeout timer to 0.5s
dbus is not this slow.
2016-04-26 09:45:05 -04:00
Mike Blumenkrantz 4c29688829 fix stringshare usage in wizard language page (010)
lang is not stringshared, and if it were then add/ref should always
be called before del
2016-04-26 09:45:00 -04:00
Mike Blumenkrantz d9bd88d2f5 do not reset the wizard got_desktops flag when setting the default system lang
this does not trigger any efreet cache rebuilds and will result in the user
being forced to sit through the full duration of the wait timer: currently 7.0s

this gets triggered multiple times throughout the wizard.

embarrassing.jpg
2016-04-26 09:44:52 -04:00
Chris Michael 2e338e944c destroy seat resource when we get a release request
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-26 09:44:26 -04:00
Mike Blumenkrantz 695a3a8d17 adjust wayland client coords by window_geometry during first surface commit
fixes first window positioning
2016-04-26 09:44:20 -04:00
Mike Blumenkrantz b230940f4f unset solid drawing of opaque regions during comp object animations
this makes animations with transparency not look like giant black rectangles
2016-04-26 09:44:13 -04:00
Mike Blumenkrantz 8d626e490b do not attempt to resize clients to 0x0 during res restore
ACK--
2016-04-26 09:44:06 -04:00
Mike Blumenkrantz d10a03fcb2 unify client post_updates management code into single function 2016-04-26 09:44:00 -04:00
Mike Blumenkrantz 3829f2c10c add workaround for xwayland client bug
sighhhhhhhhhhhhhhhhh
2016-04-26 09:43:44 -04:00
Mike Blumenkrantz 47143ab35a remove direct references to ec->comp_data in x11 compositor
this fixes a number of xwayland client issues
2016-04-26 09:43:39 -04:00
Mike Blumenkrantz a30d043089 calling dirty() on a comp object for a deleted client should not print an error 2016-04-26 09:43:35 -04:00
Mike Blumenkrantz 5bfcd6dd98 always send wl key releases if surface still exists
fixes stuck keys for wl_clients with multiple surfaces
2016-04-26 09:43:29 -04:00
Mike Blumenkrantz 589c159831 remove maximize_pre flag from wl client comp_data
this breaks modification of maximized size for surfaces as well as animations

fix T3297

partially reverts 0321fd690e
2016-04-26 09:43:25 -04:00
Mike Blumenkrantz 29f4c33e06 break out xwl init/shutdown into static functions for reuse internally
calling modapi functions like this causes symbol collision and randomly
calls corresponding functions for other modules
2016-04-26 09:43:00 -04:00
Mike Blumenkrantz 5600aa605a don't add render updates for deleted clients on failed resize 2016-04-26 09:42:52 -04:00
Mike Blumenkrantz ecc85af47a grab comp input on wizard start
without this, windows can randomly grab keyboard input and prevent
fast forwarding
2016-04-26 09:42:52 -04:00
Mike Blumenkrantz 3c5ce6a9d5 redo wizard's gl testing mechanism
Xorg.$.log is not a reliable source of information for a variety of reasons,
using the readily-available evasgl is much safer and more portable
2016-04-26 09:42:52 -04:00
Mike Blumenkrantz 69655795b1 remove eldbus init/shutdown calls from the codebase
this is handled by e_msgbus
2016-04-26 09:42:52 -04:00
Mike Blumenkrantz 5ef356b39f remove library checks for a number of modules along with useless defines
most of these date back from before efl was a unified tree or enlightenment itself
could be optionally built with things like dbus support
2016-04-26 09:42:52 -04:00
Derek Foreman f6c71b781d Free pixel data after taking a wayland screen shot 2016-04-26 09:42:52 -04:00
Derek Foreman f56bbf6e1a Fix internal window borders on 32-bit computers
Our wayland window ids are 64 bit integers, we need to be careful
about the data type on 32-bit machines where pointers are smaller
than this.
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz 67153a06a2 make wayland client keyboard focus list pruning more robust
this should handle all possible cases where focused keyboard resources
need to be removed from the global list
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz e2cdc28ec0 reject attempts to focus deleted comp objects 2016-04-26 09:42:51 -04:00
Mike Blumenkrantz 5d64676bd0 run focus-out and mouse-out wayland client callbacks for deleted clients
this fixes a number of issues caused by clients not cleaning up on deletion

ref 3e9029ea08

 #YouAlwaysRememberTheFirstTimeYouBorkedTheCompositor
2016-04-26 09:42:51 -04:00
Derek Foreman ba88768344 Fix wayland hide for internal windows
We need to make sure we drop reference on all exit paths through the
hide callback - somehow this only seemed to break internal windows.

ref 65166c5a36
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz ec9776e5eb check returned pixmap size before attempting to create updates tiler
CID 1349419
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz 40ebd1d16e don't add render update during ignored damage on deleted clients
ref 1507f815a5
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz e5d9dbd4ec remove show callback from evry win on deletion
==22088== Invalid read of size 1
==22088==    at 0x2C9FE7B1: _evry_cb_show (evry.c:3046)
==22088==    by 0x5BE9918: _eo_evas_object_cb (evas_callbacks.c:65)
==22088==    by 0x69A16F4: _eo_base_event_callback_call (eo_base_class.c:715)
==22088==    by 0x69A3041: eo_event_callback_call (in /usr/lib/libeo.so.1.17.99)
==22088==    by 0x5BEA0B3: evas_object_event_callback_call (evas_callbacks.c:240)
==22088==    by 0x5C2577C: evas_object_inform_call_show (evas_object_inform.c:12)
==22088==    by 0x5C1ED24: _show (evas_object_main.c:1360)
==22088==    by 0x5C1EADA: _evas_object_efl_gfx_base_visible_set (evas_object_main.c:1313)
==22088==    by 0x575D80A: efl_gfx_visible_set (in /usr/lib/libefl.so.1.17.99)
==22088==    by 0x5C1EA58: evas_object_show (evas_object_main.c:1291)
==22088==    by 0x479FCF: _e_comp_intercept_show_helper (e_comp_object.c:1616)
==22088==    by 0x47A02A: _e_comp_intercept_show (e_comp_object.c:1630)
==22088==  Address 0x17621591 is 81 bytes inside a block of size 120 free'd
==22088==    at 0x4C2AE6B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22088==    by 0x2C9F95A8: _evry_window_free (evry.c:993)
==22088==    by 0x2C9F8065: evry_hide (evry.c:366)
==22088==    by 0x2C9FB9A2: _evry_cb_key_down (evry.c:1926)
==22088==    by 0x8F6ED4A: _ecore_call_handler_cb (ecore_private.h:316)
==22088==    by 0x8F6FC92: _ecore_event_call (ecore_events.c:518)
==22088==    by 0x8F7A15A: _ecore_main_loop_iterate_internal (ecore_main.c:2339)
==22088==    by 0x8F784A8: ecore_main_loop_begin (ecore_main.c:1284)
==22088==    by 0x4403F6: main (e_main.c:1087)
==22088==  Block was alloc'd at
==22088==    at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22088==    by 0x2C9F8D7D: _evry_window_new (evry.c:758)
==22088==    by 0x2C9F772D: evry_show (evry.c:177)
==22088==    by 0x2C9F711C: _e_mod_run_defer_cb (e_mod_main.c:537)
==22088==    by 0x8F75267: _ecore_call_task_cb (ecore_private.h:282)
==22088==    by 0x8F7574E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==22088==    by 0x8F7A05B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==22088==    by 0x8F784A8: ecore_main_loop_begin (ecore_main.c:1284)
==22088==    by 0x4403F6: main (e_main.c:1087)
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz af46fe8190 unify client e_hints window size setting in move/resize callbacks 2016-04-26 09:38:08 -04:00
Mike Blumenkrantz 65485742b5 20.6 NEWS updates 2016-03-09 12:18:58 -05:00
Mike Blumenkrantz c50aa176e8 20.6 release 2016-03-09 12:18:12 -05:00
Chris Michael 32921f57f3 don't have to hook the ecore_evas resize callback here as that should
be handled by elm now

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:15:15 -05:00
Mike Blumenkrantz 4a408dfdbc always run client res changes in e_comp_canvas_update()
this function is only called when screen geometry (or useful geometry) has
changed, and so all clients should have their geometries checked at this point
to ensure that they update for any new zone obstacle changes which have occurred
2016-03-09 12:14:59 -05:00
Mike Blumenkrantz 53941a7dc0 block re-unsetting of native surface for comp objects
due to recent evas internals changes, this breaks software compositing
2016-03-09 12:14:53 -05:00
Derek Foreman 0959e59413 Remove argb_convert for wayland buffers
Wayland buffers are currently either ARGB or XRGB - we don't need to
convert either of these, we just need to set alpha appropriately - which
we now do.
2016-03-09 12:14:47 -05:00
Derek Foreman 6f7ed23bc9 Don't use e_pixmap_image_data_argb_convert for wayland images
All we really need for wayland is to set alpha properly, so we can
save the conversion/copy when doing XRGB.
2016-03-09 12:14:41 -05:00
Derek Foreman 388ec769c0 Stop copying all wayland buffers
The new buffer management shouldn't require this anymore.
2016-03-09 12:14:37 -05:00
Derek Foreman 20303989de Re-enable window close animations for wayland
These should work properly with the new buffer management code.
2016-03-09 12:14:34 -05:00
Derek Foreman ee43c83c7d Remove wayland buffer reference
This code is similar to code in weston, but doesn't really work properly
for us in E, since this can blow up buffers behind the async renderer's
back.

The rest of the reference code has been pushed into e_pixmap, so we can
kill this all now.
2016-03-09 12:14:29 -05:00
Derek Foreman 7aef5e74fd Rework wayland buffer handling
We need to keep wayland buffers around even if they'll never be written
to again.  This is part of Buffer_Reference's task in weston, but we
already have our pixmap abstraction which can serve mostly the same
purpose.

Remove the "buffer reference" stuff from e_pixmap and replace it with a
kept buffer for the last commit.

Add shared memory pool references to keep pools from going away on us.
2016-03-09 12:14:23 -05:00
Derek Foreman 71433691da Track whether a render is in progress or not
We'll need this to protect certain wayland operations.
2016-03-09 12:14:17 -05:00
Derek Foreman d44d334953 Don't allow deleted wayland clients to set the cursor 2016-03-09 12:14:13 -05:00
Derek Foreman 74ce8dd7be Take an extra reference on wayland clients
We need to make sure wayland clients aren't deleted while the scene
graph has their data pointers, so we take an extra reference when creating
them.

We drop that reference by clearing the client's image data and putting it
in the render post_updates list.
2016-03-09 12:14:08 -05:00
Derek Foreman d38cc38b9d Track whether objects are on the post_updates list or not
Will use this to prevent accidentally adding objects to the list twice
2016-03-09 12:14:03 -05:00
Derek Foreman 4ba7648c41 Render deleted objects as long as they still have a pixmap
In wayland we can be presented with a new frame before being deleted.  If
we've never displayed that frame we should (since we released all pointers
to the old frame when we got the new one)
2016-03-09 12:14:00 -05:00
Derek Foreman 4e1d7e3854 Add a NULL check in native_surface_init under wayland 2016-03-09 12:13:55 -05:00
Carsten Haitzler bc5d9ecb03 e xkbswitch: don't free layouts that are just pointed to in instances
we free the instance layout even though tthis is never duplicated but
jhust set to point to the current_layout. don't free it as this causes
a double-free. this fixes a crash here.

@fix
2016-03-09 12:13:49 -05:00
Mike Blumenkrantz 5979808c80 apply x11 focus/unfocus using jobs
if multiple x11 clients receive focus during the same mainloop iteration,
an almost unbreakable cycle of window focus chaining will occur, resulting in
both windows being focused simultaneously--or so it appears--which results in
no window being able to receive input. to avoid this, ensure that only one x11
client can receive focus in a given loop iteration
2016-03-09 12:13:43 -05:00
Mike Blumenkrantz 85b2433559 apply x11 mouse in event for clients using a job
due to event bursts, it's possible for multiple x11 clients to receive
mouse in events on during the same main loop iteration. in this scenario,
only the last client has received an actionable mouse in, and applying this
event after the dispatch has completed ensures that multiple clients do not
all receive mouse in+out events during the same loop

this greatly improves mouse-based focus reliability in a number of cases
2016-03-09 12:13:38 -05:00
Mike Blumenkrantz ad873f03ab only use x11 mouse out event if client has received mouse in previously 2016-03-09 12:13:32 -05:00
Mike Blumenkrantz 5580a040ab reverse ordering for x11 client mouse in NotifyVirtual and NotifyInferior details
apparently I did this backwards.

ref 7b7dbbc249
2016-03-09 12:13:28 -05:00
Mike Blumenkrantz a346c622b6 reject x11 client mouse-in events on comp object based on frame geometry
mousing over a window for an x11 client should always yield x11 mouse events
in cases where mouse eventing is required; any events occurring on the comp
object in other cases inside the xwindow region are able to be ignored
2016-03-09 12:13:23 -05:00
Mike Blumenkrantz d83621f7e4 Revert "send mouse out+in on desk flip end"
This reverts commit 782cf3606e.

should be resolved in a better way with upcoming commits
2016-03-09 12:13:18 -05:00
Mike Blumenkrantz 440d9ceb81 don't directly use image data when creating a comp object mirror
in the case where pixmap image data does not yet exist, the returned
pointer will be garbage data from the internal buffer
2016-03-09 12:12:53 -05:00
Chris Michael c97b52b02c add prototype functions for missing wl_data_source interface
As we require wayland 1.10 now, there were missing functions for the
wl_data_source interface. This patch just adds placeholders for those
missing functions until we can implement them

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:12:45 -05:00
Chris Michael b7f1fa0b53 add prototype function for missing wl_seat interface
As we require wayland 1.10 now, the wl_seat_interface implementation
was missing a function pointer for the 'release' request. This patch
just implements a function placeholder until we can implement it.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:12:31 -05:00
Chris Michael b113fd96fb add prototype functions for missing wl_data_offer interface
As we require wayland 1.10 now, there were missing functions for
wl_data_offer interface. This patch just adds placeholders for those
missing functions until we can implement them

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:12:26 -05:00
Mike Blumenkrantz 0b8cf7f959 do not add render updates during damage of deleted clients 2016-03-09 12:12:14 -05:00
Mike Blumenkrantz 1c0e13c575 remove impossible null check in color dialog
CID 1294267
2016-03-09 12:12:11 -05:00
Mike Blumenkrantz 2e819fef17 simplify ipc socket creation
in trying to be extra secure here, a security hole is created due to time
between mkdir and stat calls

CID 1039781
2016-03-09 12:12:05 -05:00
Mike Blumenkrantz 4619114ea7 remove ipc command allowing arbitrary command execution by the compositor
http://i2.kym-cdn.com/photos/images/facebook/000/565/399/9c0.jpg

CID 1291836
2016-03-09 12:12:00 -05:00
Mike Blumenkrantz caf795834e simplify static grab case statements
CID 1267213
2016-03-09 12:11:55 -05:00
Mike Blumenkrantz 42ff50a584 use uint instead of int for eina_list_count() return in cpufreq (trivial)
CID 1267212
2016-03-09 12:11:50 -05:00
Mike Blumenkrantz 791953e1b7 remove useless client_add handler in e_ipc
CID 1267210
2016-03-09 12:11:45 -05:00
Mike Blumenkrantz 169727db4d remove unused value in config profile saving
CID 1261287
2016-03-09 12:11:41 -05:00
Mike Blumenkrantz dddf8c5f1e prevent potential null deref during pager (plain) window drag
CID 1237302
2016-03-09 12:11:38 -05:00
Mike Blumenkrantz c24de2a210 replace static buffer usage with binbuf in e_fm_ipc
CID 1039804
2016-03-09 12:11:34 -05:00
Mike Blumenkrantz bd6b99bd30 use dblequal for double comparisons in edgebindings config 2016-03-09 12:11:27 -05:00
Mike Blumenkrantz 55fc7f4961 use strbuf instead of strcat in edgebinding string synthesis
CID 1039800
2016-03-09 12:11:23 -05:00
Mike Blumenkrantz 02c0612faf use strbuf instead of strcat in keybinding string synthesis
CIDs 1039798, 1039799
2016-03-09 12:11:19 -05:00
Mike Blumenkrantz 7a7c57c2b8 strcpy -> strncpy in evry files plugin 2016-03-09 12:11:15 -05:00
Mike Blumenkrantz 21ab21d551 remove multihead env var setting in e_exec
multihead no longer possible, no point in keeping this

CID 1039793
2016-03-09 12:11:10 -05:00
Mike Blumenkrantz f9d9979800 remove DISPLAY usage from E_IPC_SOCKET value
pid should be enough here

CID 1039791
2016-03-09 12:11:05 -05:00
Mike Blumenkrantz cf0d1eba9c remove security hole in e_start_main
if a file called ~/.e-mtrack existed then during startup the launcher would
read the first line of this file and set LD_PRELOAD to that value

CID 1039785
2016-03-09 12:11:00 -05:00
Mike Blumenkrantz 51365e879e do not set XCURSOR_PATH variable if re-setting existing value 2016-03-09 12:10:56 -05:00
Mike Blumenkrantz a04a93e5ef use strbufs instead of strcat in fwin navbars
CIDs 1039794, 1039795, 1039796
2016-03-09 12:10:51 -05:00
Mike Blumenkrantz f546997405 disable emotion_shutdown during shutdown procedure
this manually iterates main loop and is guaranteed to trigger unexpected
behaviors and/or crashes
2016-03-09 12:10:47 -05:00
Mike Blumenkrantz 0de37612bb force changed when adding or removing keyboard layouts in config
fix T3208
2016-03-09 12:10:41 -05:00
Mike Blumenkrantz d3d36092c7 update winlist ui when using directional window selection
fix T3152
ref b1378ce77b
2016-03-09 12:10:27 -05:00
Mike Blumenkrantz f009e7c752 do not decrement e_comp->new_clients for non-new clients during _e_client_eval
this overflows the int!
2016-03-09 12:10:03 -05:00
Mike Blumenkrantz a8ecf89bd6 make bgpreview create vdesk config dialog on mouse up instead of mouse down
if the option to always raise a window on click is enabled, clicking an internal
window in a way which creates another window will cause a race condition where
the clicked window is raised over the newly created window

there is no obvious policy-wide solution to this issue, but making this change
at least resolves the issue in question

fix T3210
2016-03-09 12:09:58 -05:00
Mike Blumenkrantz b1a5eeeb0c remove some unused variables 2016-03-09 12:09:50 -05:00
Mike Blumenkrantz 2e692ace58 redo wayland pixmap ids to use monotonic decreasing ints with no collisions
using pointers for this turned out to have some corner case collisions, so
now just use something totally unrelated to the surface to ensure uniqueness
2016-03-09 12:09:46 -05:00
Carsten Haitzler 361b6d84e0 e - efm: fix op registry listener add and dont use eina_error
eina list stopped using eina_error like... so so so so so long ago like
before 1.0 - so eina_error value may be something junk and from
somewhere else where the list append succeeded but ena error said
fail- and that is what was happening and things crashed. this fixes this

@fix
2016-03-09 12:09:40 -05:00
Mike Blumenkrantz d3b6e7a219 enable comp object image data refresh if a dirty call is made with no damages
this indicates that a buffer has changed, but there is no new data to draw
2016-03-09 12:09:35 -05:00
Mike Blumenkrantz 1a71696c3a pre-remove pixmap from x11 clients during del hook
this breaks the compositor!

ref 0ca200513e
2016-03-09 12:09:27 -05:00
Mike Blumenkrantz 048eed9402 reshuffle x11 comp init to cleanup on failure cases
in the event of a wayland start, x11 comp init will fail, meaning that
cleanup must occur in order to avoid erroneous triggering of x11 handlers

 #TooSoon
2016-03-09 12:09:21 -05:00
Derek Foreman 5143ed69de Remove wayland focus timer in delete callback
If we don't remove it now it could fire later when the structures
it depends on are already freed.
2016-03-09 12:09:15 -05:00
Derek Foreman 2904c7a611 Bump wayland version requirement
We need 1.10 for the shm pool referencing api
2016-03-09 12:09:10 -05:00
Derek Foreman 1a6dac4677 Move pixmap free to client free from client destroy
Under wayland we need the pixmaps to exist until after the close
animations finish, even if clients can perform new rendering.

@fix
2016-03-09 12:08:43 -05:00
Derek Foreman c7027d4f44 Use eina_list_merge instead of eina_list_move for wayland lists
We should use eina_list_merge for concatenating lists instead of
eina_list_move.
2016-03-09 12:08:37 -05:00
Derek Foreman c9b720cccd Protect the wayland frame callback list from corruption
The resource destroy callback for frame callbacks will walk the frame list
to remove itself.  When freeing that list we need to make sure the
resource destroy callback doesn't see the same list we're walking and
corrupt it.
2016-03-09 12:08:33 -05:00
Derek Foreman e8c3320712 Fix xdg-shell destructors
_e_shell_surface_destroy() is already the implementation's destructor, so
it'll be called when the surface is destroyed anyway.  What we have to do
here is just call wl_resource_destroy(resource) - which will call that
function for us.

It'll also do us the favor of actually destroying the resource and
removing it from the client's resource list so we won't get a SECOND call
to _e_shell_surface_destroy() on client exit.
2016-03-09 12:08:27 -05:00
Derek Foreman f8be94f19e Remove wayland frame callbacks from subsurface cache on destruction
There are 3 places a frame callback could be hiding.  frames list,
pending.frames list, or subsurface cached.frames list.  We weren't
clearing it from the subsurface cache on destruction.
2016-03-09 12:08:21 -05:00
Mike Blumenkrantz 0a557c8d05 improve enforcement of shelf autohide-related window adjustment
for whatever reason, there's a global option which makes windows adjust
when a shelf autohides as well as a per-shelf option to ignore the global
option

in the case where the global option is not enabled, there is no reason to
check the per-shelf option

ref 5d63b07ca3
2016-03-09 12:08:11 -05:00
Derek Foreman 209cf8f9d7 Ensure wayland clients haven't been deleted when processing callbacks
Summary:
It's apparently possible to trigger at least some of these by interacting
with a client as it's closing, so add a bunch of checks.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3699
2016-03-09 12:08:03 -05:00
Mike Blumenkrantz 263774c4a1 do not clamp comp object input regions to 0,0
this breaks input for clients using csd which are aligned at x|y axis
2016-03-09 12:07:52 -05:00
Mike Blumenkrantz f31e540140 do not perform special case position adjustment for re_manage clients
this case is solely for handling clients which are created with nonzero
position, eg. an x11 window trying to display itself centered upon initial
creation. re_manage indicates a window which is re-managed after a restart of
enlightenment, so these windows clearly do not fall into that case

fixes an issue where windows would move up+left by the size of their frame during
restart

ref 95e133282e
2016-03-09 12:07:38 -05:00
Mike Blumenkrantz 98b124850e clamp minimum shelf size to 20px in shelf config
the majority of gadgets do not render correctly/anything under this size,
so allowing it to be set is not going to be helpful to anyone
2016-03-09 12:06:52 -05:00
Chris Michael aa58760e29 update mailmap addresses
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:04:40 -05:00
Chris Michael c272ba7743 update mailmap addresses
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:04:35 -05:00
Mike Blumenkrantz 9578d65199 20.5 NEWS updates 2016-02-03 11:49:07 -05:00
Mike Blumenkrantz 227f66420f 20.5 release 2016-02-03 11:49:07 -05:00
Mike Blumenkrantz 4a6f329905 add back x11 window focusing
somehow during a cherry-pick of 96b55ce441,
this line was removed. no conflicts were raised during the cherry-pick.

thanksgit.jpg

fix T3137
2016-02-03 11:49:00 -05:00
Mike Blumenkrantz f3b9d9a9c6 20.4 NEWS updates 2016-02-02 13:47:46 -05:00
Mike Blumenkrantz 652a36e3c8 20.4 release 2016-02-02 13:46:36 -05:00
Mike Blumenkrantz c6d96feea2 disable map when unsetting zoomap child
if the existing map is left enabled when the child is removed from the
zoomap, the child object will be permanently misrendered with the previously
applied map
2016-02-02 13:41:30 -05:00
Mike Blumenkrantz 5864d4b9e6 send mouse out+in on desk flip end
this triggers mouse in events on objects under the mouse in order to
forcibly reapply focus for mouse-based focus policies

fix Tfrance
2016-02-02 13:41:14 -05:00
Mike Blumenkrantz f4179c1b27 update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input
according to xkbcommon, the group returned from serializing the EFFECTIVE layout
is the one which is currently active. this array index should match up with the
list used in the xkb part of E_Config
2016-02-02 13:41:05 -05:00
Mike Blumenkrantz c111cf7455 do not update keymap group in _e_comp_wl_input_keymap_update()
this state is dead, and any group changes which have been made should
be reapplied based on the new state
2016-02-02 13:41:02 -05:00
Mike Blumenkrantz 5919d6ae7c disable shelf shadows if "noshadow" data item exists in shelf theme
this used to be handled by the "shaped" flag back when shelves had their
own windows, but the handling for it was lost during the transition away from
the E18 compositor
2016-02-02 13:38:48 -05:00
Mike Blumenkrantz 820a70e71d do not shortcut access of Efreet_Desktop->x hash in fileman
this subverts thread safety and also (now) avoids return data validation

fix T3096
2016-02-02 13:38:29 -05:00
Mike Blumenkrantz 3fbdc847ab do not attempt to create x11 canvas during xwayland init
this kills the gl_drm engine
2016-02-02 13:38:21 -05:00
Mike Blumenkrantz a372e5ba1b disable bindings during wayland screenshot operations
recursive action activation is very bad.
2016-02-02 13:37:40 -05:00
Mike Blumenkrantz e5e2a7cca4 defer screenshot action execution using a job
the drm screenshot action forcefully iterates the main loop, causing
the current loop (which triggered the action) to return after the screenshot
action has ended. during this time, it's possible for other actions to also
trigger, including triggering subsequent screenshot actions, so it's necessary
to defer the execution of the action until after the initial loop which triggered
the action has returned

 #Recursion
2016-02-02 13:37:35 -05:00
Mike Blumenkrantz e84ea043ac remove comp canvas key handler shortcuts for passing keys to wayland clients
now handled normally by disabling bindings
2016-02-02 13:36:56 -05:00
Mike Blumenkrantz 7e3e2db2be disable binding activation when grab dialog, menus, or dnd is active
these are all cases where bindings should fail to activate in order to
avoid interfering with current operations

also fixes an issue where attempting to add or modify an existing
mouse/key/wheel binding would fail as a result of that binding activating
while the grab dialog was active
2016-02-02 13:36:46 -05:00
Mike Blumenkrantz 9c22c5d12a add function for disabling mouse/key/wheel/signal bindings
currently there are a lot of workarounds for inhibiting these bindings,
but it's getting harder to keep track of all the conditions and cases
where bindings need to be worked around

this should greatly simplify the process of toggling binding activation
in cases where such behavior is undesirable

acpi bindings are always allowed since they are unlikely to interfere with
operations where direct-input bindings would be harmful
2016-02-02 13:36:42 -05:00
Mike Blumenkrantz a28eae0ca9 allocate E_Shell_Data for all xdg surfaces (popups)
this crashes if the shell surface does not have shell data
2016-02-02 13:36:24 -05:00
Mike Blumenkrantz 97b6558444 handle more mouse buttons in wayland
according to the "reference" compositor this is how it works
2016-02-02 13:36:20 -05:00
Mike Blumenkrantz 9af96a4c23 determine new_client state for xwayland clients using xwayland pixmap
in the case where the xwayland pixmap has previously been marked as usable,
the corresponding client is guaranteed to have gone through the new_client
eval. allowing a second eval will result in wrong geometries being set for
the window in some cases
2016-02-02 13:36:14 -05:00
Mike Blumenkrantz 69ebda1df8 allow instant client mouse actions to persist until mouse up
if an action triggers on a window, the triggering mouse event should
not be passed to the window. the only way to determine this is if the
action object lives through the entire event
2016-02-02 13:36:08 -05:00
Mike Blumenkrantz f4c3d3eae8 unify client mouse action ending
the code for this in most places was identical, but in some places it was
not, leading to behavior inconsistencies and potentially dangling objects
2016-02-02 13:35:55 -05:00
Mike Blumenkrantz 3535581b2c enable surface visibility fallthrough for drag clients
more surfaces with no shell interfaces
2016-02-02 13:35:43 -05:00
Mike Blumenkrantz c0be62b0b4 track wayland client mouse button states as a full button mask
sending a button release event to a surface which has not previously
received a button press yields strange results
2016-02-02 13:35:38 -05:00
Chris Michael 18d59156cc check siginfo si_code to verify that SIGUSR2 comes from user
When VT switching away and back, the kernel uses SIGUSR1 and SIGUSR2
to notify us of a vt switch event. That same signal was being trapped
here to toggle display of the 'fps' window. If we check the signal's
si_code, we can tell if this signal came from the kernel (as in vt
switch) or from the user (as is sent in 'kill'). This fixes the issue
of VT-switching back and forth under DRM would cause the compositor
'fps' display to appear.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-02 13:35:28 -05:00
Mike Blumenkrantz 7ae3d94308 remove _e_comp_wl_focus_down_set()
this function does nothing for wayland clients and never should have
been used in this file
2016-02-02 13:35:19 -05:00
Mike Blumenkrantz 65c222698c reenable fallthrough surface (un)mapping for subsurfaces during commit
subsurfaces have no shell interface and rely upon the map state of parent
surfaces to determine whether they are mapped
2016-02-02 13:35:15 -05:00
Mike Blumenkrantz 8ddc98d3a7 add render updates for cursor clients if damages exist during set_cursor
this indicates a cursor surface which has been committed but could not be
rendered due to lack of shell interface and cursor hint
2016-02-02 13:35:09 -05:00
Mike Blumenkrantz 45d8cb6b5e remove duplicate visibility setting blocks from wayland surface commit
this is already present (and identical) in state commit
2016-02-02 13:35:03 -05:00
Mike Blumenkrantz 47196af43a always apply damages and input regions during wayland commit
mapped status is not relevant according to spec
2016-02-02 13:34:57 -05:00
Mike Blumenkrantz 3b77b7aa43 do not set focus in wayland client show callback for cursor clients 2016-02-02 13:34:53 -05:00
Mike Blumenkrantz 317f0794d6 automatically mark wayland cursor surfaces as visible during set_cursor
a cursor client should be shown/hidden as needed despite its lack of a
shell interface, and having a special flag to identify these types of
surfaces makes it easier to do that
2016-02-02 13:34:48 -05:00
Mike Blumenkrantz f129b0d7d5 |= instead of = flag setting for want_focus during wayland surface commit
if want_focus has already been set, this check should not unset it
2016-02-02 13:34:32 -05:00
Mike Blumenkrantz 62171ab39a improve focus setting during wayland client show callback
take_focus will only be handled if the new_client flag is set. in all
other casees, focus_set should be called directly

new_client flag implies changed flag
2016-02-02 13:34:28 -05:00
Mike Blumenkrantz da2af2de23 more correctly handle evry mouse detection on wayland
in this case, mouse events which are not originating from the internal
window are for the screen, and these coords can be used for determining
"mouse out". if the mouse event comes from the window, it is inside the window.

ref 7c661b54a9
2016-02-02 13:34:21 -05:00
Mike Blumenkrantz 76d7824a7c only do passthrough surface map on xwayland surfaces during commit
these was a workaround for handling early internal windows which is
no longer necessary now that they will handle their map states more
effectively

now, any wayland surface (not xwayland) requires a shell to map the
surface as intended
2016-02-02 13:34:13 -05:00
Mike Blumenkrantz 7b4b823758 set want_focus for xdg popup surfaces on creation
these types of surfaces should grab focus as early as possible, and
setting the flag at this time ensures that it will be handled during
the next client eval
2016-02-02 13:34:09 -05:00
Mike Blumenkrantz f63ebeb939 call xdg surface map when creating a surface for visible internal windows
if windows are created during startup, they will attempt to show themselves
before xdg surface operations are available, leading to a scenario where they
will never successfully map themselves. if the elm win object is visible, this
indicates a mapped internal window, so directly call the map function at this
time to make the window visible
2016-02-02 13:34:05 -05:00
Mike Blumenkrantz f1ccac3775 remove need_reparent, reparented, first_damage flags from wl client comp_data
these flags, and related code, have no functional purpose in wayland
2016-02-02 13:33:58 -05:00
Chris Michael d37bcc887d Fix issue of using the wrong id when finding pixmap client
Previously, we were passing in the wl window id into the
pixmap_find_client function. This is improper as the e_pixmap_new
functions take the surface resource id. To solve this, we will get the
Ecore_Wl2_window from the Evas_Object, fetch the surface id from that,
then pass those into e_pixmap_find_client.

This resolves an issue where the everything module was not working
properly.

ref T3058

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-02 13:33:50 -05:00
Marcel Hollerbach a928205be4 e_comp_wl: only ignore ignored clients
a override client (in terms of override like x) should get focus, which
would not happen for the case of the function call.
2016-02-02 13:33:22 -05:00
Mike Blumenkrantz bd8a804718 remove defines for various beta api in other places 2016-02-02 13:32:31 -05:00
Mike Blumenkrantz 5a917094cf define EFL_BETA_API_SUPPORT explicitly in e.h if wayland support is enabled 2016-02-02 13:32:31 -05:00
Mike Blumenkrantz dfa9b45044 create wl client connection during compositor init, use in shot module
fixes shot module

ref T2919
2016-02-02 13:32:31 -05:00
Mike Blumenkrantz e67f238c06 call ecore_wl2_shutdown() in wl compositor delete callback
shutdown/restart crash--
2016-02-02 13:32:31 -05:00
Chris Michael 641fb52c62 Update wl_weekeyboard for ecore_evas_wayland_window_get2 function rename
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-02 13:32:31 -05:00
Chris Michael 9400e33bab Fix issue of nested compositors not working with Ecore_Wl2 library
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-02 13:32:31 -05:00
Chris Michael 59762676a8 Fix type of size fields for E_Shell_Data
In the xdg_surface_configure_send function, the size params
(width/height) come in as int32_t. This patch makes the E_Shell_Data
fields for width & height match those (else we end up with compiler
warnings when comparing int32_t to uint32_t).

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-02 13:32:31 -05:00
Chris Michael 96b55ce441 Fix using global ewd variable by making it part of e_comp_wl
ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:31 -05:00
Chris Michael be2221ed95 Try to init (and error check the init) of ecore_wl2 library before we
create a compositor

ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 8cc5207355 Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael c648775b95 Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 5ea81d10fd Port wl_fb module to use Ecore_Wl2 Library
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 6e743567e6 Port wl_weekeyboard to use Ecore_Wl2 library
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 58c7122aaf Don't leak eina_iterator in shot module
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael bdc41d238d Fix formatting of wl_weekeyboard module
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael cf51751347 Port shot module to use ecore_wl2 library
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael b8a7b2b93f port e_scale to use Ecore_Wl2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 824003eb1d port wayland compositor to use Ecore_Wl2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 5ff896f4bd remove unused event loop and add external Ecore_Wl2_Display variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 01ac2a1a08 include header for Ecore_Wl2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 157bee79ff Make configure check for Ecore_Wl2 library
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Mike Blumenkrantz 80c2439e2b 20.3 NEWS updates 2016-01-18 16:01:54 -05:00
Mike Blumenkrantz 4e91278589 20.3 release 2016-01-18 15:51:30 -05:00
Mike Blumenkrantz 68a211e9c4 automatically attempt to create a wayland x11 output during comp init
at this point an x11 compositor has already failed to be created, so trying
to use x11 is safe and probably desired
2016-01-18 15:44:11 -05:00
Mike Blumenkrantz 27e4881193 use more correct defines for enabling wl output modules during comp init 2016-01-18 15:44:07 -05:00
Mike Blumenkrantz a06c03bd14 if available, use wl output (nested) for wayland compositor creation
this defaults to using a nested compositor as the first choice:
harmless if it fails to create an output
2016-01-18 15:44:01 -05:00
Mike Blumenkrantz 344a89618f unset WM_STATE for x11 clients upon unmapping them
icccm provides conflicting spec info regarding how this property should be set.
according to 4.1.3.1:

When the window is withdrawn, the window manager will either change the state
field's value to WithdrawnState or it will remove the WM_STATE property entirely.

however, 4.1.4 states:

Only the client can effect a transition into or out of the Withdrawn state

so to be on the safe(r) side, deleting the property seems to be the best choice here

ref 41daddeacc

fix T3011
2016-01-18 15:43:52 -05:00
Mike Blumenkrantz 57ea33e541 do not unset comp object native surface during shape apply
due to efl changes, unsetting a native surface now clears existing image pixel
data, resulting in a guaranteed blank render

ref T3011
2016-01-18 15:43:47 -05:00
Mike Blumenkrantz 6bedbfc235 create comp object updates tiler in helper function from either show or damage
it's possible for damage to occur before the show interceptor is triggered,
and in this case damages would be lost despite it being a valid usage

ref T3011
2016-01-18 15:43:40 -05:00
Marcel Hollerbach d093fc8e33 e_grabinput: do not pass a faulty time
Summary:
currently there is ecore_x_current_time passed, which is the time of the
last event. if this is passed to ecore_x_window_focus_at_time the request can be
ignored because the last event can be in the past. Instead using
ecore_x_window_focus fixes this, because current time is passed, which
means that x is just using this event at the time it is called.

@fix T2948

Test Plan: Try to run spotify and try to trigger the bug, I cannot anymore.

Reviewers: zmike, raster

Subscribers: raster, abyomi0, cedric, billiob

Maniphest Tasks: T2948

Differential Revision: https://phab.enlightenment.org/D3471
2016-01-18 15:43:33 -05:00
Mike Blumenkrantz b8a5f960b9 enforce border_fix_on_shelf_toggle config option in shelf
shelf overlap can only take effect based on the state of this option:
specifically, overlap can only be enabled if border_fix_on_shelf_toggle
is enabled
2016-01-18 15:40:03 -05:00
Mike Blumenkrantz 8246999681 make E_DESK_TYPE an int define
this was causing unsigned vs signed comparison warnings
2016-01-18 15:39:41 -05:00
Mike Blumenkrantz 7212db0fc5 improve menu hiding and autoclose
remove menu object from autoclose (if set) and ensure that only the
intended menu is deactivated in the autoclose callback

this fixes some cases where the wrong menu could be closed (or not closed)
due to race conditions with ecore and evas events
2016-01-18 15:39:35 -05:00
Mike Blumenkrantz b978485453 allow NULL object in e_comp_object_util_autoclose()
this can be used to unset the current autoclose object in the case
where the object is known to evade normal autoclose detection
mechanisms
2016-01-18 15:39:30 -05:00
Mike Blumenkrantz a707cc3be6 remove configs for illume modules
these have been out of the tree for years but I forgot to remove the
corresponding configs, leading to error messages when the mobile profile
attempts to load them
2016-01-18 15:38:25 -05:00
Mike Blumenkrantz d2db215201 do full cleanup when overriding existing comp autoclose object
failing to trigger delete on existing autoclose object would result
in the object never closing and being "leaked"
2016-01-18 15:38:21 -05:00
Mike Blumenkrantz 6434d2b354 make ibar config pointer EINTERN 2016-01-18 15:38:14 -05:00
Carsten Haitzler 29ebcc890e e randr - fix randr dialog to do restore right again
post e20 commit that allowe dradnr dialog to come up for a specifci
streen broke restore option - now this fixes it.
2016-01-18 15:37:56 -05:00
Mike Blumenkrantz 06aa313e09 optimize zoomap recalc during recursion
in most cases, zoomap recalcs will trigger recursive calls to zoomap
recalc. these inner calls can be optimized to just do the object move,
allowing the outer-most call to perform the remainder of the recalc
operation
2016-01-18 15:37:47 -05:00
Mike Blumenkrantz d143145f8e select mixer popup sink after popup has been fully initialized
attempting to select too early results in callbacks being triggered
before various widgets are available
2016-01-18 15:37:40 -05:00
Mike Blumenkrantz dd03e4ea5a disable custom logging when eina backtrace is active
ref 2df0404226
2016-01-18 15:36:57 -05:00
Mike Blumenkrantz d1fdf0077c check all corners of an object in e_comp_object_util_zone_get()
if the top left corner is offscreen, checking other corners is still
valid for returning a useful zone
2016-01-18 15:36:43 -05:00
Mike Blumenkrantz 99335628a8 simplify and clarify winlist directional selection action code
in the case where no prev/next direction is specified a navigational
direction will always be specified

CID 1347403
2016-01-18 15:34:51 -05:00
Mike Blumenkrantz 11cc32b7a6 remove wayland function usage from grabinput methods
these never did anythng useful and no longer even compile
2016-01-18 15:34:39 -05:00
Seunghun Lee 354ea1ba0f configure.ac: Remove ecore-x from wayland only build.
Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3538
2016-01-18 15:26:09 -05:00
Jean-Philippe Andre fa6db81ef9 Fix spelling in .pc file 2016-01-18 15:25:59 -05:00
Yomi 60eacf06c4 Update copyright year.
Summary: update copyright year.

Test Plan: none.

Reviewers: zmike

Subscribers: cedric

Projects: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D3516
2016-01-18 15:25:27 -05:00
Tom Hacohen 410b76e646 Tiling: tile windows with "Static" gravity.
I can't find anything in the specs that would imply those shouldn't be
tiled. This may cause placement bugs, but I don't think that'd be the
case, as we ignore application placement when tiling anyway.

@fix
2016-01-18 15:25:21 -05:00
Mike Blumenkrantz fa7222ac4c test given coordinates in smart window placement algorithm
the coordinates passed to this function were never used or tested for
being a valid placement location, resulting in any clients which started
with a given position being moved to a pre-existing smart placement test
case, usually the upper-left or lower-right corners of the screen

fix T1106
2016-01-18 15:25:15 -05:00
Mike Blumenkrantz 19b9770291 add special case for frame adjustment during first recalc of new clients
in the case where a new client already has coordinates from creation event,
the frame was never adjusted which resulted in the window being positioned
incorrectly

ref T1106
2016-01-18 15:25:10 -05:00
Mike Blumenkrantz 840e40ac46 un-defer comp util object hiding if second hide occurs during animation
this should match expected behavior of normal comp objects
2016-01-18 15:25:02 -05:00
Mike Blumenkrantz 2ffce2c32b add shelf callback for hidden state and trigger extra hide-on-show if hiding
if shown while a hide animation is running, evas will prevent further show
intercept callbacks from being reached, resulting in a permanently hidden
shelf

this shortcuts the (current) hide animation in order to begin showing the object
2016-01-18 15:24:56 -05:00
Mike Blumenkrantz fbf1019f65 unpopulate all gadcons during shutdown
failing to unpopulate at this time leaves gadcon clients alive until
a time after module shutdown has occurred, resulting in crashes when
gadcon clients destroy themselves and attempt to access module-global
data

ref T2811
2016-01-18 15:24:49 -05:00
Mike Blumenkrantz 5160ca5ddc block input devices from backlight list
I guess this is a thing in newer kernel versions?

ref T1497
2016-01-18 15:24:44 -05:00
Chris Michael 7c79202771 Fix xbl_avail variable being used when it could be undefined
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-18 15:24:39 -05:00
Mike Blumenkrantz 5e7f500ad9 20.2 NEWS updates 2015-12-28 13:48:34 -05:00
Mike Blumenkrantz 1f7f22db68 20.2 release 2015-12-28 13:48:34 -05:00
Simon Lees 2757ddb4df Set QT_QPA_PLATFORM theme to gtk2
Summary:
@fix the display / customisation of KDE5 apps.
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.

Reviewers: raster, zmike

Subscribers: jeffhoogland, cedric

Differential Revision: https://phab.enlightenment.org/D3498
2015-12-28 13:48:34 -05:00
Chris Michael fbeb88d6a9 Add missing function prototype for e_winlist_direction_select
This function is being used inside e_mod_main, but the function
prototype was never exposed which lead to implicit declaration
warnings when building winlist module

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-28 13:48:34 -05:00
Toan Pham bb6a045587 enhance winlist next window selection
Summary:
The original next window selection of winlist is weak.  It searches the next window with the following conditions:

1.  Next non-overlaped window in the direction of user's selection (up,down,right,left).
2.  The next window has to be the closest window from the currently selected window (calculated from shortest distance from each window's border, in the direction of selection)
3.  the second distant requirement is this:
      delta2_next = abs(ec_orig->x - ec_orig->w / 2 - ec->x + ec->w/2);
    * Which I believe is a mistake, should be:
      delta2_next = abs(ec_orig->x + ec_orig->w / 2 - ec->x + ec->w/2);

These two conditions are weak, and they sometimes can result in unexpected selection to the user.

The enclosed patch enhances the next window selection: 1) A next window selection can be the window that's overlapping with the in-focused window.  2)  calculates the next window from the center of the currently focused window to the next window, and it also takes into account directionality (a window that's farther in the direction of selection has a better chance of being selected then a window that's closer in the direction of selection, but offset-ed in the lateral direction.)

Test Plan:
1.  Create 4 key binds for "next window to left, right, up, down".
2.  Open up 4 different windows and position them in odd/random positions.
3.  Try to navigate to each window (with the winlist shortcut keys) before this patch.
4.  Try with this patch, and evaluate if the window selection is more **PREDICTABLE**.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2661

I fixed the weridness and it behaves much more reliably now with
"tall" or "wide" windows. also fixed some formatting etc. etc. - this
now works better and now if u alt+tab AND then use arrow keys while
holding alt... it'll navigate around geometrically rather nicely.

so big fixes and good for pointing out the simpleness of the original
code. :)

  - raster

@feat
2015-12-28 13:48:34 -05:00
Derek Foreman c5e4a0ac81 wayland: Add support for wl_surface.damage_buffer
Summary:
damage_buffer posts damage in buffer co-ordinates instead of surface
co-ordinates.  For us currently these are always the same co-ordinate
spaces.  This will change when we start supporting viewports and
transforms.

Note: this is currently conditional on the macro
WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION which isn't in any
released wayland, but will be in the next.  We can remove
the ifdefs and change our wayland version dependency when
it's released

 #NefariousHiddenAgenda

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3468
2015-12-28 13:48:34 -05:00
Derek Foreman ecb529197d emix: Rename parameter bool to mute
Summary: Broke my wayland build because something included stdbool.h

Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3467
2015-12-28 13:48:34 -05:00
Mike Blumenkrantz 75fbc4361d ignore withdrawn state for x11 override clients during show
these windows are already visible
2015-12-28 13:48:34 -05:00
Mike Blumenkrantz 5f323aa1f9 show non-new x11 clients immediately when changing Withdrawn -> Normal
ref T2950
2015-12-28 13:48:34 -05:00
Mike Blumenkrantz 3ce74544fd only show x11 clients during MapNotify/Request if they have Normal state 2015-12-28 13:48:34 -05:00
Mike Blumenkrantz c0860135ac simplify e_mouse_update() code for x11 compositors
ref D3433
2015-12-28 13:48:34 -05:00
Marcel Hollerbach 52c1de5e7b mixer: only save state if not in init
If we are calling emix_config_save_state_get while in init, we are
freeing the list emix_config_save_state_restore is iterating over.
This leads to crashes.

@fix T2942
@fix T2906
2015-12-18 13:41:44 +01:00
Marcel Hollerbach c30e0137fc alsa: fix a valgrind warning
Valgrind was warning about the values not initialized
2015-12-18 13:41:34 +01:00
Mike Blumenkrantz 2570a5d1e1 20.1 NEWS updates 2015-12-14 13:35:16 -05:00
Mike Blumenkrantz 631d671ce5 20.1 release 2015-12-14 13:33:38 -05:00
maxerba 729030bff0 Updating italian translation 2015-12-14 13:32:18 -05:00
Mike Blumenkrantz d066020bea use current box geometry for calculating desktop ibar/ibox sizing
desktop gadgets don't have minimum size set from parent objects, so
it's necessary to use the current object geometry in order to correctly
size these gadgets since the top-most widget is from elm

fix T2907
2015-12-11 16:49:22 -05:00
Mike Blumenkrantz 7c98372656 never set withdrawn state on x11 clients
icccm 4.1.4:
Only the client can effect a transition into or out of the Withdrawn state.

fix T2901
2015-12-11 16:49:22 -05:00
Mike Blumenkrantz 4cd32def25 do not reapply x11 icccm state during fetch
this is the value which has just been obtained, so don't create potential
race conditions by sending it back to the client
2015-12-11 16:49:22 -05:00
Lukasz Stanislawski 1a9ff2b841 conf_apps: fix add/remove screen lock applications.
Summary:
Fix missmatched paths between desklock and conf_applications module to
enable adding/removing screen lock applications with a dialog.

Test Plan:
Settings=>Apps=>Screen lock/unlock application
           Veryfy if apps are correctly added to config.

Reviewers: zmike, cedric

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3436
2015-12-11 16:49:22 -05:00
Mike Blumenkrantz bbc81b90bd use canvas RENDER_PRE callback to trigger compositor pre-render callbacks
this should probably be removed entirely...
2015-12-11 16:48:54 -05:00
Mike Blumenkrantz ab0d5de40c set wayland new client focus based on accepts_focus and !override
seems to resolve some cases where focus is not applied to new clients
2015-12-11 16:48:46 -05:00
Mike Blumenkrantz cdd8d86abe make e_comp_wl_surface_attach static and take a surface state
when attaching a buffer, it's necessary to have the state available
in order to pull the buffer data into the state for use during commit

fixes subsurface frame callbacks
2015-12-11 16:48:40 -05:00
Mike Blumenkrantz 7836d58030 do not drop subsurface buffer early after commit from cache
this should work the same way as a normal surface
2015-12-11 16:48:34 -05:00
Mike Blumenkrantz 09d5ca9e25 add wayland shell private data for managing shell-specific data
also cache xdg configure infos and avoid sending duplicate events
2015-12-11 16:48:29 -05:00
Mike Blumenkrantz c4925b3246 do not apply x11 randr iface in wl-x11 if running nested in x11
http://i.imgur.com/S7G0O96.gif
2015-12-11 16:48:21 -05:00
Mike Blumenkrantz ac2249d152 move comp canvas resize callback to monitor elm win geometry
elm win intercepts this callback in order to maintain internal sizing
for use with elm widgets on the compositor canvas, so it's necessary to
get the callback from this object in order to accurately update the canvas
during resizes
2015-12-11 16:48:13 -05:00
Mike Blumenkrantz 0502cc947f init ecore-x during wl-x11 init to ensure DISPLAY is set 2015-12-11 16:48:08 -05:00
Mike Blumenkrantz c520000c33 apply already-committed wayland subsurface positioning after parent surface move 2015-12-11 16:48:02 -05:00
Mike Blumenkrantz 8239622d1b enforce wayland subsurface stacking order when parent surface is restacked 2015-12-11 16:47:53 -05:00
Marcel Hollerbach ceea32a633 e_randr2: Add NULL check
e crashed for me when starting the screen configure tool.
Adding the NULL check here fixes that.
2015-12-11 16:47:53 -05:00
Carsten Haitzler b36e68bcef e - fix leak added by previous fix for icon theme
fixes leak added by a885c8c040

though this is basically unlikely to happen and happens likely just
once for an app... so not a big deal

@fix
2015-12-11 16:47:53 -05:00
Mike Blumenkrantz edfbc7e8af fix wl-x11 make/install rules to not include nonexistent DATA files 2015-12-11 16:47:53 -05:00
Carsten Haitzler 65af14d095 e - fix using an invalid icon theme - fall back to hicolor if not exists
this should fix D2036 on the e side by checking validity of an icon
theme once efreet has finished scanning for stuff and if its invalid,
going back to hicolor.

@fix
2015-12-11 16:47:08 -05:00
Mike Blumenkrantz 5ee63bb201 disable redirection toggling for the nocomp client
#ThisBreaksTheCompositor!
2015-12-11 16:47:08 -05:00
Mike Blumenkrantz 2bff9611c3 reshuffle all notifications on a notification merge
improves layout when a notification's size changes due to merged text
being larger than original text
2015-12-11 16:47:08 -05:00
Carsten Haitzler 31157dadcc e randr - fix leak of modes list in randr code
this fixes a leak of the modes list in randr

@fix
2015-12-11 16:47:08 -05:00
Carsten Haitzler a77d23055c e randr2 - remove auto-clone and now make randr dialog come up instead
some odd things happen with auto-clone, so give the user manual
intervention automatically with the randr conf dilaog coming up on an
unconfigured screen being detected.

@fix
2015-12-11 16:47:08 -05:00
Carsten Haitzler fb7fce8935 e comp randr support - fix leak of randr info
this fixes case where randr info is not freed

@fix
2015-12-11 16:47:08 -05:00
Carsten Haitzler ca3e4460e5 e randr - fix silent free of data behind randr's back
this fixes a bizarrre issue that valgrind reported that has the
strings we malloc and fill somehow being freed by xlib. totally didn't
make sense. either way, a workaround here is to strdup them
immediately and free the tmp copy and oddly the bug doesn't happen.
this is very odd.

@fix
2015-12-11 16:47:08 -05:00
Carsten Haitzler 47ae1ac843 e exec - fix missing ref and unref for instance event
this fixes a crash on shutdown when freeing up stuff because an exec
instance wasnt ref++'d and ref--'d when adding an event on the event
queue that pointed to it.

@fix
2015-12-11 16:47:07 -05:00
Carsten Haitzler 6037523032 e randr - feature fix that allows config to jump to specific screen
as part of another fix for having e just pop up the screen config
dialog when a new screen is detected that isn't configured, allow
config dialog for randr to get screen output name via input params

@fix
2015-12-11 16:44:29 -05:00
Carsten Haitzler e0e7af80bb e zone - handle null e_comp if comp is already shut down
this came from backlight shutdown that got current zone... and getting
zone relied on e_comp being valid.

@fix
2015-12-11 16:44:29 -05:00
Carsten Haitzler 7f5d75e737 e comp - set e_comp to null on shutdown so others dont access junk
e backlight was accessing e_comp implicitly during shutdown and comp
is shut down before backlight (that is correct as comp relies on
backlight). this fixes that

@fix
2015-12-11 16:44:29 -05:00
Carsten Haitzler ae27fa9b7a e backlight - avoid seg when comp is shut down and backlight updated
if comp is already shut down, then backlight can't do shutdown things
assuming comp is around, thus handle null e_comp. this fixes segv's
waiting to happen as backlight is shut down after comp and thus e_comp
is a garbage pointer of course

@fix
2015-12-11 16:44:29 -05:00
Mike Blumenkrantz 70f053cd76 use client geometry for calculations in x11 ConfigureRequest handler
the values requested by the client will be based on its geometry and not
the geometry of the frame. using the frame geometry here results in windows
moving ↘ based on the top/left frame sizes

fix T2912
2015-12-03 14:13:07 -05:00
176 changed files with 6737 additions and 6442 deletions

View File

@ -17,10 +17,10 @@ Vincent Torri <vincent.torri@gmail.com> Vincent Torri <vtorri@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 <cpmichael1@comcast.net>
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> Chris Michael <cp.michael@samsung.com>
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 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>

513
NEWS
View File

@ -1,3 +1,516 @@
Release 0.20.9:
---------------------
Carsten Haitzler (2):
e start - no it doesny need dbus-launch
e - suspend.hibernat intelligently - dont account for ac power
Chris Michael (2):
stop filling logs with buffer transform/scale spam
change 'if' clause to make gcc-6 happy
Dave Andreoli (1):
enlightenment_open: correctly return the exist status code of the executed command
Hannes Janetzek (1):
just a small patch to make sure evry_hide does not get called synchronously from an Evry_Action
Massimo Maiurana (1):
Updating italian translation
Mike Blumenkrantz (13):
remove pulse sinks/sources from list before running cbs which access the list
fix e_place_zone_region_smart_cleanup()
add client util function for detecting popups, block popups in ibar/tasks
update README.wayland to include xwayland crash bug
update client remember on opacity change
use current zone for shelf config dialog
set x11 maximized window hint correctly on resize end
delete x11 mouse-in job when hiding the job's client
use current zone when activating a client's menu with the mouse
handle shaded state when receiving x11 configure requests
only block mouse-out callback for wl action clients if the mouse is grabbed
unset comp_grabbed flag before action client compositor ungrab
force mouse-in again during comp ungrab if client previously had mouse-in
Release 0.20.8:
---------------------
Chris Michael (1):
disable option for mouse to use Application theme if we are running in Wayland
Mike Blumenkrantz (41):
Revert "handle recursion more effectively in e_menu_hide_all()"
feed mouse up events to internal wins before mouse out during action exec
ensure that the startup apps cache handler has run before trying to start apps
directly load extra wl modules during compositor init
further optimize window smart placement by reducing obstacle calcs
don't refocus deleted clients during wl compositor grab
ensure lifetime for wl client focus timer
hide evry on focus-out
don't revert focus to desktop fileman during compositor grab
evry null deref
bad copy/paste in _e_place_desk_region_smart_obstacle_add()
add configure flag for xwayland binary
clean up mixer includes
unset DISPLAY during mixer's pulse backend startup
ensure xwayland module init does not fail due to early startup
flag wl surfaces as internal during create() based on pid matching
make init fail if a dbus session connection cannot be created
update README.wayland to include dbus-launch
do not add ignored clients to ibar menu
ensure child windows are placed on screen
disable focus effects for windows with csd
block keyboard sending for wl clients if a compositor grab is active
only load wayland-specific modules on startup if they have been built
handle positioning of x11 overrides with csd accurately
change efm icon entry to only toggle focus in x11 compositors (runtime)
toggle compositor canvas focus during init
fix usage of e_object_unref in xkbswitch when managing new kbd dialog
also check pixmap argb state when setting comp object alpha
enforce setting alpha on comp objects only after image data has been set
ensure int64_t is used in all cases for wl pixmap ids
remove some cruft from _e_comp_wl_client_cb_new()
set E_Client->override flag for internal wins as needed
use window id for internal window pixmaps again on wayland
avoid infinitely looping when applying x11 window grouping
only check pixmap argb state for non-X11 clients
use parent windows for x11 binding grabs
adjust some client eval parts to make manual placement work again
force cursor placement to obey useful zone geometry
ensure that client eval correctly handles retries on visibility-pending clients
prevent double emission of E_EVENT_CLIENT_SHOW
more tweaks for manual window placement in client eval
Release 0.20.7:
---------------------
Carsten Haitzler (4):
e mod: cpufreq - handle the case where cpu has zero freqs - dont crash
e intl - fix string buffer length size
e intel - fix number 2
e syscon - dont show syscon if desklock is up - you can't respond
Chris Michael (1):
destroy seat resource when we get a release request
Derek Foreman (10):
Fix wayland hide for internal windows
Fix internal window borders on 32-bit computers
Free pixel data after taking a wayland screen shot
wayland: Don't leak a clipboard source if adding fd handler fails
wayland: Stop E from consuming all CPU as soon as a selection is made
xwayland: Don't leak memory on dnd read failure
wayland: Fix xdg-popup crash
Clean up some header inclusion
Remove unwanted debug detritus from last commit
wayland: Fix crash when attempting to create surfaces for deleted clients
Massimo Maiurana (1):
Updating italian translation
Mike Blumenkrantz (121):
unify client e_hints window size setting in move/resize callbacks
remove show callback from evry win on deletion
don't add render update during ignored damage on deleted clients
check returned pixmap size before attempting to create updates tiler
run focus-out and mouse-out wayland client callbacks for deleted clients
reject attempts to focus deleted comp objects
make wayland client keyboard focus list pruning more robust
remove library checks for a number of modules along with useless defines
remove eldbus init/shutdown calls from the codebase
redo wizard's gl testing mechanism
grab comp input on wizard start
don't add render updates for deleted clients on failed resize
break out xwl init/shutdown into static functions for reuse internally
remove maximize_pre flag from wl client comp_data
always send wl key releases if surface still exists
calling dirty() on a comp object for a deleted client should not print an error
remove direct references to ec->comp_data in x11 compositor
add workaround for xwayland client bug
unify client post_updates management code into single function
do not attempt to resize clients to 0x0 during res restore
unset solid drawing of opaque regions during comp object animations
adjust wayland client coords by window_geometry during first surface commit
do not reset the wizard got_desktops flag when setting the default system lang
fix stringshare usage in wizard language page (010)
reduce wizard connman timeout timer to 0.5s
always update saved coords for maximized/fullscreen clients on csd geom update
do not update client coords on csd geom update if it would change the zone
ignore deleted clients when reapplying zone geometry policy in canvas update
hide wl clients before deleting them when surface is destroyed
remove wl selection hacks from f0ba92d39e1f6631974d53100dcbb4cc040a8241
use zone geometry when clamping evry gadget popup to gadget's screen
store (internal) elm win geometry when set prior to showing the win
ignore xwayland clients in wl client delete request callback
cast eina_list_count() in flowlayout, not entire expression
unset opaque region during comp object render if none exists
avoid null deref in during pager_plain dnd
use eina_streq for e_util_binding_match() comparisons
use snprintf for string handling in batget
rework systray theme applying code
use snprintf for string handling in batget
remove lots of impossible null checks from pager move callback
send resize edges to wl clients on resize start and end
feed mouse-up events for all buttons on internal wins when activating a binding
do not set initial changed state for new clients if they are ignored
redo wayland client unignore mechanism
do not add deleted clients to tasks gadgets
remove deleted clients from tasks client list during repop
use canvas pointer coords in systray mouse cb
ignore x11 ConfigureRequest events when maximize_override is set
add even more systray/dbusmenu hacks
feed mouse out to internal clients upon activating a mouse binding
selectively reject comp object signal emissions based on action_client state
move notification text escaping into dbus notify method callback
track offline/presentation mode notification ids and replace on toggle
reshuffle notifications on replace
remove old compositor reset code
don't show some x11-specific compositor settings under wayland
force keyboard modifier update on wl client focus-in
block wl keyboard modifier updating during input grabs
explicitly manage client focus when setting/unsetting input grabs
optimize case where an x11 client is focused/unfocused in same loop iteration
remove wl xdg popup new_client stuff from get_popup method
allow some client zone/desk move actions to occur on action client
only attempt to rescue offscreen clients if they are completely offscreen
apply compositor keybinds if an action client that is not focus exists
do not reset previously-set ec->placed state when attempting early client moves
set destructor for xdg popups when setting implementation
enforce wl xdg popup stacking relative to parent stacking
don't set wl xdg popups to POPUP layer, set popups as placed on creation
remove clamping for wl xdg popup configures
reapply client focus after input grab, only handle focus for wayland compositors
do not incrementally remaximize clients during shelf hide animation
restrict shelf border_fix to only affect clients affected by the shelf
delete internal wayland elm windows in wl client delete request callback
add back CTRL to keybindings editor display
remove video child references from wl compositor
wl popup surfaces should not receive focus on show if parent is not focused
print xwayland exe path in debug logs
don't print xwayland path twice...
disable xwayland module if exe cannot be found during configure
reject client maximize attempts using identical maximize params
set WAYLAND_DEBUG=0 during wl compositor init
do not send shell configures for deleted wl clients
do not unconditionally update position+size when changing wl client csd geometry
don't send duplicate configure to wayland clients during unfullscreen
directly include e.h in efm device backends
make e_client_has_xwindow() more wayland-only friendly
change client un/maximize_pre callback location to occur after safety checks
ignore maximized+fullscreen windows when placing new clients
unify a large portion of repeated code in e_place
redo e_place_desk_region_smart() to handle multiple screens
allow mixer volume increase actions to exceed 100%
reject xwayland clients in wl client resize handlers
make startup/restart app exec timing protocol-specific
trivial wl shell module cleanups
redo wl (xdg)shell surface ping
add copyright headers (MIT) from weston to e_comp_wl_data
more accurately reject wl selection setting based on whether serial is invalid
do not perform input ungrab twice during dnd end in wayland
ensure that wl clients do not run extra render on hide twice
unify client filtering checks from e_place_desk_region_smart()
do not attempt to show x11 override windows
don't force full damage on x11 override clients
don't defer resizes+queue render updates for shapeless or pending shaped clients
ensure damages do not get added for shapeless x11 clients
remove unnecessary conditional in e_comp_object_render()
slightly simplify image data setting in e_comp_object_render()
set NULL image pixel data during x11 render when no damages exist
ensure resize is still deferred for changes.shape clients during failed resize
do not show unsized comp objects during theme apply
set NULL image data in _e_comp_object_pixels_get() on failure
only set "dialog" border for transient clients if window type is unset
remove some X references in settings dialogs
treat POPUP_MENU window type as an override window for comp theme matching
always end drag operations on failure
remove explicit edje_init/shutdown calls
ensure evry gadget popups effectively clamp to their zones
protect xdg-shell functions from accessing deleted client data
move wayland surface E_Client del check to a place where it's more useful
handle recursion more effectively in e_menu_hide_all()
distribute all weekeyboard edj files
Shuhrat Dehkanov (1):
xkbswitch: establish parent/child relationship
Release 0.20.6:
---------------------
Carsten Haitzler (2):
e - efm: fix op registry listener add and dont use eina_error
e xkbswitch: don't free layouts that are just pointed to in instances
Chris Michael (6):
update mailmap addresses
update mailmap addresses
add prototype functions for missing wl_data_offer interface
add prototype function for missing wl_seat interface
add prototype functions for missing wl_data_source interface
don't have to hook the ecore_evas resize callback here as that should be handled by elm now
Derek Foreman (20):
Ensure wayland clients haven't been deleted when processing callbacks
Remove wayland frame callbacks from subsurface cache on destruction
Fix xdg-shell destructors
Protect the wayland frame callback list from corruption
Use eina_list_merge instead of eina_list_move for wayland lists
Move pixmap free to client free from client destroy
Bump wayland version requirement
Remove wayland focus timer in delete callback
Add a NULL check in native_surface_init under wayland
Render deleted objects as long as they still have a pixmap
Track whether objects are on the post_updates list or not
Take an extra reference on wayland clients
Don't allow deleted wayland clients to set the cursor
Track whether a render is in progress or not
Rework wayland buffer handling
Remove wayland buffer reference
Re-enable window close animations for wayland
Stop copying all wayland buffers
Don't use e_pixmap_image_data_argb_convert for wayland images
Remove argb_convert for wayland buffers
Mike Blumenkrantz (42):
clamp minimum shelf size to 20px in shelf config
do not perform special case position adjustment for re_manage clients
do not clamp comp object input regions to 0,0
improve enforcement of shelf autohide-related window adjustment
reshuffle x11 comp init to cleanup on failure cases
pre-remove pixmap from x11 clients during del hook
enable comp object image data refresh if a dirty call is made with no damages
redo wayland pixmap ids to use monotonic decreasing ints with no collisions
remove some unused variables
make bgpreview create vdesk config dialog on mouse up instead of mouse down
do not decrement e_comp->new_clients for non-new clients during _e_client_eval
update winlist ui when using directional window selection
force changed when adding or removing keyboard layouts in config
disable emotion_shutdown during shutdown procedure
use strbufs instead of strcat in fwin navbars
do not set XCURSOR_PATH variable if re-setting existing value
remove security hole in e_start_main
remove DISPLAY usage from E_IPC_SOCKET value
remove multihead env var setting in e_exec
strcpy -> strncpy in evry files plugin
use strbuf instead of strcat in keybinding string synthesis
use strbuf instead of strcat in edgebinding string synthesis
use dblequal for double comparisons in edgebindings config
replace static buffer usage with binbuf in e_fm_ipc
prevent potential null deref during pager (plain) window drag
remove unused value in config profile saving
remove useless client_add handler in e_ipc
use uint instead of int for eina_list_count() return in cpufreq (trivial)
simplify static grab case statements
remove ipc command allowing arbitrary command execution by the compositor
simplify ipc socket creation
remove impossible null check in color dialog
do not add render updates during damage of deleted clients
don't directly use image data when creating a comp object mirror
Revert "send mouse out+in on desk flip end"
reject x11 client mouse-in events on comp object based on frame geometry
reverse ordering for x11 client mouse in NotifyVirtual and NotifyInferior details
only use x11 mouse out event if client has received mouse in previously
apply x11 mouse in event for clients using a job
apply x11 focus/unfocus using jobs
block re-unsetting of native surface for comp objects
always run client res changes in e_comp_canvas_update()
Release 0.20.5:
---------------------
Mike Blumenkrantz (1):
add back x11 window focusing
Release 0.20.4:
---------------------
Chris Michael (5):
Fix type of size fields for E_Shell_Data
Fix issue of nested compositors not working with Ecore_Wl2 library
Update wl_weekeyboard for ecore_evas_wayland_window_get2 function rename
Fix issue of using the wrong id when finding pixmap client
check siginfo si_code to verify that SIGUSR2 comes from user
Christopher Michael (14):
Make configure check for Ecore_Wl2 library
include header for Ecore_Wl2
remove unused event loop and add external Ecore_Wl2_Display variable
port wayland compositor to use Ecore_Wl2
port e_scale to use Ecore_Wl2
Port shot module to use ecore_wl2 library
Fix formatting of wl_weekeyboard module
Don't leak eina_iterator in shot module
Port wl_weekeyboard to use Ecore_Wl2 library
Port wl_fb module to use Ecore_Wl2 Library
Fix formatting
Fix formatting
Try to init (and error check the init) of ecore_wl2 library before we create a compositor
Fix using global ewd variable by making it part of e_comp_wl
Marcel Hollerbach (1):
e_comp_wl: only ignore ignored clients
Mike Blumenkrantz (37):
call ecore_wl2_shutdown() in wl compositor delete callback
create wl client connection during compositor init, use in shot module
define EFL_BETA_API_SUPPORT explicitly in e.h if wayland support is enabled
remove defines for various beta api in other places
remove need_reparent, reparented, first_damage flags from wl client comp_data
call xdg surface map when creating a surface for visible internal windows
set want_focus for xdg popup surfaces on creation
only do passthrough surface map on xwayland surfaces during commit
more correctly handle evry mouse detection on wayland
improve focus setting during wayland client show callback
|= instead of = flag setting for want_focus during wayland surface commit
automatically mark wayland cursor surfaces as visible during set_cursor
do not set focus in wayland client show callback for cursor clients
always apply damages and input regions during wayland commit
remove duplicate visibility setting blocks from wayland surface commit
add render updates for cursor clients if damages exist during set_cursor
reenable fallthrough surface (un)mapping for subsurfaces during commit
remove _e_comp_wl_focus_down_set()
track wayland client mouse button states as a full button mask
enable surface visibility fallthrough for drag clients
unify client mouse action ending
allow instant client mouse actions to persist until mouse up
determine new_client state for xwayland clients using xwayland pixmap
handle more mouse buttons in wayland
allocate E_Shell_Data for all xdg surfaces (popups)
add function for disabling mouse/key/wheel/signal bindings
disable binding activation when grab dialog, menus, or dnd is active
remove comp canvas key handler shortcuts for passing keys to wayland clients
defer screenshot action execution using a job
disable bindings during wayland screenshot operations
do not attempt to create x11 canvas during xwayland init
do not shortcut access of Efreet_Desktop->x hash in fileman
disable shelf shadows if "noshadow" data item exists in shelf theme
do not update keymap group in _e_comp_wl_input_keymap_update()
update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input
send mouse out+in on desk flip end
disable map when unsetting zoomap child
Release 0.20.3:
---------------------
Carsten Haitzler (1):
e randr - fix randr dialog to do restore right again
Chris Michael (1):
Fix xbl_avail variable being used when it could be undefined
Jean-Philippe ANDRÉ (1):
Fix spelling in .pc file
Marcel Hollerbach (1):
e_grabinput: do not pass a faulty time
Mike Blumenkrantz (26):
block input devices from backlight list
unpopulate all gadcons during shutdown
add shelf callback for hidden state and trigger extra hide-on-show if hiding
un-defer comp util object hiding if second hide occurs during animation
add special case for frame adjustment during first recalc of new clients
test given coordinates in smart window placement algorithm
remove wayland function usage from grabinput methods
simplify and clarify winlist directional selection action code
check all corners of an object in e_comp_object_util_zone_get()
disable custom logging when eina backtrace is active
select mixer popup sink after popup has been fully initialized
optimize zoomap recalc during recursion
make ibar config pointer EINTERN
do full cleanup when overriding existing comp autoclose object
remove configs for illume modules
allow NULL object in e_comp_object_util_autoclose()
improve menu hiding and autoclose
make E_DESK_TYPE an int define
enforce border_fix_on_shelf_toggle config option in shelf
create comp object updates tiler in helper function from either show or damage
do not unset comp object native surface during shape apply
unset WM_STATE for x11 clients upon unmapping them
if available, use wl output (nested) for wayland compositor creation
use more correct defines for enabling wl output modules during comp init
automatically attempt to create a wayland x11 output during comp init
20.3 release
Seunghun Lee (1):
configure.ac: Remove ecore-x from wayland only build.
Tom Hacohen (1):
Tiling: tile windows with "Static" gravity.
Yomi (1):
Update copyright year.
Release 0.20.2:
---------------------
Chris Michael (1):
Add missing function prototype for e_winlist_direction_select
Derek Foreman (2):
emix: Rename parameter bool to mute
wayland: Add support for wl_surface.damage_buffer
Marcel Hollerbach (2):
alsa: fix a valgrind warning
mixer: only save state if not in init
Mike Blumenkrantz (4):
simplify e_mouse_update() code for x11 compositors
only show x11 clients during MapNotify/Request if they have Normal state
show non-new x11 clients immediately when changing Withdrawn -> Normal
ignore withdrawn state for x11 override clients during show
Simon Lees (1):
Set QT_QPA_PLATFORM theme to gtk2
Toan Pham (1):
enhance winlist next window selection
Release 0.20.1:
---------------------
Carsten Haitzler (11):
e backlight - avoid seg when comp is shut down and backlight updated
e comp - set e_comp to null on shutdown so others dont access junk
e zone - handle null e_comp if comp is already shut down
e randr - feature fix that allows config to jump to specific screen
e exec - fix missing ref and unref for instance event
e randr - fix silent free of data behind randr's back
e comp randr support - fix leak of randr info
e randr2 - remove auto-clone and now make randr dialog come up instead
e randr - fix leak of modes list in randr code
e - fix using an invalid icon theme - fall back to hicolor if not exists
e - fix leak added by previous fix for icon theme
Lukasz Stanislawski (1):
conf_apps: fix add/remove screen lock applications.
Marcel Hollerbach (1):
e_randr2: Add NULL check
Massimo Maiurana (1):
Updating italian translation
Mike Blumenkrantz (17):
use client geometry for calculations in x11 ConfigureRequest handler
reshuffle all notifications on a notification merge
disable redirection toggling for the nocomp client
fix wl-x11 make/install rules to not include nonexistent DATA files
enforce wayland subsurface stacking order when parent surface is restacked
apply already-committed wayland subsurface positioning after parent surface move
init ecore-x during wl-x11 init to ensure DISPLAY is set
move comp canvas resize callback to monitor elm win geometry
do not apply x11 randr iface in wl-x11 if running nested in x11
add wayland shell private data for managing shell-specific data
do not drop subsurface buffer early after commit from cache
make e_comp_wl_surface_attach static and take a surface state
set wayland new client focus based on accepts_focus and !override
use canvas RENDER_PRE callback to trigger compositor pre-render callbacks
do not reapply x11 icccm state during fetch
never set withdrawn state on x11 clients
use current box geometry for calculating desktop ibar/ibox sizing
Release 0.20.0:
---------------------
Highlights:

View File

@ -70,12 +70,12 @@ Enlightenment, when compiled with Wayland support and started from a tty,
will automatically attempt to load the wl_drm output module and start
a Wayland session. Simply start as usual:
./enlightenment_start
enlightenment_start
If you have a separate configuration profile that you would like to use,
you can tell Enlightenment to use that when you start it:
./enlightenment_start -profile <my_profile>
dbus-launch enlightenment_start -profile <my_profile>
To run a wayland session inside x11, export E_WL_FORCE=x11 before starting
enlightenment.
@ -96,3 +96,5 @@ Known Issues
- Requires upstream XWayland improvements
* Keyboard layout switching is not available
- Requires various improvements
* XWayland crashes on start
- Requires XWayland release - https://bugs.freedesktop.org/show_bug.cgi?id=95337

View File

@ -4,11 +4,6 @@ config/mobile/enlightenment-mobile.png \
config/mobile/e.src \
config/mobile/e_bindings.src \
config/mobile/module.battery.src \
config/mobile/module.illume-home.src \
config/mobile/module.illume-keyboard.src \
config/mobile/module.illume-indicator.src \
config/mobile/module.illume-softkey.src \
config/mobile/module.illume2.src \
config/mobile/module.conf.src
configmobilefilesdir = $(datadir)/enlightenment/data/config/mobile
@ -18,9 +13,4 @@ config/mobile/enlightenment-mobile.png \
config/mobile/e.cfg \
config/mobile/e_bindings.cfg \
config/mobile/module.battery.cfg \
config/mobile/module.illume-home.cfg \
config/mobile/module.illume-keyboard.cfg \
config/mobile/module.illume-indicator.cfg \
config/mobile/module.illume-softkey.cfg \
config/mobile/module.illume2.cfg \
config/mobile/module.conf.cfg

View File

@ -266,54 +266,6 @@ group "E_Config" struct {
}
}
group "modules" list {
group "E_Config_Module" struct {
value "name" string: "illume2";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: -100;
}
group "E_Config_Module" struct {
value "name" string: "illume-indicator";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: 90;
}
group "E_Config_Module" struct {
value "name" string: "illume-softkey";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: 85;
}
group "E_Config_Module" struct {
value "name" string: "illume-keyboard";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "illume-home";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "illume-home-toggle";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "illume-kbd-toggle";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "illume-mode-toggle";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "battery";
value "enabled" uchar: 1;
@ -430,57 +382,6 @@ group "E_Config" struct {
value "autoscroll" uchar: 0;
value "resizable" uchar: 0;
}
group "E_Config_Gadcon_Client" struct {
value "name" string: "illume-home-toggle";
value "id" string: "illume-home-toggle.0";
value "geom.pos" int: 82;
value "geom.size" int: 41;
value "geom.res" int: 474;
value "geom.pos_x" double: 0.0000000000000000000000000;
value "geom.pos_y" double: 0.0000000000000000000000000;
value "geom.size_w" double: 0.0000000000000000000000000;
value "geom.size_h" double: 0.0000000000000000000000000;
value "state_info.seq" int: 3;
value "state_info.flags" int: 3;
value "style" string: "plain";
value "orient" int: 0;
value "autoscroll" uchar: 0;
value "resizable" uchar: 0;
}
group "E_Config_Gadcon_Client" struct {
value "name" string: "illume-mode-toggle";
value "id" string: "illume-mode-toggle.0";
value "geom.pos" int: 123;
value "geom.size" int: 41;
value "geom.res" int: 474;
value "geom.pos_x" double: 0.0000000000000000000000000;
value "geom.pos_y" double: 0.0000000000000000000000000;
value "geom.size_w" double: 0.0000000000000000000000000;
value "geom.size_h" double: 0.0000000000000000000000000;
value "state_info.seq" int: 4;
value "state_info.flags" int: 3;
value "style" string: "plain";
value "orient" int: 0;
value "autoscroll" uchar: 0;
value "resizable" uchar: 0;
}
group "E_Config_Gadcon_Client" struct {
value "name" string: "illume-kbd-toggle";
value "id" string: "illume-kbd-toggle.0";
value "geom.pos" int: 164;
value "geom.size" int: 41;
value "geom.res" int: 474;
value "geom.pos_x" double: 0.0000000000000000000000000;
value "geom.pos_y" double: 0.0000000000000000000000000;
value "geom.size_w" double: 0.0000000000000000000000000;
value "geom.size_h" double: 0.0000000000000000000000000;
value "state_info.seq" int: 5;
value "state_info.flags" int: 3;
value "style" string: "plain";
value "orient" int: 0;
value "autoscroll" uchar: 0;
value "resizable" uchar: 0;
}
group "E_Config_Gadcon_Client" struct {
value "name" string: "configuration";
value "id" string: "configuration";

View File

@ -1,6 +0,0 @@
group "Illume-Home_Cfg" struct {
value "version" int: 0;
value "icon_size" int: 120;
value "single_click" int: 1;
value "single_click_delay" int: 250;
}

View File

@ -1,4 +0,0 @@
group "Illume-Indicator_Cfg" struct {
value "version" int: 0;
value "height" int: 32;
}

View File

@ -1,5 +0,0 @@
group "Illume_Kbd_Cfg" struct {
value "version" int: 0;
value "use_internal" int: 1;
value "dict" string: "English_(US).dic";
}

View File

@ -1,4 +0,0 @@
group "Illume-Softkey_Cfg" struct {
value "version" int: 0;
value "height" int: 32;
}

View File

@ -1,50 +0,0 @@
group "Illume_Config" struct {
group "policy.zones" list {
group "Illume_Config_Zone" struct {
value "id" int: 0;
value "mode.dual" int: 0;
value "mode.side" int: 1;
}
group "Illume_Config_Zone" struct {
value "id" int: 1;
value "mode.dual" int: 0;
value "mode.side" int: 1;
}
}
value "version" int: 1;
value "animation.vkbd.duration" int: 1000;
value "animation.quickpanel.duration" int: 1000;
value "policy.name" string: "illume";
value "policy.vkbd.class" string: "Virtual-Keyboard";
value "policy.vkbd.name" string: "Virtual-Keyboard";
value "policy.vkbd.title" string: "Virtual Keyboard";
value "policy.vkbd.type" int: 7;
value "policy.vkbd.match.class" int: 0;
value "policy.vkbd.match.name" int: 1;
value "policy.vkbd.match.title" int: 1;
value "policy.vkbd.match.type" int: 0;
value "policy.indicator.class" string: "Illume-Indicator";
value "policy.indicator.name" string: "Illume-Indicator";
value "policy.indicator.title" string: "Illume Indicator";
value "policy.indicator.type" int: 1;
value "policy.indicator.match.class" int: 0;
value "policy.indicator.match.name" int: 1;
value "policy.indicator.match.title" int: 1;
value "policy.indicator.match.type" int: 0;
value "policy.softkey.class" string: "Illume-Softkey";
value "policy.softkey.name" string: "Illume-Softkey";
value "policy.softkey.title" string: "Illume Softkey";
value "policy.softkey.type" int: 1;
value "policy.softkey.match.class" int: 0;
value "policy.softkey.match.name" int: 1;
value "policy.softkey.match.title" int: 1;
value "policy.softkey.match.type" int: 0;
value "policy.home.class" string: "Illume-Home";
value "policy.home.name" string: "Illume-Home";
value "policy.home.title" string: "Illume Home";
value "policy.home.type" int: 7;
value "policy.home.match.class" int: 0;
value "policy.home.match.name" int: 1;
value "policy.home.match.title" int: 1;
value "policy.home.match.type" int: 0;
}

View File

@ -2,11 +2,11 @@
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [0])
m4_define([v_min], [20])
m4_define([v_mic], [0])
m4_define([v_mic], [9])
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.20.0])
m4_define([relname], [0.20.9])
##-- When doing snapshots - change soname. remove dnl on below line
m4_define([relname], [ver-autocannoli-0.20])
dnl m4_define([v_rel], [-release relname])
@ -587,19 +587,13 @@ EFL_WITH_BIN([eldbus], [eldbus_codegen], [eldbus-codegen])
AC_DEFINE(E_INTERNAL, 1, "This define can be used to wrap internal E stuff, as config.h isn't exported")
AM_CONDITIONAL(HAVE_BATTERY, false)
define([CHECK_MODULE_BATTERY],
[
AC_E_CHECK_PKG(BATTERY, [ ecore >= $efl_version ecore-file >= $efl_version ecore-con >= $efl_version eina >= $efl_version ], [], [BATTERY=false])
])
have_openbsd="no"
have_freebsd="no"
BATTERY_LDFLAGS=
case "$host_os" in
darwin*)
BATTERY_LDFLAGS="${cf_libs}"
BATTERY_CFLAGS="${BATTERY_CFLAGS} ${cf_cflags}"
BATTERY_CFLAGS="${cf_cflags}"
;;
openbsd*)
have_openbsd="yes"
@ -609,22 +603,11 @@ case "$host_os" in
;;
esac
AC_SUBST([BATTERY_CFLAGS])
AC_SUBST([BATTERY_LDFLAGS])
AM_CONDITIONAL([HAVE_OPENBSD], [test "x${have_openbsd}" = "xyes"])
AM_CONDITIONAL([HAVE_FREEBSD], [test "x${have_freebsd}" = "xyes"])
AM_CONDITIONAL(HAVE_TEMPERATURE, false)
define([CHECK_MODULE_TEMPERATURE],
[
AC_E_CHECK_PKG(TEMPERATURE, [ ecore >= $efl_version ecore-file >= $efl_version eina >= $efl_version ], [], [TEMPERATURE=false])
])
AM_CONDITIONAL(HAVE_MUSIC_CONTROL, false)
define([CHECK_MODULE_MUSIC_CONTROL],
[
AC_E_CHECK_PKG(MUSIC_CONTROL, [ ecore >= $efl_version eina >= $efl_version eldbus ], [], [MUSIC_CONTROL=false])
])
##have_exchange=no
##AC_ARG_ENABLE(exchange,
## AS_HELP_STRING([--disable-exchange], [disable Exchange support @<:@default=detect@:>@]),
@ -643,38 +626,6 @@ AM_CONDITIONAL(HAVE_EXCHANGE, false)
##])
have_enotify=no
AM_CONDITIONAL([HAVE_ENOTIFY], [false])
AC_ARG_ENABLE([enotify],
AS_HELP_STRING([--disable-enotify], [disable Enotify support @<:@default=detect@:>@]),
[e_cv_want_enotify=$enableval],
AC_CACHE_VAL([e_cv_want_enotify], [e_cv_want_enotify=yes])
)
if test "x$e_cv_want_enotify" != "xno" ; then
AC_E_CHECK_PKG(ENOTIFY, [ eldbus >= $efl_version ],
[
AC_DEFINE_UNQUOTED([HAVE_ENOTIFY], [1], [enable enotify])
],
[
AC_MSG_NOTICE([enotify disabled])
e_cv_want_enotify=no
])
else
AC_MSG_NOTICE([enotify disabled])
e_cv_want_enotify=no
fi
AC_SUBST([ENOTIFY_CFLAGS])
AC_SUBST([ENOTIFY_LIBS])
AM_CONDITIONAL(HAVE_NOTIFICATION, false)
define([CHECK_MODULE_NOTIFICATION],
[
if test "x$e_cv_want_enotify" = "xno" ; then
NOTIFICATION=false
fi
])
AM_CONDITIONAL(HAVE_ALSA, false)
AM_CONDITIONAL(HAVE_PULSE, false)
define([CHECK_MODULE_MIXER],
@ -714,25 +665,6 @@ AC_SUBST(SHM_OPEN_LIBS)
AC_SUBST([SOUND_CFLAGS])
AC_SUBST([SOUND_LIBS])
AM_CONDITIONAL(HAVE_ECONNMAN, false)
AM_CONDITIONAL(HAVE_DUMMY, false)
define([CHECK_MODULE_CONNMAN],
[
AC_E_CHECK_PKG(ECONNMAN, [ eldbus >= $efl_version ], [], [CONNMAN=false])
dnl AC_E_CHECK_PKG(DUMMY, [ connman >= 1.0 ], [], [CONNMAN=false])
])
AC_SUBST([ECONNMAN_CFLAGS])
AC_SUBST([ECONNMAN_LIBS])
AM_CONDITIONAL(HAVE_BLUEZ4, false)
AM_CONDITIONAL(HAVE_DUMMY, false)
define([CHECK_MODULE_BLUEZ4],
[
AC_E_CHECK_PKG(BLUEZ4, [ eldbus ],)
])
AC_SUBST([EBLUEZ4_CFLAGS])
AC_SUBST([EBLUEZ4_LIBS])
have_wayland_egl=no
AC_ARG_ENABLE([wayland-egl],
AS_HELP_STRING([--enable-wayland-egl],[enable wayland to render using EGL @<:@default=disabled@:>@]),
@ -742,9 +674,10 @@ AC_MSG_CHECKING([whether wayland EGL support is enabled])
AC_MSG_RESULT([${e_cv_want_wayland_egl}])
if test "x${e_cv_want_wayland_only}" != "xno" ;then
PKG_CHECK_MODULES([WAYLAND], [ecore-wayland >= 1.16 wayland-server >= 1.8.0 wayland-client >= 1.8.0 xkbcommon uuid],
PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 wayland-server >= 1.10.0 wayland-client >= 1.10.0 xkbcommon uuid],
[
have_wayland=yes
have_wayland_dep=true
AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
])
else
@ -782,7 +715,7 @@ WL_X11=false
define([CHECK_MODULE_WL_X11],
[
if test "x${have_wayland}" = "xyes"; then
AC_E_CHECK_PKG(WL_X11, [ ecore >= ${efl_version} ecore-x >= ${efl_version} ecore-evas >= ${efl_version} ], [WL_X11=true], [WL_X11=false])
AC_E_CHECK_PKG(WL_X11, [ ecore-x >= ${efl_version} ], [WL_X11=true], [WL_X11=false])
else
WL_X11=false
fi
@ -804,7 +737,7 @@ WL_DESKTOP_SHELL=false
define([CHECK_MODULE_WL_DESKTOP_SHELL],
[
if test "x${have_wayland}" = "xyes"; then
AC_E_CHECK_PKG(WL_DESKTOP_SHELL, [ ecore >= $efl_version eina >= $efl_version ], [WL_DESKTOP_SHELL=true], [WL_DESKTOP_SHELL=false])
WL_DESKTOP_SHELL=true
else
WL_DESKTOP_SHELL=false
fi
@ -815,7 +748,7 @@ WL_FB=false
define([CHECK_MODULE_WL_FB],
[
if test "x${have_wayland}" = "xyes"; then
AC_E_CHECK_PKG(WL_FB, [ ecore-fb >= $efl_version ecore >= $efl_version eina >= $efl_version ], [WL_FB=true], [WL_FB=false])
AC_E_CHECK_PKG(WL_FB, [ ecore-fb >= $efl_version ], [WL_FB=true], [WL_FB=false])
else
WL_FB=false
fi
@ -826,7 +759,7 @@ WL_DRM=false
define([CHECK_MODULE_WL_DRM],
[
if test "x${have_wayland}" = "xyes" ; then
AC_E_CHECK_PKG(WL_DRM, [ ecore-drm >= $efl_version ecore >= $efl_version eina >= $efl_version ], [WL_DRM=true], [WL_DRM=false])
AC_E_CHECK_PKG(WL_DRM, [ ecore-drm >= $efl_version ], [WL_DRM=true], [WL_DRM=false])
else
WL_DRM=false
fi
@ -837,8 +770,11 @@ HAVE_XWAYLAND_DEPS=false
define([CHECK_MODULE_XWAYLAND],
[
if test "x${have_wayland}" = "xyes"; then
AC_E_CHECK_PKG(XWAYLAND, [ ecore >= ${efl_version} ecore-x >= ${efl_version} ecore-audio >= ${efl_version} ], [HAVE_XWAYLAND_DEPS=true], [HAVE_XWAYLAND_DEPS=false])
AC_PATH_PROG([XWAYLAND_BIN], [Xwayland], [false])
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
fi
else
HAVE_XWAYLAND_DEPS=false
fi
@ -848,7 +784,7 @@ AM_CONDITIONAL([HAVE_XWAYLAND], [test "x${HAVE_XWAYLAND}" != "xno"])
define([CHECK_MODULE_WL_TEXT_INPUT],
[
if test "x${have_wayland}" = "xyes"; then
AC_E_CHECK_PKG(WL_TEXT_INPUT, [ ecore >= $efl_version eina >= $efl_version ], [WL_TEXT_INPUT=true], [WL_TEXT_INPUT=false])
WL_TEXT_INPUT=true
else
WL_TEXT_INPUT=false
fi
@ -859,7 +795,7 @@ WL_WEEKEYBOARD=false
define([CHECK_MODULE_WL_WEEKEYBOARD],
[
if test "x${have_wayland}" = "xyes" ; then
AC_E_CHECK_PKG(WL_WEEKEYBOARD, [ eina >= 1.8.0 evas >= 1.8.0 ecore >= 1.8.0 ecore-evas >= 1.8.0 ecore-wayland >= 1.8.0 edje >= 1.8.0 ], [WL_WEEKEYBOARD=true], [WL_WEEKEYBOARD=false])
WL_WEEKEYBOARD=true
else
WL_WEEKEYBOARD=false
fi
@ -870,9 +806,9 @@ AC_E_OPTIONAL_MODULE([ibar], true)
AC_E_OPTIONAL_MODULE([clock], true)
AC_E_OPTIONAL_MODULE([pager], true)
AC_E_OPTIONAL_MODULE([pager_plain], true)
AC_E_OPTIONAL_MODULE([battery], true, [CHECK_MODULE_BATTERY])
AC_E_OPTIONAL_MODULE([temperature], true, [CHECK_MODULE_TEMPERATURE])
AC_E_OPTIONAL_MODULE([notification], true, [CHECK_MODULE_NOTIFICATION])
AC_E_OPTIONAL_MODULE([battery], true)
AC_E_OPTIONAL_MODULE([temperature], true)
AC_E_OPTIONAL_MODULE([notification], true)
AC_E_OPTIONAL_MODULE([cpufreq], true)
AC_E_OPTIONAL_MODULE([ibox], true)
AC_E_OPTIONAL_MODULE([start], true)
@ -897,8 +833,8 @@ AC_E_OPTIONAL_MODULE([conf_paths], true)
AC_E_OPTIONAL_MODULE([conf_interaction], true)
AC_E_OPTIONAL_MODULE([gadman], true)
AC_E_OPTIONAL_MODULE([mixer], true, [CHECK_MODULE_MIXER])
AC_E_OPTIONAL_MODULE([connman], true, [CHECK_MODULE_CONNMAN])
AC_E_OPTIONAL_MODULE([bluez4], true, [CHECK_MODULE_BLUEZ4])
AC_E_OPTIONAL_MODULE([connman], true)
AC_E_OPTIONAL_MODULE([bluez4], true)
AC_E_OPTIONAL_MODULE([syscon], true)
AC_E_OPTIONAL_MODULE([everything], true)
AC_E_OPTIONAL_MODULE([systray], true)
@ -912,18 +848,18 @@ AC_E_OPTIONAL_MODULE([tasks], true)
AC_E_OPTIONAL_MODULE([conf_randr], true)
AC_E_OPTIONAL_MODULE([xkbswitch], true, $ecore_x)
AC_E_OPTIONAL_MODULE([tiling], true)
AC_E_OPTIONAL_MODULE([music_control], true, [CHECK_MODULE_MUSIC_CONTROL])
AC_E_OPTIONAL_MODULE([music_control], true)
AC_E_OPTIONAL_MODULE([packagekit], true)
AC_E_OPTIONAL_MODULE([wl_desktop_shell], $have_wayland, [CHECK_MODULE_WL_DESKTOP_SHELL])
AC_E_OPTIONAL_MODULE([wl_x11], $have_wayland, [CHECK_MODULE_WL_X11])
AC_E_OPTIONAL_MODULE([wl_wl], $have_wayland, [CHECK_MODULE_WL_WL])
#AC_E_OPTIONAL_MODULE([wl_fb], $have_wayland, [CHECK_MODULE_WL_FB])
AC_E_OPTIONAL_MODULE([wl_drm], $have_wayland, [CHECK_MODULE_WL_DRM])
AC_E_OPTIONAL_MODULE([wl_text_input], $have_wayland, [CHECK_MODULE_WL_TEXT_INPUT])
AC_E_OPTIONAL_MODULE([wl_weekeyboard], $have_wayland, [CHECK_MODULE_WL_WEEKEYBOARD])
AC_E_OPTIONAL_MODULE([wl_desktop_shell], $have_wayland_dep)
AC_E_OPTIONAL_MODULE([wl_x11], $have_wayland_dep, [CHECK_MODULE_WL_X11])
AC_E_OPTIONAL_MODULE([wl_wl], $have_wayland_dep)
#AC_E_OPTIONAL_MODULE([wl_fb], $have_wayland_dep, [CHECK_MODULE_WL_FB])
AC_E_OPTIONAL_MODULE([wl_drm], $have_wayland_dep, [CHECK_MODULE_WL_DRM])
AC_E_OPTIONAL_MODULE([wl_text_input], $have_wayland_dep)
AC_E_OPTIONAL_MODULE([wl_weekeyboard], $have_wayland_dep)
AC_E_OPTIONAL_MODULE([policy_mobile], true)
AC_E_OPTIONAL_MODULE([geolocation], true)
AC_E_OPTIONAL_MODULE([xwayland], $have_wayland, [CHECK_MODULE_XWAYLAND])
AC_E_OPTIONAL_MODULE([xwayland], $have_wayland_dep, [CHECK_MODULE_XWAYLAND])
if test "x${HAVE_WL_X11}" != "xyes" && test "x${have_wayland}" = "xyes" && test "x${HAVE_XWAYLAND}" != "xyes"; then
AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
@ -953,7 +889,6 @@ PKG_CHECK_MODULES(E, [$e_requires])
requirements_e="\
evas >= ${efl_version} \
ecore >= ${efl_version} \
ecore-x >= ${efl_version} \
ecore-evas >= ${efl_version} \
ecore-con >= ${efl_version} \
ecore-ipc >= ${efl_version} \

View File

@ -12,7 +12,7 @@ config_apps=@datadir@/@PACKAGE@/config-apps
release=@release@
Name: enlightenment
Description: Enlightenmnt Window Manager
Description: Enlightenment Window Manager
Requires: @requirements_e@
Version: @VERSION@
Libs: -L${libdir}

2833
po/es.po

File diff suppressed because it is too large Load Diff

2971
po/it.po

File diff suppressed because it is too large Load Diff

View File

@ -377,7 +377,7 @@ src/bin/e_comp_wl_input.c \
src/bin/e_comp_wl.c
endif
src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@
src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ @WL_DRM_CFLAGS@
src_bin_enlightenment_SOURCES = \
src/bin/e_main.c \
$(enlightenment_src)

View File

@ -16,6 +16,10 @@
# include "config.h"
# endif
#ifdef HAVE_WAYLAND
# define EFL_BETA_API_SUPPORT
#endif
# define USE_IPC
# if 0
# define OBJECT_PARANOIA_CHECK
@ -127,7 +131,7 @@ void *alloca (size_t);
# include <Elementary.h>
# ifdef HAVE_WAYLAND
# include <Ecore_Wayland.h>
# include <Ecore_Wl2.h>
# include <uuid.h>
# endif

View File

@ -23,7 +23,7 @@ e_about_new(void)
snprintf
(buf, sizeof(buf), "%s%s",
_(
"<title>Copyright &copy; 2000-2015, by the Enlightenment "
"<title>Copyright &copy; 2000-2016, by the Enlightenment "
"Development Team</><br>"
"<br>"
"We hope you enjoy using this software as much as we enjoyed "

View File

@ -93,7 +93,8 @@ static int _action_groups_sort_cb(const void *d1, const void *d2);
/***************************************************************************/
ACT_FN_GO(window_move, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
if (!((E_Client *)obj)->lock_user_location)
@ -145,11 +146,6 @@ ACT_FN_GO_KEY(window_move, EINA_UNUSED, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
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);
}
@ -157,9 +153,9 @@ ACT_FN_GO_KEY(window_move, EINA_UNUSED, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_resize, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
if (!((E_Client *)obj)->lock_user_size)
e_client_act_resize_begin((E_Client *)obj, NULL);
}
@ -225,13 +221,9 @@ ACT_FN_GO_KEY(window_resize, EINA_UNUSED, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_menu, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (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);
}
@ -262,13 +254,9 @@ ACT_FN_GO_KEY(window_menu, EINA_UNUSED, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_raise, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (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);
}
@ -276,13 +264,9 @@ ACT_FN_GO(window_raise, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_lower, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (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);
}
@ -290,13 +274,9 @@ ACT_FN_GO(window_lower, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_close, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (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);
}
@ -337,9 +317,9 @@ ACT_FN_GO(window_kill, EINA_UNUSED)
E_Client *ec;
char dialog_text[1024];
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE) return;
ec = (E_Client *)obj;
if ((ec->lock_close) || (ec->internal)) return;
@ -379,13 +359,9 @@ ACT_FN_GO(window_kill, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_sticky_toggle, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_sticky)
{
E_Client *ec;
@ -399,13 +375,9 @@ ACT_FN_GO(window_sticky_toggle, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_sticky, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_sticky)
{
E_Client *ec;
@ -426,13 +398,9 @@ ACT_FN_GO(window_iconic_toggle, EINA_UNUSED)
{
E_Client *ec;
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
ec = (E_Client *)obj;
if ((!ec->lock_user_iconify) && (!ec->fullscreen) &&
@ -447,13 +415,9 @@ ACT_FN_GO(window_iconic_toggle, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_iconic, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_iconify)
{
E_Client *ec;
@ -472,13 +436,9 @@ ACT_FN_GO(window_iconic, )
/***************************************************************************/
ACT_FN_GO(window_fullscreen_toggle, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_fullscreen)
{
E_Client *ec;
@ -498,13 +458,9 @@ ACT_FN_GO(window_fullscreen_toggle, )
/***************************************************************************/
ACT_FN_GO(window_fullscreen, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_fullscreen)
{
E_Client *ec;
@ -540,13 +496,9 @@ ACT_FN_GO(window_maximized_toggle, )
E_Client *ec;
Eina_Bool resize = EINA_FALSE;
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
ec = (E_Client *)obj;
/* internal dialog which is resizable */
@ -608,13 +560,9 @@ maximize:
/***************************************************************************/
ACT_FN_GO(window_maximized, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_maximize)
{
E_Client *ec;
@ -666,13 +614,9 @@ ACT_FN_GO(window_maximized, )
/***************************************************************************/
ACT_FN_GO(window_shaded_toggle, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_shade)
{
E_Client *ec;
@ -720,13 +664,9 @@ ACT_FN_GO(window_shaded_toggle, )
/***************************************************************************/
ACT_FN_GO(window_shaded, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (!((E_Client *)obj)->lock_user_shade)
{
E_Client *ec;
@ -914,13 +854,9 @@ ACT_FN_GO(window_move_by, )
/***************************************************************************/
ACT_FN_GO(window_move_to, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (params)
{
E_Client *ec;
@ -1014,13 +950,9 @@ ACT_FN_GO(window_move_to_center, EINA_UNUSED)
{
E_Client *ec;
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
ec = (E_Client *)obj;
e_comp_object_util_center(ec->frame);
@ -1031,13 +963,9 @@ ACT_FN_GO(window_move_to_center, EINA_UNUSED)
/***************************************************************************/
ACT_FN_GO(window_resize_by, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (params)
{
@ -1062,13 +990,9 @@ ACT_FN_GO(window_resize_by, )
/***************************************************************************/
ACT_FN_GO(window_push, )
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
if (params)
{
@ -1251,13 +1175,9 @@ ACT_FN_GO(window_jump_to_or_start, )
/***************************************************************************/
ACT_FN_GO(window_drag_icon, EINA_UNUSED)
{
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
{
E_Client *ec;
@ -1275,13 +1195,11 @@ ACT_FN_GO(window_desk_move_by, )
int x, y;
if (!params) return;
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj)
obj = E_OBJECT(e_client_action_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
ec = (E_Client *)obj;
if ((!ec->zone) || (!ec->desk)) return;
@ -1339,13 +1257,11 @@ ACT_FN_GO(window_zone_move_by, )
Eina_Bool fullscreen;
if (!params) return;
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj)
obj = E_OBJECT(e_client_action_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
ec = (E_Client *)obj;
/* bad */
@ -1381,13 +1297,11 @@ ACT_FN_GO(window_desk_move_to, )
int x, y;
if (!params) return;
if (!obj) obj = E_OBJECT(e_client_focused_get());
if ((!obj) || (obj->type != E_CLIENT_TYPE))
obj = E_OBJECT(e_client_focused_get());
if (!obj)
obj = E_OBJECT(e_client_action_get());
if (!obj) return;
if (obj->type != E_CLIENT_TYPE)
{
obj = E_OBJECT(e_client_focused_get());
if (!obj) return;
}
ec = (E_Client *)obj;
if ((!ec->zone) || (!ec->desk)) return;
@ -2448,8 +2362,7 @@ _have_lid_and_external_screens_on(void)
ACT_FN_GO(suspend_smart, EINA_UNUSED)
{
if ((!_have_lid_and_external_screens_on()) &&
(ecore_power_state_get() != ECORE_POWER_STATE_MAINS))
if (!_have_lid_and_external_screens_on())
e_sys_action_do(E_SYS_SUSPEND, NULL);
}
@ -2517,8 +2430,7 @@ ACT_FN_GO(hibernate, )
ACT_FN_GO(hibernate_smart, EINA_UNUSED)
{
if ((!_have_lid_and_external_screens_on()) &&
(ecore_power_state_get() != ECORE_POWER_STATE_MAINS))
if (!_have_lid_and_external_screens_on())
e_sys_action_do(E_SYS_HIBERNATE, NULL);
}

View File

@ -210,6 +210,7 @@ _e_backlight_update(void)
Ecore_X_Randr_Output *out;
int i, num = 0;
if (!e_comp) return;
root = e_comp->root;
// try randr
if (root && xbl_avail)
@ -253,7 +254,9 @@ _e_backlight_update(void)
if (bl_sysval)
{
sysmode = MODE_SYS;
#ifndef HAVE_WAYLAND_ONLY
xbl_avail = EINA_FALSE;
#endif
_bl_sys_level_get();
return;
}
@ -278,6 +281,7 @@ _e_backlight_set(double val)
int num = 0, i;
char *name;
if (!e_comp) return;
root = e_comp->root;
out = ecore_x_randr_window_outputs_get(root, &num);
if ((out) && (num > 0))
@ -424,7 +428,7 @@ _bl_sys_find(void)
{
EINA_LIST_FOREACH(pdevs, l, f)
{
if ((!strstr(f, "kbd")) && (!strstr(f, "mail")))
if ((!strstr(f, "kbd")) && (!strstr(f, "mail")) && (!strstr(f, "input")))
{
bl_sysval = eina_stringshare_add(f);
break;

View File

@ -20,6 +20,8 @@ static Eina_List *signal_bindings = NULL;
static Eina_List *wheel_bindings = NULL;
static Eina_List *acpi_bindings = NULL;
static unsigned int bindings_disabled = 0;
typedef struct _E_Binding_Edge_Data E_Binding_Edge_Data;
struct _E_Binding_Edge_Data
@ -447,6 +449,7 @@ e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Bind
E_Action *act;
E_Binding_Mouse *binding;
if (bindings_disabled) return NULL;
act = e_bindings_mouse_button_find(ctxt, ev, &binding);
if (act)
{
@ -485,6 +488,7 @@ e_bindings_mouse_up_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Bindin
E_Action *act;
E_Binding_Mouse *binding;
if (bindings_disabled) return NULL;
act = e_bindings_mouse_button_find(ctxt, ev, &binding);
if (act)
{
@ -643,6 +647,7 @@ e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Ev
E_Binding_Key *binding;
Eina_List *l;
if (bindings_disabled) return NULL;
mod = _e_bindings_modifiers(ev->modifiers);
EINA_LIST_FOREACH(key_bindings, l, binding)
{
@ -676,6 +681,7 @@ e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Even
E_Binding_Key *binding;
Eina_List *l;
if (bindings_disabled) return NULL;
mod = _e_bindings_modifiers(ev->modifiers);
EINA_LIST_FOREACH(key_bindings, l, binding)
{
@ -894,6 +900,7 @@ e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z
E_Action *act = NULL;
Eina_List *l;
if (bindings_disabled) return NULL;
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;
@ -943,6 +950,7 @@ e_bindings_edge_out_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_
E_Action *act = NULL;
Eina_List *l;
if (bindings_disabled) return NULL;
if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT;
if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL;
if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT;
@ -986,6 +994,7 @@ e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event
E_Action *act = NULL;
Eina_List *l;
if (bindings_disabled) return NULL;
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;
@ -1022,6 +1031,7 @@ e_bindings_edge_up_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z
E_Action *act = NULL;
Eina_List *l;
if (bindings_disabled) return NULL;
if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT;
if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL;
if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT;
@ -1121,6 +1131,7 @@ e_bindings_signal_handle(E_Binding_Context ctxt, E_Object *obj, const char *sig,
E_Action *act;
E_Binding_Signal *binding;
if (bindings_disabled) return NULL;
if ((!sig) || (sig && (sig[0] == 0)))
return NULL;
if (src && (src[0] == 0)) src = NULL;
@ -1285,6 +1296,7 @@ e_bindings_wheel_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Binding_E
E_Action *act;
E_Binding_Wheel *binding;
if (bindings_disabled) return NULL;
act = e_bindings_wheel_find(ctxt, ev, &binding);
if (act)
{
@ -1400,6 +1412,40 @@ e_bindings_acpi_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Acpi
return act;
}
E_API void
e_bindings_disabled_set(Eina_Bool disabled)
{
E_Client *ec;
Ecore_Window win;
if (disabled)
{
if ((!bindings_disabled) && (e_comp->comp_type == E_PIXMAP_TYPE_X))
{
e_bindings_key_ungrab(E_BINDING_CONTEXT_ANY, e_comp->root);
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec)) continue;
win = e_client_util_win_get(ec);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win);
}
}
bindings_disabled++;
}
else if (bindings_disabled)
bindings_disabled--;
if (bindings_disabled || (e_comp->comp_type != E_PIXMAP_TYPE_X)) return;
e_bindings_key_grab(E_BINDING_CONTEXT_ANY, e_comp->root);
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec)) continue;
win = e_client_util_win_get(ec);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
}
}
static void
_e_bindings_mouse_free(E_Binding_Mouse *binding)
{

View File

@ -201,5 +201,7 @@ E_API void e_bindings_evas_event_mouse_wheel_convert(const Evas_Event_Mouse_Whee
E_API void e_bindings_ecore_event_mouse_button_convert(const Ecore_Event_Mouse_Button *ev, E_Binding_Event_Mouse_Button *event);
E_API void e_bindings_ecore_event_mouse_wheel_convert(const Ecore_Event_Mouse_Wheel *ev, E_Binding_Event_Wheel *event);
E_API void e_bindings_disabled_set(Eina_Bool disabled);
#endif
#endif

View File

@ -387,8 +387,8 @@ _e_client_action_input_win_del(void)
{
if (!comp_grabbed) return 0;
e_comp_ungrab_input(1, 1);
comp_grabbed = 0;
e_comp_ungrab_input(1, 1);
return 1;
}
@ -412,6 +412,17 @@ _e_client_action_finish(void)
action_client = NULL;
}
static void
_e_client_mouse_action_end(E_Client *ec)
{
if (!ec->cur_mouse_action) return;
if (ec->cur_mouse_action->func.end_mouse)
ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL);
else if (ec->cur_mouse_action->func.end)
ec->cur_mouse_action->func.end(E_OBJECT(ec), "");
E_FREE_FUNC(ec->cur_mouse_action, e_object_unref);
}
static void
_e_client_revert_focus(E_Client *ec)
{
@ -451,6 +462,13 @@ _e_client_revert_focus(E_Client *ec)
static void
_e_client_free(E_Client *ec)
{
if (ec->pixmap)
{
if (e_pixmap_free(ec->pixmap))
e_pixmap_client_set(ec->pixmap, NULL);
ec->pixmap = NULL;
}
e_comp_object_redirected_set(ec->frame, 0);
e_comp_object_render_update_del(ec->frame);
@ -586,11 +604,7 @@ _e_client_del(E_Client *ec)
ec->exe_inst = NULL;
}
if (ec->cur_mouse_action)
{
if (ec->cur_mouse_action->func.end)
ec->cur_mouse_action->func.end(E_OBJECT(ec), "");
}
_e_client_mouse_action_end(ec);
if (action_client == ec) _e_client_action_finish();
e_pointer_type_pop(e_comp->pointer, ec, NULL);
@ -628,6 +642,7 @@ _e_client_del(E_Client *ec)
evas_object_focus_set(ec->frame, 0);
E_FREE_FUNC(ec->ping_poller, ecore_poller_del);
eina_hash_del_by_key(clients_hash[e_pixmap_type_get(ec->pixmap)], &ec->pixmap);
/* must be called before parent/child clear */
_e_client_hook_call(E_CLIENT_HOOK_DEL, ec);
E_FREE(ec->comp_data);
@ -653,12 +668,8 @@ _e_client_del(E_Client *ec)
EINA_LIST_FREE(ec->group, child)
child->leader = NULL;
eina_hash_del_by_key(clients_hash[e_pixmap_type_get(ec->pixmap)], &ec->pixmap);
e_comp->clients = eina_list_remove(e_comp->clients, ec);
e_comp_object_render_update_del(ec->frame);
if (e_pixmap_free(ec->pixmap))
e_pixmap_client_set(ec->pixmap, NULL);
ec->pixmap = NULL;
}
///////////////////////////////////////////
@ -1037,8 +1048,8 @@ _e_client_resize_end(E_Client *ec)
/* If this border was maximized, we need to unset Maximized state or
* on restart, E still thinks it's maximized */
if (ec->maximized != E_MAXIMIZE_NONE)
e_hints_window_maximized_set(ec, ec->maximized & E_MAXIMIZE_NONE,
ec->maximized & E_MAXIMIZE_NONE);
e_hints_window_maximized_set(ec, ec->maximized & E_MAXIMIZE_HORIZONTAL,
ec->maximized & E_MAXIMIZE_VERTICAL);
_e_client_hook_call(E_CLIENT_HOOK_RESIZE_END, ec);
@ -1388,14 +1399,7 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
if (stopping) return; //ignore all of this if we're shutting down!
if (e_object_is_del(data)) return; //client is about to die
if (ec->cur_mouse_action)
{
if (ec->cur_mouse_action->func.end_mouse)
ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL);
else if (ec->cur_mouse_action->func.end)
ec->cur_mouse_action->func.end(E_OBJECT(ec), "");
E_FREE_FUNC(ec->cur_mouse_action, e_object_unref);
}
_e_client_mouse_action_end(ec);
if (action_client == ec) _e_client_action_finish();
e_pointer_type_pop(e_comp->pointer, ec, NULL);
@ -1456,6 +1460,8 @@ _e_client_cb_evas_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
if (ec->moving || (ecmove == ec))
_e_client_hook_call(E_CLIENT_HOOK_MOVE_UPDATE, ec);
e_remember_update(ec);
if (ec->fullscreen || (ec->maximized & E_MAXIMIZE_DIRECTION))
e_hints_window_size_set(ec);
ec->pre_cb.x = x; ec->pre_cb.y = y;
}
@ -1496,6 +1502,8 @@ _e_client_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
if (e_client_util_resizing_get(ec) || (ecresize == ec))
_e_client_hook_call(E_CLIENT_HOOK_RESIZE_UPDATE, ec);
e_remember_update(ec);
if (ec->fullscreen || (ec->maximized & E_MAXIMIZE_DIRECTION))
e_hints_window_size_set(ec);
ec->pre_cb.w = w; ec->pre_cb.h = h;
}
@ -1750,6 +1758,7 @@ _e_client_eval(E_Client *ec)
{
if (ec->parent)
{
Eina_Bool centered = EINA_FALSE;
if (ec->parent->zone != e_zone_current_get())
{
e_client_zone_set(ec, ec->parent->zone);
@ -1776,6 +1785,7 @@ _e_client_eval(E_Client *ec)
{
e_comp_object_util_center_on(ec->frame,
ec->parent->frame);
centered = 1;
}
}
ec->changes.pos = 1;
@ -1785,7 +1795,22 @@ _e_client_eval(E_Client *ec)
{
e_comp_object_util_center_on(ec->frame,
ec->parent->frame);
ec->changes.pos = 1;
centered = 1;
}
if (centered) //test for offscreen
{
if (!E_CONTAINS(ec->x, ec->y, ec->w, ec->h, zx, zy, zw, zh))
{
if (ec->x < zx)
ec->x = ec->parent->x;
if (ec->y < zy)
ec->y = ec->parent->y;
if (ec->x + ec->w > zx + zw)
ec->x = ec->parent->x + ec->parent->w - ec->w;
if (ec->y + ec->h > zy + zh)
ec->y = ec->parent->y + ec->parent->h - ec->h;
ec->changes.pos = 1;
}
}
ec->placed = 1;
ec->pre_cb.x = ec->x; ec->pre_cb.y = ec->y;
@ -1871,10 +1896,9 @@ _e_client_eval(E_Client *ec)
ec->x = new_x;
ec->y = new_y;
ec->changes.pos = 1;
ec->placed = 1;
ec->pre_cb.x = ec->x; ec->pre_cb.y = ec->y;
}
else if (!E_INSIDE(ec->x, ec->y, zx, zy, zw, zh))
else if (!E_INTERSECTS(ec->x, ec->y, ec->w, ec->h, zx, zy, zw, zh))
{
/* If an ec is placed out of bound, fix it! */
ec->x = zx + ((zw - ec->w) / 2);
@ -2015,8 +2039,12 @@ _e_client_eval(E_Client *ec)
}
if (ec->changes.pos)
{
Eina_Bool placed = ec->placed;
ec->changes.pos = 0;
evas_object_move(ec->frame, ec->x, ec->y);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_MANUAL)
ec->placed = placed;
rem_change = 1;
prop |= E_CLIENT_PROPERTY_POS;
}
@ -2060,30 +2088,26 @@ _e_client_eval(E_Client *ec)
}
evas_object_show(ec->frame);
if (evas_object_visible_get(ec->frame))
if (ec->cur_mouse_action)
{
if (ec->cur_mouse_action)
{
ec->moveinfo.down.x = ec->x;
ec->moveinfo.down.y = ec->y;
ec->moveinfo.down.w = ec->w;
ec->moveinfo.down.h = ec->h;
ec->mouse.current.mx = x;
ec->mouse.current.my = y;
ec->moveinfo.down.button = 0;
ec->moveinfo.down.mx = x;
ec->moveinfo.down.my = y;
ec->moveinfo.down.x = ec->x;
ec->moveinfo.down.y = ec->y;
ec->moveinfo.down.w = ec->w;
ec->moveinfo.down.h = ec->h;
ec->mouse.current.mx = x;
ec->mouse.current.my = y;
ec->moveinfo.down.button = 0;
ec->moveinfo.down.mx = x;
ec->moveinfo.down.my = y;
e_object_ref(E_OBJECT(ec->cur_mouse_action));
ec->cur_mouse_action->func.go(E_OBJECT(ec), NULL);
if (e_config->border_raise_on_mouse_action)
evas_object_raise(ec->frame);
evas_object_focus_set(ec->frame, 1);
}
ec->changes.visible = 0;
rem_change = 1;
_e_client_event_simple(ec, E_EVENT_CLIENT_SHOW);
e_object_ref(E_OBJECT(ec->cur_mouse_action));
ec->cur_mouse_action->func.go(E_OBJECT(ec), NULL);
if (e_config->border_raise_on_mouse_action)
evas_object_raise(ec->frame);
evas_object_focus_set(ec->frame, 1);
}
if (evas_object_visible_get(ec->frame))
ec->changes.visible = 0;
}
else if ((ec->changes.visible) && (ec->new_client))
{
@ -2194,8 +2218,9 @@ _e_client_eval(E_Client *ec)
prop |= E_CLIENT_PROPERTY_ICON;
}
if (ec->new_client)
e_comp->new_clients--;
ec->new_client = 0;
e_comp->new_clients--;
ec->changed = ec->changes.pos || ec->changes.size ||
ec->changes.stack || ec->changes.prop || ec->changes.border ||
ec->changes.reset_gravity || ec->changes.shading || ec->changes.shaded ||
@ -2302,7 +2327,7 @@ _e_client_frame_update(E_Client *ec)
bordername = "nofocus";
else if (ec->urgent)
bordername = "urgent";
else if (((ec->icccm.transient_for != 0) || (ec->dialog)) &&
else if (((ec->icccm.transient_for && (!ec->netwm.type)) || (ec->dialog)) &&
(e_pixmap_is_x(ec->pixmap)))
bordername = "dialog";
else if (ec->netwm.state.modal)
@ -2574,13 +2599,14 @@ e_client_new(E_Pixmap *cp, int first_map, int internal)
ec->netwm.action.close = 0;
ec->netwm.opacity = 255;
EC_CHANGED(ec);
e_comp->clients = eina_list_append(e_comp->clients, ec);
eina_hash_add(clients_hash[e_pixmap_type_get(cp)], &ec->pixmap, ec);
if (!ec->ignored)
_e_client_event_simple(ec, E_EVENT_CLIENT_ADD);
{
EC_CHANGED(ec);
_e_client_event_simple(ec, E_EVENT_CLIENT_ADD);
}
e_comp_object_client_add(ec);
if (ec->frame)
{
@ -2859,11 +2885,21 @@ e_client_mouse_down(E_Client *ec, int button, Evas_Point *output, E_Binding_Even
if (ec->cur_mouse_action)
{
did_act = EINA_TRUE;
if ((!ec->cur_mouse_action->func.end_mouse) &&
(!ec->cur_mouse_action->func.end))
ec->cur_mouse_action = NULL;
if (ec->cur_mouse_action)
e_object_ref(E_OBJECT(ec->cur_mouse_action));
e_object_ref(E_OBJECT(ec->cur_mouse_action));
if (ec->internal)
{
int button_mask, i;
Evas *e;
e = evas_object_evas_get(ec->internal_elm_win);
button_mask = evas_pointer_button_down_mask_get(e);
for (i = 0; i < 32; i++)
{
if ((button_mask & (1 << i)))
evas_event_feed_mouse_up(e, i + 1, EVAS_BUTTON_NONE, 0, NULL);
}
evas_event_feed_mouse_out(e, 0, NULL);
}
}
}
if ((!did_act) || (((pfocus == e_client_focused_get()) || (ec == e_client_focused_get())) && (ec->layer >= player)))
@ -2905,14 +2941,7 @@ e_client_mouse_up(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_
/* also we don't pass the same params that went in - then again that */
/* should be ok as we are just ending the action if it has an end */
if (ec->cur_mouse_action)
{
if (ec->cur_mouse_action->func.end_mouse)
ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", ev);
else if (ec->cur_mouse_action->func.end)
ec->cur_mouse_action->func.end(E_OBJECT(ec), "");
e_object_unref(E_OBJECT(ec->cur_mouse_action));
ec->cur_mouse_action = NULL;
}
_e_client_mouse_action_end(ec);
else
{
if (!e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(ec), ev))
@ -3119,7 +3148,9 @@ e_client_res_change_geometry_restore(E_Client *ec)
x = zx + zw - w;
if ((y + h) > (zy + zh))
y = zy + zh - h;
evas_object_geometry_set(ec->frame, x, y, w, h);
evas_object_move(ec->frame, x, y);
if (w && h)
evas_object_resize(ec->frame, w, h);
}
memcpy(&ec->pre_res_change, &pre_res_change, sizeof(pre_res_change));
}
@ -3506,7 +3537,7 @@ 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)
if (ec_unfocus->mouse.in && ec && (!e_client_util_is_popup(ec)))
e_client_mouse_out(ec_unfocus, ec_unfocus->x - 1, ec_unfocus->y - 1);
E_FREE_FUNC(ec_unfocus->raise_timer, ecore_timer_del);
@ -3725,10 +3756,11 @@ e_client_maximize(E_Client *ec, E_Maximize max)
E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
if (!ec->zone) return;
if (ec->maximized == max) return;
if (!(max & E_MAXIMIZE_DIRECTION)) max |= E_MAXIMIZE_BOTH;
if ((ec->shaded) || (ec->shading)) return;
evas_object_smart_callback_call(ec->frame, "maximize_pre", NULL);
/* Only allow changes in vertical/ horizontal maximization */
if (((ec->maximized & E_MAXIMIZE_DIRECTION) == (max & E_MAXIMIZE_DIRECTION)) ||
((ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return;
@ -3740,7 +3772,7 @@ e_client_maximize(E_Client *ec, E_Maximize max)
EC_CHANGED(ec);
return;
}
evas_object_smart_callback_call(ec->frame, "maximize_pre", NULL);
if (ec->fullscreen)
e_client_unfullscreen(ec);
ec->pre_res_change.valid = 0;
@ -3758,7 +3790,6 @@ e_client_maximize(E_Client *ec, E_Maximize max)
}
ec->saved.zone = ec->zone->num;
e_hints_window_size_set(ec);
_e_client_maximize(ec, max);
@ -3799,9 +3830,10 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
}
if ((ec->shaded) || (ec->shading)) return;
evas_object_smart_callback_call(ec->frame, "unmaximize_pre", NULL);
/* Remove directions not used */
max &= (ec->maximized & E_MAXIMIZE_DIRECTION);
evas_object_smart_callback_call(ec->frame, "unmaximize_pre", NULL);
/* Can only remove existing maximization directions */
if (!max) return;
if (ec->maximized & E_MAXIMIZE_TYPE)
@ -3878,7 +3910,6 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
e_client_resize_limit(ec, &w, &h);
e_client_util_move_resize_without_frame(ec, x, y, w, h);
e_hints_window_size_set(ec);
}
if (vert)
ec->saved.h = ec->saved.y = 0;
@ -3939,7 +3970,6 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
ec->saved.w = w;
ec->saved.h = h;
}
e_hints_window_size_set(ec);
ec->saved.layer = ec->layer;
if (!e_config->allow_above_fullscreen)
@ -4587,12 +4617,7 @@ e_client_move_cancel(void)
ec = ecmove;
e_object_ref(E_OBJECT(ec));
if (ec->cur_mouse_action->func.end_mouse)
ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL);
else if (ec->cur_mouse_action->func.end)
ec->cur_mouse_action->func.end(E_OBJECT(ec), "");
e_object_unref(E_OBJECT(ec->cur_mouse_action));
ec->cur_mouse_action = NULL;
_e_client_mouse_action_end(ec);
e_object_unref(E_OBJECT(ec));
}
else
@ -4609,12 +4634,7 @@ e_client_resize_cancel(void)
ec = ecresize;
e_object_ref(E_OBJECT(ec));
if (ec->cur_mouse_action->func.end_mouse)
ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL);
else if (ec->cur_mouse_action->func.end)
ec->cur_mouse_action->func.end(E_OBJECT(ec), "");
e_object_unref(E_OBJECT(ec->cur_mouse_action));
ec->cur_mouse_action = NULL;
_e_client_mouse_action_end(ec);
e_object_unref(E_OBJECT(ec));
}
else
@ -4978,12 +4998,13 @@ e_client_has_xwindow(const E_Client *ec)
#ifdef HAVE_WAYLAND_ONLY
(void)ec;
return EINA_FALSE;
#endif
#ifdef HAVE_WAYLAND
#else
# ifdef HAVE_WAYLAND
if (!e_pixmap_is_x(ec->pixmap))
return !!e_comp_wl_client_xwayland_pixmap(ec);
#endif
# endif
return e_pixmap_is_x(ec->pixmap);
#endif
}
////////////////////////////////////////////

View File

@ -636,7 +636,6 @@ struct E_Client
unsigned int internal : 1;
unsigned int internal_no_remember : 1;
unsigned int internal_no_reopen : 1;
Eina_Bool dead : 1;
Evas_Object *internal_elm_win;
@ -698,6 +697,7 @@ struct E_Client
Eina_Bool maximize_override : 1; // client is doing crazy stuff and should "just do it" when moving/resizing
Eina_Bool keyboard_resizing : 1;
Eina_Bool on_post_updates : 1; // client is on the post update list
#ifdef HAVE_WAYLAND
uuid_t uuid;
#endif

View File

@ -76,6 +76,26 @@ e_client_util_ignored_get(const E_Client *ec)
return ec->override || ec->input_only || ec->ignored;
}
static inline Eina_Bool
e_client_util_is_popup(const E_Client *ec)
{
if (!ec) return EINA_FALSE;
switch (ec->netwm.type)
{
case E_WINDOW_TYPE_MENU:
case E_WINDOW_TYPE_SPLASH:
case E_WINDOW_TYPE_DROPDOWN_MENU:
case E_WINDOW_TYPE_POPUP_MENU:
case E_WINDOW_TYPE_TOOLTIP:
case E_WINDOW_TYPE_NOTIFICATION:
case E_WINDOW_TYPE_COMBO:
case E_WINDOW_TYPE_DND:
return EINA_TRUE;
default: break;
}
return EINA_FALSE;
}
static inline Eina_Bool
e_client_util_desk_visible(const E_Client *ec, const E_Desk *desk)
{

View File

@ -123,7 +123,7 @@ _e_color_dialog_cb_csel_change(void *data, Evas_Object *obj, void *ev EINA_UNUSE
re = evas_object_data_get(obj, "rect");
evas_color_argb_premul(dia->color->a, &r, &g, &b);
evas_object_color_set(re, r, g, b, dia->color->a);
if (dia->change_func && dia->color)
if (dia->change_func)
dia->change_func(dia, dia->color, dia->change_data);
}

View File

@ -817,6 +817,12 @@ _e_comp_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Key *
static Eina_Bool
_e_comp_signal_user(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Signal_User *ev)
{
siginfo_t sig;
sig = ev->data;
/* anything sent via 'kill' will set this code to SI_USER */
if (sig.si_code != SI_USER) return ECORE_CALLBACK_PASS_ON;
if (ev->number == 1)
{
// e uses this to pop up config panel
@ -980,11 +986,26 @@ _e_comp_act_opacity_set_go(E_Object * obj EINA_UNUSED, const char *params)
static void
_e_comp_act_redirect_toggle_go(E_Object * obj EINA_UNUSED, const char *params EINA_UNUSED)
{
e_comp_client_redirect_toggle(e_client_focused_get());
E_Client *ec;
ec = e_client_focused_get();
if ((!ec) || (!e_pixmap_is_x(ec->pixmap)) || (ec == e_comp->nocomp_ec)) return;
e_comp_client_redirect_toggle(ec);
}
//////////////////////////////////////////////////////////////////////////
static void
_e_comp_resize(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
int w, h;
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
if ((w == e_comp->w) && (h == e_comp->h)) return;
e_randr2_screens_setup(w, h);
e_comp_canvas_update();
}
EINTERN Eina_Bool
e_comp_init(void)
{
@ -1095,11 +1116,17 @@ e_comp_init(void)
{
const char **test, *eng[] =
{
#ifdef HAVE_WL_DRM
#ifdef USE_MODULE_WL_WL
"wl_wl",
#endif
#ifdef USE_MODULE_WL_X11
"wl_x11",
#endif
#ifdef USE_MODULE_WL_DRM
"wl_drm",
#endif
/* probably add other engines here; fb should be last? */
#ifdef HAVE_WL_FB
#ifdef USE_MODULE_WL_FB
"wl_fb",
#endif
NULL
@ -1127,7 +1154,10 @@ out:
e_screensaver_update();
}
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);
ecore_evas_focus_set(e_comp->ee, 0);
ecore_evas_focus_set(e_comp->ee, 1);
evas_object_show(e_comp->elm);
e_util_env_set("HYBRIS_EGLPLATFORM", NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_screensaver_on, NULL);
@ -1348,25 +1378,19 @@ e_comp_shutdown(void)
Eina_List *l, *ll;
E_Client *ec;
#ifdef HAVE_WAYLAND
E_Pixmap_Type type = e_comp->comp_type;
#endif
E_FREE_FUNC(action_timeout, ecore_timer_del);
EINA_LIST_FOREACH_SAFE(e_comp->clients, l, ll, ec)
{
DELD(ec, 99999);
e_object_del(E_OBJECT(ec));
}
e_object_del(E_OBJECT(e_comp));
e_comp = NULL;
E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_LIST(actions, e_object_del);
E_FREE_LIST(hooks, e_client_hook_del);
#ifdef HAVE_WAYLAND
if (type == E_PIXMAP_TYPE_WL)
e_comp_wl_shutdown();
#endif
gl_avail = EINA_FALSE;
e_comp_cfdata_config_free(conf);
E_CONFIG_DD_FREE(conf_match_edd);
@ -1399,6 +1423,16 @@ e_comp_render_queue(void)
}
}
E_API void
e_comp_client_post_update_add(E_Client *ec)
{
if (ec->on_post_updates) return;
ec->on_post_updates = EINA_TRUE;
e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
REFD(ec, 111);
e_object_ref(E_OBJECT(ec));
}
E_API void
e_comp_shape_queue(void)
{
@ -1616,9 +1650,22 @@ e_comp_grab_input(Eina_Bool mouse, Eina_Bool kbd)
if ((e_comp->input_mouse_grabs && e_comp->input_key_grabs) ||
e_grabinput_get(mwin, 0, kwin))
{
E_Client *ec = e_client_focused_get();
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
if (ec)
evas_object_focus_set(ec->frame, 0);
}
ret = EINA_TRUE;
e_comp->input_mouse_grabs += mouse;
e_comp->input_key_grabs += kbd;
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
if (ec && (!e_object_is_del(E_OBJECT(ec))))
evas_object_focus_set(ec->frame, 1);
}
}
return ret;
}
@ -1643,7 +1690,24 @@ e_comp_ungrab_input(Eina_Bool mouse, Eina_Bool kbd)
e_grabinput_release(mwin, kwin);
evas_event_feed_mouse_out(e_comp->evas, 0, NULL);
evas_event_feed_mouse_in(e_comp->evas, 0, NULL);
if (e_client_focused_get()) return;
if (e_client_focused_get())
{
E_Client *ec = e_client_focused_get();
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
Eina_Bool mouse_in = ec->mouse.in;
int x, y;
x = ec->mouse.current.mx;
y = ec->mouse.current.my;
evas_object_focus_set(ec->frame, 0);
evas_object_focus_set(ec->frame, 1);
if (mouse_in)
e_client_mouse_in(ec, x, y);
}
return;
}
if (e_config->focus_policy != E_FOCUS_MOUSE)
e_client_refocus();
}

View File

@ -155,6 +155,8 @@ struct _E_Comp
Eina_Bool nocomp_want : 1;
Eina_Bool saver : 1;
Eina_Bool shape_queue_blocked : 1;
Eina_Bool rendering : 1; // we've received a pre-render callback but no post-render yet.
};
@ -184,6 +186,7 @@ E_API E_Comp *e_comp_new(void);
E_API int e_comp_internal_save(void);
EINTERN int e_comp_shutdown(void);
E_API void e_comp_render_queue(void);
E_API void e_comp_client_post_update_add(E_Client *ec);
E_API void e_comp_shape_queue(void);
E_API void e_comp_shape_queue_block(Eina_Bool block);
E_API E_Comp_Config *e_comp_config_get(void);

View File

@ -50,9 +50,13 @@ _e_comp_canvas_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *ev
//EINA_LIST_FOREACH(ev->updated_area, l, r)
//INF("POST RENDER: %d,%d %dx%d", r->x, r->y, r->w, r->h);
//}
e_comp->rendering = EINA_FALSE;
EINA_LIST_FREE(e_comp->post_updates, ec)
{
//INF("POST %p", ec);
ec->on_post_updates = EINA_FALSE;
if (!e_object_is_del(E_OBJECT(ec)))
e_pixmap_image_clear(ec->pixmap, 1);
UNREFD(ec, 111);
@ -68,7 +72,7 @@ _e_comp_canvas_cb_mouse_in(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object
E_Client *ec;
e_screensaver_notidle();
if (e_client_action_get()) return;
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
ec = e_client_focused_get();
if (ec && (!ec->border_menu)) e_focus_event_mouse_out(ec);
}
@ -77,7 +81,7 @@ static void
_e_comp_canvas_cb_mouse_down(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
e_screensaver_notidle();
if (e_client_action_get()) return;
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
}
@ -85,7 +89,7 @@ static void
_e_comp_canvas_cb_mouse_up(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
e_screensaver_notidle();
if (e_client_action_get()) return;
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
}
@ -93,7 +97,7 @@ static void
_e_comp_canvas_cb_mouse_wheel(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
e_screensaver_notidle();
if (e_client_action_get()) return;
if (e_client_action_get() || e_grabinput_mouse_win_get()) return;
e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
}
@ -101,18 +105,12 @@ static Eina_Bool
_e_comp_cb_key_down(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
{
e_screensaver_notidle();
if (e_menu_grab_window_get())
{
#ifdef HAVE_WAYLAND
e_comp_wl_key_down(ev);
#endif
return ECORE_CALLBACK_RENEW;
}
if ((e_comp->comp_type == E_PIXMAP_TYPE_X) && (ev->event_window != e_comp->root))
{
E_Client *ec;
ec = e_client_focused_get();
if (!ec) ec = e_client_action_get();
/* *block actions when no client is focused (probably something else did a grab here so we'll play nice)
* *block actions when menu is up
* *block actions when event (grab) window isn't comp window
@ -131,13 +129,6 @@ static Eina_Bool
_e_comp_cb_key_up(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
{
e_screensaver_notidle();
if (e_menu_grab_window_get())
{
#ifdef HAVE_WAYLAND
e_comp_wl_key_up(ev);
#endif
return ECORE_CALLBACK_RENEW;
}
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(E_BINDING_CONTEXT_MANAGER, E_OBJECT(e_comp), ev)
#ifdef HAVE_WAYLAND
@ -218,18 +209,13 @@ _e_comp_canvas_cb_zone_sort(const void *data1, const void *data2)
}
static void
_e_comp_canvas_resize(Ecore_Evas *ee EINA_UNUSED)
{
e_randr2_screens_setup(e_comp->w, e_comp->h);
e_comp_canvas_update();
}
static void
_e_comp_canvas_prerender(Ecore_Evas *ee EINA_UNUSED)
_e_comp_canvas_prerender(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Comp_Cb cb;
Eina_List *l;
e_comp->rendering = EINA_TRUE;
EINA_LIST_FOREACH(e_comp->pre_render_cbs, l, cb)
cb();
}
@ -291,8 +277,7 @@ e_comp_canvas_init(int w, int h)
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_cb_screensaver_on, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF, _e_comp_cb_screensaver_off, NULL);
ecore_evas_callback_pre_render_set(e_comp->ee, _e_comp_canvas_prerender);
ecore_evas_callback_resize_set(e_comp->ee, _e_comp_canvas_resize);
evas_event_callback_add(e_comp->evas, EVAS_CALLBACK_RENDER_PRE, _e_comp_canvas_prerender, NULL);
ecore_evas_resize(e_comp->ee, w, h);
return EINA_TRUE;
@ -548,6 +533,26 @@ e_comp_canvas_update(void)
}
}
for (i = 0; i < 11; i++)
{
Eina_List *tmp = NULL;
E_Client *ec;
if (!e_comp->layers[i].clients) continue;
/* Make temporary list as e_client_res_change_geometry_restore
* rearranges the order. */
EINA_INLIST_FOREACH(e_comp->layers[i].clients, ec)
{
if ((!e_client_util_ignored_get(ec)) && (!e_object_is_del(E_OBJECT(ec))))
tmp = eina_list_append(tmp, ec);
}
EINA_LIST_FREE(tmp, ec)
{
e_client_res_change_geometry_save(ec);
e_client_res_change_geometry_restore(ec);
}
}
if (!changed) return;
if (!starting)
{
@ -570,27 +575,6 @@ e_comp_canvas_update(void)
}
e_comp_canvas_zone_update(zone);
}
for (i = 0; i < 11; i++)
{
Eina_List *tmp = NULL;
E_Client *ec;
if (!e_comp->layers[i].clients) continue;
/* Make temporary list as e_client_res_change_geometry_restore
* rearranges the order. */
EINA_INLIST_FOREACH(e_comp->layers[i].clients, ec)
{
if (!e_client_util_ignored_get(ec))
tmp = eina_list_append(tmp, ec);
}
EINA_LIST_FREE(tmp, ec)
{
e_client_res_change_geometry_save(ec);
e_client_res_change_geometry_restore(ec);
}
}
}
E_API void

View File

@ -93,6 +93,8 @@ typedef struct _E_Comp_Object
Evas_Native_Surface *ns; //for custom gl rendering
double action_client_loop_time; //loop time when client's action ended
unsigned int update_count; // how many updates have happened to this obj
unsigned int opacity; // opacity set with _NET_WM_WINDOW_OPACITY
@ -295,10 +297,31 @@ _e_comp_object_layers_remove(E_Comp_Object *cw)
}
/////////////////////////////////////
static void
_e_comp_object_updates_init(E_Comp_Object *cw)
{
int pw, ph;
if (cw->updates) return;
pw = cw->ec->client.w, ph = cw->ec->client.h;
if ((!pw) || (!ph))
e_pixmap_size_get(cw->ec->pixmap, &pw, &ph);
if ((!pw) || (!ph)) return;
cw->updates = eina_tiler_new(pw, ph);
if (cw->updates)
eina_tiler_tile_size_set(cw->updates, 1, 1);
}
static void
_e_comp_object_alpha_set(E_Comp_Object *cw)
{
Eina_Bool alpha = cw->ec->argb;
Eina_Bool alpha;
if (!e_pixmap_is_x(cw->ec->pixmap))
alpha = e_pixmap_image_is_argb(cw->ec->pixmap);
else
alpha = cw->ec->argb;
if (cw->blanked || cw->ns || cw->ec->shaped) alpha = EINA_TRUE;
@ -327,19 +350,28 @@ _e_comp_object_cb_signal_bind(void *data, Evas_Object *obj EINA_UNUSED, const ch
if (e_dnd_active()) return;
#endif
if (cw->ec->iconic || cw->ec->cur_mouse_action) return;
e_bindings_signal_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(cw->ec),
emission, source);
if (!dblequal(cw->action_client_loop_time, ecore_loop_time_get()))
e_bindings_signal_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(cw->ec),
emission, source);
}
/////////////////////////////////////
/* handle evas mouse-in events on client object */
static void
_e_comp_object_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_object_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_In *ev = event_info;
E_Comp_Object *cw = data;
if (e_pixmap_is_x(cw->ec->pixmap))
{
if (!e_comp_object_frame_allowed(obj)) return;
if (E_INSIDE(ev->output.x, ev->output.y, cw->ec->client.x, cw->ec->client.y,
cw->ec->client.w, cw->ec->client.h)) return;
}
if (e_grabinput_mouse_win_get() && (e_grabinput_mouse_win_get() != e_client_util_win_get(cw->ec)))
return;
e_client_mouse_in(cw->ec, ev->output.x, ev->output.y);
}
@ -350,6 +382,8 @@ _e_comp_object_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EI
Evas_Event_Mouse_Out *ev = event_info;
E_Comp_Object *cw = data;
if (e_grabinput_mouse_win_get() && (e_grabinput_mouse_win_get() != e_client_util_win_get(cw->ec)))
return;
e_client_mouse_out(cw->ec, ev->output.x, ev->output.y);
}
@ -388,11 +422,15 @@ _e_comp_object_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
Evas_Event_Mouse_Down *ev = event_info;
E_Comp_Object *cw = data;
E_Binding_Event_Mouse_Button ev2;
Eina_Bool acting;
if (!cw->ec) return;
if (e_client_action_get() && (e_client_action_get() != cw->ec)) return;
e_bindings_evas_event_mouse_button_convert(ev, &ev2);
acting = !!cw->ec->cur_mouse_action;
e_client_mouse_up(cw->ec, ev->button, &ev->output, &ev2);
if (acting && (!e_client_action_get()))
cw->action_client_loop_time = ecore_loop_time_get();
}
/* handle evas mouse movement events on client object */
@ -508,17 +546,19 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
Eina_List *list = NULL, *l;
E_Comp_Match *m;
Eina_Stringshare *reshadow_group = NULL;
Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE, skip = EINA_FALSE, fast = EINA_FALSE, reshadow = EINA_FALSE, no_shadow = EINA_FALSE;
Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE, skip = EINA_FALSE,
fast = EINA_FALSE, reshadow = EINA_FALSE, no_shadow = EINA_FALSE, override;
Eina_Stringshare *name, *title;
E_Comp_Config *conf = e_comp_config_get();
edje_object_file_get(cw->shobj, NULL, &reshadow_group);
override = cw->ec->override || (cw->ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU);
/* match correct client type */
list = cw->ec->override ? conf->match.overrides : conf->match.borders;
list = override ? conf->match.overrides : conf->match.borders;
name = cw->ec->icccm.name;
title = cw->ec->icccm.title;
skip = (cw->ec->override ? conf->match.disable_overrides : conf->match.disable_borders) || (title && (!strncmp(title, "noshadow", 8)));
fast = cw->ec->override ? conf->fast_overrides : conf->fast_borders;
skip = (override ? conf->match.disable_overrides : conf->match.disable_borders) || (title && (!strncmp(title, "noshadow", 8)));
fast = override ? conf->fast_overrides : conf->fast_borders;
/* skipping here is mostly a hack for systray because I hate it */
if (!skip)
@ -612,7 +652,7 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
if (cw->frame_object && (edje_object_part_swallow_get(cw->shobj, "e.swallow.content") == cw->frame_object)) return EINA_FALSE;
}
}
if (cw->ec->override)
if (override)
{
if ((!cw->ec->shaped) && (!no_shadow) && (!cw->ec->argb))
edje_object_signal_emit(cw->shobj, "e,state,shadow,on", "e");
@ -631,7 +671,7 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
_e_comp_object_shadow(cw);
}
if (focus || cw->ec->focused || cw->ec->override)
if (focus || cw->ec->focused || override)
e_comp_object_signal_emit(cw->smart_obj, "e,state,focused", "e");
else
e_comp_object_signal_emit(cw->smart_obj, "e,state,unfocused", "e");
@ -651,9 +691,16 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
* stuck as hidden
*/
if (cw->visible || cw->ec->iconic || cw->ec->re_manage)
e_comp_object_signal_emit(cw->smart_obj, "e,state,visible", "e");
{
if ((cw->w > 0) && (cw->h > 0))
e_comp_object_signal_emit(cw->smart_obj, "e,state,visible", "e");
}
else
e_comp_object_signal_emit(cw->smart_obj, "e,state,hidden", "e");
if (e_comp_object_frame_allowed(cw->smart_obj))
e_comp_object_signal_emit(cw->smart_obj, "e,state,focus,enabled", "e");
else
e_comp_object_signal_emit(cw->smart_obj, "e,state,focus,disabled", "e");
/* breaks animation counter */
//if (cw->ec->iconic)
@ -705,6 +752,7 @@ _e_comp_object_animating_begin(E_Comp_Object *cw)
e_comp->animating++;
REFD(cw->ec, 2);
e_object_ref(E_OBJECT(cw->ec));
evas_object_image_border_center_fill_set(cw->obj, EVAS_BORDER_FILL_DEFAULT);
}
}
@ -718,6 +766,7 @@ _e_comp_object_animating_end(E_Comp_Object *cw)
{
e_comp->animating--;
cw->showing = 0;
evas_object_image_border_center_fill_set(cw->obj, EVAS_BORDER_FILL_SOLID);
UNREFD(cw->ec, 2);
/* remove ref from animation start, account for possibility of deletion from unref */
return !!e_object_unref(E_OBJECT(cw->ec));
@ -831,19 +880,42 @@ _e_comp_object_setup(E_Comp_Object *cw)
}
}
static void
_e_comp_object_mirror_pixels_get(void *data, Evas_Object *obj)
{
E_Comp_Object *cw = data;
E_Client *ec = cw->ec;
int pw, ph;
if ((!ec->pixmap) || (!e_pixmap_size_get(ec->pixmap, &pw, &ph)))
{
evas_object_image_data_set(obj, NULL);
return;
}
if (cw->native) return;
evas_object_image_data_set(obj, e_pixmap_image_data_get(cw->ec->pixmap));
evas_object_image_alpha_set(obj, evas_object_image_alpha_get(cw->obj));
evas_object_image_pixels_dirty_set(obj, EINA_FALSE);
}
/////////////////////////////////////////////
/* for fast path evas rendering; only called during render */
static void
_e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED)
_e_comp_object_pixels_get(void *data, Evas_Object *obj)
{
E_Comp_Object *cw = data;
E_Client *ec = cw->ec;
int pw, ph;
int bx, by, bxx, byy;
if (e_object_is_del(E_OBJECT(ec))) return;
if (!e_pixmap_size_get(ec->pixmap, &pw, &ph)) return;
if ((!ec->pixmap) || (!e_pixmap_size_get(ec->pixmap, &pw, &ph)))
{
evas_object_image_data_set(obj, NULL);
return;
}
//INF("PIXEL GET %p: %dx%d || %dx%d", ec, ec->w, ec->h, pw, ph);
e_pixmap_image_opaque_get(cw->ec->pixmap, &bx, &by, &bxx, &byy);
if (bxx && byy)
@ -851,15 +923,15 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED)
bxx = pw - (bx + bxx), byy = ph - (by + byy);
evas_object_image_border_set(cw->obj, bx, bxx, by, byy);
}
else if (cw->client_inset.calc && (!cw->frame_object)) //CSD
{
bx = -cw->client_inset.l + 4, by = -cw->client_inset.t + 4;
bxx = -cw->client_inset.r, byy = -cw->client_inset.b;
}
else
{
bx = by = bxx = byy = 0;
evas_object_image_border_set(cw->obj, bx, bxx, by, byy);
if (cw->client_inset.calc && (!cw->frame_object)) //CSD
{
bx = -cw->client_inset.l + 4, by = -cw->client_inset.t + 4;
bxx = -cw->client_inset.r, byy = -cw->client_inset.b;
}
}
{
Edje_Message_Int_Set *msg;
@ -879,9 +951,7 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED)
if (cw->native)
{
E_FREE_FUNC(cw->pending_updates, eina_tiler_free);
e_comp->post_updates = eina_list_append(e_comp->post_updates, cw->ec);
REFD(cw->ec, 111);
e_object_ref(E_OBJECT(cw->ec));
e_comp_client_post_update_add(cw->ec);
}
else if (e_comp_object_render(ec->frame))
{
@ -910,6 +980,24 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED)
/////////////////////////////////////////////
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 *cw = data;
evas_object_smart_callback_call(cw->smart_obj, "mouse_in", event_info);
}
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 *cw = data;
evas_object_smart_callback_call(cw->smart_obj, "mouse_out", event_info);
}
/////////////////////////////////////////////
static void
_e_comp_object_client_pending_resize_add(E_Client *ec,
int w,
@ -984,7 +1072,8 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
if (cw->ec->new_client)
{
/* don't actually do anything until first client idler loop */
cw->ec->placed = ((!cw->ec->dialog) && (!cw->ec->parent));
if (!cw->ec->placed)
cw->ec->placed = ((!cw->ec->dialog) && (!cw->ec->parent));
cw->ec->changes.pos = 1;
EC_CHANGED(cw->ec);
}
@ -1101,10 +1190,17 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
(!e_pixmap_size_get(cw->ec->pixmap, &pw, &ph))))
{
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
/* 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_object_is_del(E_OBJECT(cw->ec))) return;
/* shapeless clients smh */
if (cw->ec->shaped && (!cw->ec->shape_rects)) return;
/* pending shape change gtfo */
if (!cw->ec->changes.shape)
{
/* client can't be resized if its pixmap isn't usable, try again */
e_pixmap_dirty(cw->ec->pixmap);
e_comp_object_render_update_add(obj);
e_comp_render_queue();
}
cw->ec->changes.size = 1;
EC_CHANGED(cw->ec);
return;
@ -1533,12 +1629,7 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
}
if ((!cw->updates) && (!cw->ec->input_only) && (!cw->ec->ignored))
{
int pw, ph;
pw = cw->ec->client.w, ph = cw->ec->client.h;
if ((!pw) || (!ph))
e_pixmap_size_get(cw->ec->pixmap, &pw, &ph);
cw->updates = eina_tiler_new(pw, ph);
_e_comp_object_updates_init(cw);
if (!cw->updates)
{
cw->ec->changes.visible = !cw->ec->hidden;
@ -1547,8 +1638,6 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
return;
}
}
if (cw->updates)
eina_tiler_tile_size_set(cw->updates, 1, 1);
if (cw->ec->new_client)
{
/* ignore until client idler first run */
@ -1633,6 +1722,11 @@ _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)
{
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);
}
#ifdef BORDER_ZOOMAPS
e_comp_object_zoomap_set(o, 1);
#else
@ -1664,7 +1758,10 @@ _e_comp_intercept_focus(void *data, Evas_Object *obj, Eina_Bool focus)
}
if (focus && ec->lock_focus_out) return;
if (e_object_is_del(E_OBJECT(ec)) && focus)
CRI("CAN'T FOCUS DELETED CLIENT!");
{
CRI("CAN'T FOCUS DELETED CLIENT!");
return;
}
/* filter focus setting based on current state */
if (focus)
@ -2146,6 +2243,9 @@ _e_comp_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
{
INTERNAL_ENTRY;
evas_object_color_set(cw->clip, r, g, b, a);
cw->ec->netwm.opacity = a;
if (cw->ec->remember && (cw->ec->remember->apply & E_REMEMBER_APPLY_OPACITY))
e_remember_update(cw->ec);
evas_object_smart_callback_call(obj, "color_set", NULL);
}
@ -2172,20 +2272,6 @@ _e_comp_smart_hide(Evas_Object *obj)
evas_object_hide(cw->clip);
if (cw->input_obj) evas_object_hide(cw->input_obj);
evas_object_hide(cw->effect_obj);
if (cw->ec->dead)
{
Evas_Object *o;
evas_object_hide(cw->obj);
EINA_LIST_FREE(cw->obj_mirror, o)
{
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_del(o);
}
if (!_e_comp_object_animating_end(cw)) return;
}
if (stopping) return;
if (!cw->ec->input_only)
{
@ -2522,7 +2608,15 @@ _e_comp_object_util_hide(void *data EINA_UNUSED, Evas_Object *obj)
{
if (!evas_object_visible_get(obj)) return;
/* already hiding */
if (evas_object_data_get(obj, "comp_hiding")) return;
if (evas_object_data_get(obj, "comp_hiding"))
{
evas_object_data_del(obj, "comp_hiding");
evas_object_hide(obj);
e_comp_shape_queue();
if (evas_object_data_del(obj, "comp_ref"))
evas_object_unref(obj);
return;
}
if (!evas_object_data_del(obj, "comp_showing"))
{
evas_object_ref(obj);
@ -2846,12 +2940,18 @@ e_comp_object_util_zone_get(Evas_Object *obj)
zone = cw->ec->zone;
if (!zone)
{
int x, y;
int x, y, w, h;
if (e_win_client_get(obj))
return e_win_client_get(obj)->zone;
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
evas_object_geometry_get(obj, &x, &y, &w, &h);
zone = e_comp_zone_xy_get(x, y);
if (zone) return zone;
zone = e_comp_zone_xy_get(x + w, y + h);
if (zone) return zone;
zone = e_comp_zone_xy_get(x + w, y);
if (zone) return zone;
zone = e_comp_zone_xy_get(x, y + h);
}
return zone;
}
@ -2945,14 +3045,15 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
evas_object_smart_member_add(cw->input_obj, obj);
}
evas_object_geometry_set(cw->input_obj,
MAX(cw->ec->client.x + (!!cw->frame_object * cw->client_inset.l), 0) + x,
MAX(cw->ec->client.y + (!!cw->frame_object * cw->client_inset.t), 0) + y, w, h);
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);
evas_object_pass_events_set(cw->obj, 1);
if (cw->visible) evas_object_show(cw->input_obj);
}
else
{
evas_object_smart_member_del(cw->input_obj);
evas_object_freeze_events_set(cw->input_obj, 1);
E_FREE_FUNC(cw->input_obj, evas_object_del);
evas_object_pass_events_set(cw->obj, 0);
}
@ -2989,12 +3090,9 @@ e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
}
else if (cw->ec->maximized || cw->ec->fullscreen)
{
if (e_client_has_xwindow(cw->ec))
{
cw->ec->saved.x += l - cw->client_inset.l;
cw->ec->saved.y += t - cw->client_inset.t;
}
else
cw->ec->saved.x += l - cw->client_inset.l;
cw->ec->saved.y += t - cw->client_inset.t;
if (!e_client_has_xwindow(cw->ec))
{
cw->ec->saved.w -= ((l + r) - (cw->client_inset.l + cw->client_inset.r));
cw->ec->saved.h -= ((t + b) - (cw->client_inset.t + cw->client_inset.b));
@ -3002,10 +3100,14 @@ e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
}
if (!cw->ec->new_client)
{
if ((calc || (!e_client_has_xwindow(cw->ec))) && cw->client_inset.calc)
if (calc && cw->client_inset.calc)
{
cw->ec->x -= l - cw->client_inset.l;
cw->ec->y -= t - cw->client_inset.t;
E_Zone *zone = e_comp_object_util_zone_get(obj);
if (cw->ec->x != zone->x)
cw->ec->x -= l - cw->client_inset.l;
if (cw->ec->y != zone->y)
cw->ec->y -= t - cw->client_inset.t;
}
cw->ec->changes.pos = cw->ec->changes.size = 1;
EC_CHANGED(cw->ec);
@ -3014,6 +3116,11 @@ e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b)
cw->client_inset.r = r;
cw->client_inset.t = t;
cw->client_inset.b = b;
if (!cw->shobj) return;
if (cw->client_inset.calc)
e_comp_object_signal_emit(obj, "e,state,focus,disabled", "e");
else
e_comp_object_signal_emit(obj, "e,state,focus,enabled", "e");
}
E_API Eina_Bool
@ -3167,6 +3274,12 @@ reshadow:
do
{
_e_comp_smart_cb_frame_recalc(cw, cw->smart_obj, NULL);
if ((cw->x == -1) && (cw->y == -1) && cw->ec->new_client &&
(!cw->ec->placed) && (!cw->ec->re_manage))
{
cw->ec->x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l);
cw->ec->y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t);
}
/* this guarantees that we won't get blocked by the NOP check in the interceptor */
cw->y = cw->x = -99999;
if (pbg)
@ -3266,8 +3379,10 @@ e_comp_object_damage(Evas_Object *obj, int x, int y, int w, int h)
Eina_Rectangle rect;
API_ENTRY;
if (cw->ec->input_only || (!cw->updates)) return;
if (cw->ec->input_only) return;
if (cw->nocomp) return;
_e_comp_object_updates_init(cw);
EINA_SAFETY_ON_NULL_RETURN(cw->updates);
rect.x = x, rect.y = y;
rect.w = w, rect.h = h;
evas_object_smart_callback_call(obj, "damage", &rect);
@ -3280,7 +3395,8 @@ e_comp_object_damage(Evas_Object *obj, int x, int y, int w, int h)
if (cw->updates_full)
{
RENDER_DEBUG("IGNORED %p: %d,%d %dx%d", cw->ec, x, y, w, h);
e_comp_object_render_update_add(obj);
if (!e_object_is_del(E_OBJECT(cw->ec)))
e_comp_object_render_update_add(obj);
return;
}
/* clip rect to client surface */
@ -3320,7 +3436,8 @@ e_comp_object_damage(Evas_Object *obj, int x, int y, int w, int h)
RENDER_DEBUG("DAMAGE: %d,%d %dx%d", x, y, w, h);
}
cw->updates_exist = 1;
e_comp_object_render_update_add(obj);
if (!e_object_is_del(E_OBJECT(cw->ec)))
e_comp_object_render_update_add(obj);
}
E_API Eina_Bool
@ -3394,13 +3511,9 @@ e_comp_object_shape_apply(Evas_Object *obj)
//INF("SHAPE RENDER %p", cw->ec);
if (cw->ec->shaped) evas_object_image_native_surface_set(cw->obj, NULL);
_e_comp_object_alpha_set(cw);
EINA_LIST_FOREACH(cw->obj_mirror, l, o)
{
if (cw->ec->shaped) evas_object_image_native_surface_set(o, NULL);
evas_object_image_alpha_set(o, 1);
}
evas_object_image_alpha_set(o, 1);
p = pix = evas_object_image_data_get(cw->obj, 1);
if (!pix)
@ -3523,6 +3636,7 @@ e_comp_object_native_surface_set(Evas_Object *obj, Eina_Bool set)
EINA_SAFETY_ON_NULL_RETURN(cw->ec);
if (cw->ec->input_only) return;
set = !!set;
if ((!set) && (!cw->native)) return;
if (set)
{
@ -3596,7 +3710,7 @@ e_comp_object_dirty(Evas_Object *obj)
if (!dirty) w = h = 1;
evas_object_image_pixels_dirty_set(cw->obj, cw->blanked ? 0 : dirty);
if (!dirty)
evas_object_image_data_set(cw->obj, NULL);
evas_object_image_data_set(cw->obj, e_pixmap_image_data_get(cw->ec->pixmap));
evas_object_image_size_set(cw->obj, w, h);
RENDER_DEBUG("SIZE [%p]: %dx%d", cw->ec, w, h);
@ -3614,7 +3728,8 @@ e_comp_object_dirty(Evas_Object *obj)
}
if (!dirty)
{
ERR("ERROR FETCHING PIXMAP FOR %p", cw->ec);
if (!e_object_is_del(E_OBJECT(cw->ec)))
ERR("ERROR FETCHING PIXMAP FOR %p", cw->ec);
return;
}
e_comp_object_native_surface_set(obj, e_comp->gl);
@ -3677,45 +3792,39 @@ e_comp_object_render(Evas_Object *obj)
evas_object_image_pixels_dirty_set(cw->obj, EINA_FALSE);
RENDER_DEBUG("RENDER SIZE: %dx%d", pw, ph);
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
pix = e_pixmap_image_data_get(cw->ec->pixmap);
ret = EINA_TRUE;
goto end;
}
it = eina_tiler_iterator_new(cw->pending_updates);
if (e_pixmap_image_is_argb(cw->ec->pixmap))
{
pix = e_pixmap_image_data_get(cw->ec->pixmap);
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
EINA_ITERATOR_FOREACH(it, r)
{
EINA_ITERATOR_FOREACH(it, r)
E_RECTS_CLIP_TO_RECT(r->x, r->y, r->w, r->h, 0, 0, pw, ph);
/* get pixmap data from rect region on display server into memory */
ret = e_pixmap_image_draw(cw->ec->pixmap, r);
if (!ret)
{
E_RECTS_CLIP_TO_RECT(r->x, r->y, r->w, r->h, 0, 0, pw, ph);
/* get pixmap data from rect region on display server into memory */
ret = e_pixmap_image_draw(cw->ec->pixmap, r);
if (!ret)
WRN("UPDATE [%p]: %i %i %ix%i FAIL(%u)!!!!!!!!!!!!!!!!!", cw->ec, r->x, r->y, r->w, r->h, cw->failures);
if (++cw->failures < FAILURE_MAX)
e_comp_object_damage(obj, 0, 0, pw, ph);
else
{
WRN("UPDATE [%p]: %i %i %ix%i FAIL(%u)!!!!!!!!!!!!!!!!!", cw->ec, r->x, r->y, r->w, r->h, cw->failures);
if (++cw->failures < FAILURE_MAX)
e_comp_object_damage(obj, 0, 0, pw, ph);
else
{
DELD(cw->ec, 2);
e_object_del(E_OBJECT(cw->ec));
return EINA_FALSE;
}
break;
DELD(cw->ec, 2);
e_object_del(E_OBJECT(cw->ec));
return EINA_FALSE;
}
RENDER_DEBUG("UPDATE [%p] %i %i %ix%i", cw->ec, r->x, r->y, r->w, r->h);
break;
}
RENDER_DEBUG("UPDATE [%p] %i %i %ix%i", cw->ec, r->x, r->y, r->w, r->h);
}
else
ret = EINA_TRUE;
/* set pixel data */
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
#warning FIXME BROKEN WAYLAND SHM BUFFER PROTOCOL
evas_object_image_data_copy_set(cw->obj, cw->blanked ? NULL : pix);
pix = evas_object_image_data_get(cw->obj, 0);
evas_object_image_data_set(cw->obj, pix);
}
else
evas_object_image_data_set(cw->obj, cw->blanked ? NULL : pix);
if (!it) pix = NULL;
goto end;
}
@ -3742,22 +3851,15 @@ e_comp_object_render(Evas_Object *obj)
e_pixmap_image_data_argb_convert(cw->ec->pixmap, pix, srcpix, r, stride);
RENDER_DEBUG("UPDATE [%p]: %d %d %dx%d -- pix = %p", cw->ec, r->x, r->y, r->w, r->h, pix);
}
evas_object_image_data_set(cw->obj, cw->blanked ? NULL : pix);
end:
EINA_LIST_FOREACH(cw->obj_mirror, l, o)
{
evas_object_image_data_set(o, pix);
evas_object_image_pixels_dirty_set(o, EINA_FALSE);
}
if (!it) pix = NULL;
eina_iterator_free(it);
end:
evas_object_image_data_set(cw->obj, cw->blanked ? NULL : pix);
_e_comp_object_alpha_set(cw);
E_FREE_FUNC(cw->pending_updates, eina_tiler_free);
if (ret)
{
e_comp->post_updates = eina_list_append(e_comp->post_updates, cw->ec);
REFD(cw->ec, 111);
e_object_ref(E_OBJECT(cw->ec));
}
e_comp_client_post_update_add(cw->ec);
return ret;
}
@ -3797,7 +3899,10 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
evas_object_image_size_set(o, w, h);
if (cw->ec->shaped)
pix = evas_object_image_data_get(cw->obj, 0);
{
if (e_pixmap_image_data_get(cw->ec->pixmap))
pix = evas_object_image_data_get(cw->obj, 0);
}
else
{
if (cw->native)
@ -3813,7 +3918,7 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
}
}
else
pix = evas_object_image_data_get(cw->obj, EINA_FALSE);
pix = e_pixmap_image_data_get(cw->ec->pixmap);
}
if (pix)
{
@ -3830,10 +3935,12 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
//evas_object_image_border_set(o, bx, by, bxx, byy);
//evas_object_image_border_center_fill_set(o, EVAS_BORDER_FILL_SOLID);
evas_object_image_data_set(o, pix);
evas_object_image_data_set(cw->obj, pix);
if (cw->ec->shaped)
evas_object_image_data_set(cw->obj, pix);
if (dirty)
evas_object_image_data_update_add(o, 0, 0, w, h);
}
evas_object_image_pixels_get_callback_set(o, _e_comp_object_mirror_pixels_get, cw);
return o;
}
@ -4108,23 +4215,13 @@ _e_comp_object_autoclose_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_O
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)
{
SOFT_ENTRY();
if (e_comp->autoclose.obj)
{
if (e_comp->autoclose.obj == obj) return;
evas_object_event_callback_del_full(e_comp->autoclose.obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, e_comp);
e_comp->autoclose.obj = obj;
e_comp->autoclose.del_cb = del_cb;
e_comp->autoclose.key_cb = cb;
e_comp->autoclose.data = (void*)data;
if (evas_object_visible_get(obj))
_e_comp_object_autoclose_setup(obj);
else
evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _e_comp_object_autoclose_show, e_comp);
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, e_comp);
return;
_e_comp_object_autoclose_cleanup(0);
}
if (!obj) return;
e_comp->autoclose.obj = obj;
e_comp->autoclose.del_cb = del_cb;
e_comp->autoclose.key_cb = cb;

File diff suppressed because it is too large Load Diff

View File

@ -43,29 +43,26 @@
})
typedef struct _E_Comp_Wl_Buffer E_Comp_Wl_Buffer;
typedef struct _E_Comp_Wl_Buffer_Ref E_Comp_Wl_Buffer_Ref;
typedef struct _E_Comp_Wl_Subsurf_Data E_Comp_Wl_Subsurf_Data;
typedef struct _E_Comp_Wl_Surface_State E_Comp_Wl_Surface_State;
typedef struct _E_Comp_Wl_Client_Data E_Comp_Wl_Client_Data;
typedef struct _E_Comp_Wl_Data E_Comp_Wl_Data;
typedef struct _E_Comp_Wl_Output E_Comp_Wl_Output;
typedef struct E_Shell_Data E_Shell_Data;
struct _E_Comp_Wl_Buffer
{
struct wl_resource *resource;
struct wl_signal destroy_signal;
struct wl_listener destroy_listener;
struct wl_listener deferred_destroy_listener;
struct wl_shm_buffer *shm_buffer;
struct wl_shm_pool *pool;
E_Pixmap *discarding_pixmap;
int32_t w, h;
uint32_t busy;
};
struct _E_Comp_Wl_Buffer_Ref
{
E_Comp_Wl_Buffer *buffer;
struct wl_listener destroy_listener;
};
struct _E_Comp_Wl_Surface_State
{
int sx, sy;
@ -91,18 +88,20 @@ struct _E_Comp_Wl_Subsurf_Data
} position;
E_Comp_Wl_Surface_State cached;
E_Comp_Wl_Buffer_Ref cached_buffer_ref;
Eina_Bool synchronized;
};
struct _E_Comp_Wl_Data
{
Ecore_Wl2_Display *ewd;
struct
{
struct wl_display *disp;
Ecore_Wl2_Display *client_disp;
struct wl_registry *registry; // only used for nested wl compositors
struct wl_event_loop *loop;
/* struct wl_event_loop *loop; */
Eina_Inlist *globals; // only used for nested wl compositors
struct wl_shm *shm; // only used for nested wl compositors
Evas_GL *gl;
@ -136,12 +135,6 @@ struct _E_Comp_Wl_Data
/* } seat, output; */
} signals;
struct
{
struct wl_resource *shell;
struct wl_resource *xdg_shell;
} shell_interface;
struct
{
Eina_List *resources;
@ -163,6 +156,7 @@ struct _E_Comp_Wl_Data
wl_fixed_t x, y;
wl_fixed_t grab_x, grab_y;
uint32_t button;
uint32_t button_mask;
E_Client *ec;
Eina_Bool enabled : 1;
} ptr;
@ -272,9 +266,9 @@ struct _E_Comp_Wl_Client_Data
void (*map)(struct wl_resource *resource);
void (*unmap)(struct wl_resource *resource);
Eina_Rectangle window;
E_Shell_Data *data;
} shell;
E_Comp_Wl_Buffer_Ref buffer_ref;
E_Comp_Wl_Surface_State pending;
Eina_List *frames;
@ -291,13 +285,10 @@ struct _E_Comp_Wl_Client_Data
Eina_Bool keep_buffer : 1;
Eina_Bool mapped : 1;
Eina_Bool change_icon : 1;
Eina_Bool need_reparent : 1;
Eina_Bool reparented : 1;
Eina_Bool evas_init : 1;
Eina_Bool first_damage : 1;
Eina_Bool set_win_type : 1;
Eina_Bool frame_update : 1;
Eina_Bool maximize_pre : 1;
Eina_Bool cursor : 1;
};
struct _E_Comp_Wl_Output
@ -323,10 +314,8 @@ EINTERN void e_comp_wl_shutdown(void);
EINTERN struct wl_resource *e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id);
EINTERN void e_comp_wl_surface_destroy(struct wl_resource *resource);
EINTERN void e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer);
EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec);
EINTERN Eina_Bool e_comp_wl_subsurface_commit(E_Client *ec);
EINTERN void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer);
E_API E_Comp_Wl_Buffer *e_comp_wl_buffer_get(struct wl_resource *resource);
E_API struct wl_signal e_comp_wl_surface_create_signal_get(void);

View File

@ -1,3 +1,28 @@
/*
* Copyright © 2011 Kristian Høgsberg
*
* 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 THE AUTHORS OR COPYRIGHT HOLDERS
* 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 EXECUTIVE_MODE_ENABLED
#define E_COMP_WL
#include "e.h"
@ -48,6 +73,18 @@ _e_comp_wl_data_offer_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl
wl_resource_destroy(resource);
}
static void
_e_comp_wl_data_offer_cb_finish(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED)
{
/* TODO: implement */
}
static void
_e_comp_wl_data_offer_cb_actions_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, uint32_t actions EINA_UNUSED, uint32_t preferred_action EINA_UNUSED)
{
/* TODO: implement */
}
/* called by wl_resource_destroy */
static void
_e_comp_wl_data_offer_cb_resource_destroy(struct wl_resource *resource)
@ -70,7 +107,7 @@ _e_comp_wl_data_offer_cb_source_destroy(struct wl_listener *listener, void *data
E_Comp_Wl_Data_Offer *offer;
DBG("Data Offer Source Destroy");
offer = container_of(listener, E_Comp_Wl_Data_Offer,
offer = container_of(listener, E_Comp_Wl_Data_Offer,
source_destroy_listener);
if (!offer) return;
@ -82,6 +119,8 @@ static const struct wl_data_offer_interface _e_data_offer_interface =
_e_comp_wl_data_offer_cb_accept,
_e_comp_wl_data_offer_cb_receive,
_e_comp_wl_data_offer_cb_destroy,
_e_comp_wl_data_offer_cb_finish,
_e_comp_wl_data_offer_cb_actions_set,
};
static void
@ -106,6 +145,12 @@ _e_comp_wl_data_source_cb_destroy(struct wl_client *client EINA_UNUSED, struct w
wl_resource_destroy(resource);
}
static void
_e_comp_wl_data_source_cb_actions_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, uint32_t actions EINA_UNUSED)
{
/* TODO: implement */
}
/* called by wl_resource_destroy */
static void
_e_comp_wl_data_source_cb_resource_destroy(struct wl_resource *resource)
@ -118,6 +163,10 @@ _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)
e_comp_wl->drag_source = NULL;
free(source);
}
@ -147,6 +196,7 @@ static const struct wl_data_source_interface _e_data_source_interface =
{
_e_comp_wl_data_source_cb_offer,
_e_comp_wl_data_source_cb_destroy,
_e_comp_wl_data_source_cb_actions_set,
};
static void
@ -223,19 +273,8 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour
struct wl_resource *offer_res, *data_device_res, *focus = NULL;
sel_source = (E_Comp_Wl_Data_Source*)e_comp_wl->selection.data_source;
if ((sel_source) &&
(e_comp_wl->selection.serial - serial < UINT32_MAX / 2))
{
/* TODO: elm_entry is sending too many request on now,
* for those requests, selection.signal is being emitted also a lot.
* when it completes to optimize the entry, it should be checked more.
*/
if (e_comp_wl->clipboard.source)
wl_signal_emit(&e_comp_wl->selection.signal, e_comp->wl_comp_data);
return;
}
if (sel_source && (e_comp_wl->selection.serial - serial < UINT32_MAX / 2))
return;
if (sel_source)
{
@ -256,14 +295,13 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour
if (focus)
{
data_device_res =
e_comp_wl_data_find_for_client(wl_resource_get_client(focus));
e_comp_wl_data_find_for_client(wl_resource_get_client(focus));
if ((data_device_res) && (source))
{
offer_res =
_e_comp_wl_data_device_data_offer_create(source,
data_device_res);
_e_comp_wl_data_device_data_offer_create(source,
data_device_res);
wl_data_device_send_selection(data_device_res, offer_res);
}
else if (data_device_res)
wl_data_device_send_selection(data_device_res, NULL);
@ -302,8 +340,10 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
if (e_client_has_xwindow(e_comp_wl->selection.target))
{
ecore_x_client_message32_send(e_client_util_win_get(e_comp_wl->selection.target),
ECORE_X_ATOM_XDND_DROP, ECORE_X_EVENT_MASK_NONE,
e_comp->cm_selection, 0, ecore_x_current_time_get(), 0, 0);
ECORE_X_ATOM_XDND_DROP,
ECORE_X_EVENT_MASK_NONE,
e_comp->cm_selection, 0,
ecore_x_current_time_get(), 0, 0);
}
else
#endif
@ -319,7 +359,8 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp_util_has_xwayland())
{
ecore_x_selection_owner_set(0, ECORE_X_ATOM_SELECTION_XDND, ecore_x_current_time_get());
ecore_x_selection_owner_set(0, ECORE_X_ATOM_SELECTION_XDND,
ecore_x_current_time_get());
ecore_x_window_hide(e_comp->cm_selection);
}
#endif
@ -340,7 +381,8 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
DBG("Data Device Drag Start");
if ((e_comp_wl->kbd.focus) && (e_comp_wl->kbd.focus != origin_resource)) return;
if ((e_comp_wl->kbd.focus) && (e_comp_wl->kbd.focus != origin_resource))
return;
if (!(source = wl_resource_get_user_data(source_resource))) return;
e_comp_wl->drag_source = source;
@ -371,9 +413,10 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
}
evas_pointer_canvas_xy_get(e_comp->evas, &x, &y);
e_comp_wl->drag = e_drag_new(x, y,
NULL, 0, NULL, 0, NULL, _e_comp_wl_data_device_drag_finished);
e_comp_wl->drag->button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
e_comp_wl->drag = e_drag_new(x, y, NULL, 0, NULL, 0, NULL,
_e_comp_wl_data_device_drag_finished);
e_comp_wl->drag->button_mask =
evas_pointer_button_down_mask_get(e_comp->evas);
if (ec)
e_drag_object_set(e_comp_wl->drag, ec->frame);
e_drag_start(e_comp_wl->drag, x, y);
@ -381,7 +424,9 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
if (e_comp_util_has_xwayland())
{
ecore_x_window_show(e_comp->cm_selection);
ecore_x_selection_owner_set(e_comp->cm_selection, ECORE_X_ATOM_SELECTION_XDND, ecore_x_current_time_get());
ecore_x_selection_owner_set(e_comp->cm_selection,
ECORE_X_ATOM_SELECTION_XDND,
ecore_x_current_time_get());
}
#endif
if (e_comp_wl->ptr.ec)
@ -441,7 +486,8 @@ _e_comp_wl_data_manager_cb_device_get(struct wl_client *client, struct wl_resour
}
eina_hash_add(e_comp_wl->mgr.data_resources, &client, res);
wl_resource_set_implementation(res, &_e_data_device_interface, e_comp->wl_comp_data,
wl_resource_set_implementation(res, &_e_data_device_interface,
e_comp->wl_comp_data,
_e_comp_wl_data_device_cb_unbind);
}
@ -469,7 +515,8 @@ _e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data EINA_UNUSED
struct wl_resource *res;
/* try to create data manager resource */
e_comp_wl->mgr.resource = res = wl_resource_create(client, &wl_data_device_manager_interface, 1, id);
e_comp_wl->mgr.resource = res =
wl_resource_create(client, &wl_data_device_manager_interface, 1, id);
if (!res)
{
ERR("Could not create data device manager: %m");
@ -628,8 +675,8 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi
sel_source->send(sel_source, mime_type, p[1]);
e_comp_wl->clipboard.source =
e_comp_wl_clipboard_source_create(mime_type,
e_comp_wl->selection.serial, p[0]);
e_comp_wl_clipboard_source_create(mime_type,
e_comp_wl->selection.serial, p[0]);
if (!e_comp_wl->clipboard.source)
close(p[0]);
@ -658,17 +705,20 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
uint32_t serial;
int x, y;
if (e_client_has_xwindow(ec) && e_client_has_xwindow(e_comp_wl->drag_client)) return;
if (e_client_has_xwindow(ec) &&
e_client_has_xwindow(e_comp_wl->drag_client))
return;
if (!e_client_has_xwindow(ec))
{
data_device_res =
e_comp_wl_data_find_for_client(wl_resource_get_client(ec->comp_data->surface));
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;
}
e_comp_wl->selection.target = ec;
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL, _e_comp_wl_data_device_target_del, ec);
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL,
_e_comp_wl_data_device_target_del, ec);
#ifndef HAVE_WAYLAND_ONLY
if (e_client_has_xwindow(ec))
@ -703,8 +753,10 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
}
ecore_x_client_message32_send(e_client_util_win_get(ec),
ECORE_X_ATOM_XDND_ENTER, ECORE_X_EVENT_MASK_NONE,
e_comp->cm_selection, d1, d2, d3, d4);
ECORE_X_ATOM_XDND_ENTER,
ECORE_X_EVENT_MASK_NONE,
e_comp->cm_selection, d1, d2, d3, d4);
return;
}
#endif
@ -712,7 +764,8 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
y = wl_fixed_to_int(e_comp_wl->ptr.y) - e_comp_wl->selection.target->client.y;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
wl_data_device_send_enter(data_device_res, serial, ec->comp_data->surface,
wl_fixed_from_int(x), wl_fixed_from_int(y), offer_res);
wl_fixed_from_int(x), wl_fixed_from_int(y),
offer_res);
}
E_API void
@ -720,16 +773,20 @@ e_comp_wl_data_device_send_leave(E_Client *ec)
{
struct wl_resource *res;
if (e_client_has_xwindow(ec) && e_client_has_xwindow(e_comp_wl->drag_client)) return;
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_DEL, _e_comp_wl_data_device_target_del, ec);
if (e_client_has_xwindow(ec) &&
e_client_has_xwindow(e_comp_wl->drag_client))
return;
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_DEL,
_e_comp_wl_data_device_target_del, ec);
if (e_comp_wl->selection.target == ec)
e_comp_wl->selection.target = NULL;
#ifndef HAVE_WAYLAND_ONLY
if (e_client_has_xwindow(ec))
{
ecore_x_client_message32_send(e_client_util_win_get(ec),
ECORE_X_ATOM_XDND_LEAVE, ECORE_X_EVENT_MASK_NONE,
e_comp->cm_selection, 0, 0, 0, 0);
ECORE_X_ATOM_XDND_LEAVE,
ECORE_X_EVENT_MASK_NONE,
e_comp->cm_selection, 0, 0, 0, 0);
return;
}
#endif
@ -749,7 +806,11 @@ e_comp_wl_data_device_send_offer(E_Client *ec)
if (!data_device_res) return NULL;
source = e_comp_wl->drag_source;
if (source)
offer_res = _e_comp_wl_data_device_data_offer_create(source, data_device_res);
{
offer_res =
_e_comp_wl_data_device_data_offer_create(source, data_device_res);
}
return offer_res;
}
@ -784,17 +845,23 @@ e_comp_wl_data_device_keyboard_focus_set(void)
else if (source && e_client_has_xwindow(e_client_focused_get()))
{
/* wl -> x11 */
ecore_x_selection_owner_set(e_comp->cm_selection, ECORE_X_ATOM_SELECTION_CLIPBOARD, ecore_x_current_time_get());
ecore_x_selection_owner_set(e_comp->cm_selection,
ECORE_X_ATOM_SELECTION_CLIPBOARD,
ecore_x_current_time_get());
return;
}
} while (0);
#endif
data_device_res =
e_comp_wl_data_find_for_client(wl_resource_get_client(focus));
e_comp_wl_data_find_for_client(wl_resource_get_client(focus));
if (!data_device_res) return;
if (source)
offer_res = _e_comp_wl_data_device_data_offer_create(source, data_device_res);
{
offer_res =
_e_comp_wl_data_device_data_offer_create(source, data_device_res);
}
wl_data_device_send_selection(data_device_res, offer_res);
}
@ -894,16 +961,22 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd
{
if (!source->data_source.mime_types)
source->data_source.mime_types = eina_array_new(1);
eina_array_push(source->data_source.mime_types, eina_stringshare_add(mime_type));
eina_array_push(source->data_source.mime_types,
eina_stringshare_add(mime_type));
}
if (fd > 0)
{
source->fd_handler =
ecore_main_fd_handler_add(fd, ECORE_FD_READ,
_e_comp_wl_clipboard_source_save,
e_comp->wl_comp_data, NULL, NULL);
if (!source->fd_handler) return NULL;
ecore_main_fd_handler_file_add(fd, ECORE_FD_READ | ECORE_FD_ERROR,
_e_comp_wl_clipboard_source_save,
e_comp->wl_comp_data, NULL, NULL);
if (!source->fd_handler)
{
_mime_types_free(&source->data_source);
free(source);
return NULL;
}
}
source->fd = fd;

View File

@ -1,3 +1,28 @@
/*
* Copyright © 2011 Kristian Høgsberg
*
* 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 THE AUTHORS OR COPYRIGHT HOLDERS
* 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.
*/
#ifdef E_TYPEDEFS
#else
# ifndef E_COMP_WL_DATA_H

View File

@ -20,7 +20,7 @@ _e_comp_wl_input_update_seat_caps(void)
caps |= WL_SEAT_CAPABILITY_TOUCH;
EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, res)
wl_seat_send_capabilities(res, caps);
wl_seat_send_capabilities(res, caps);
}
static void
@ -37,6 +37,7 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
E_CLIENT_FOREACH(ec)
{
if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) continue;
if (!ec->comp_data->surface) continue;
if (client != wl_resource_get_client(ec->comp_data->surface)) continue;
@ -55,12 +56,16 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
ec = wl_resource_get_user_data(surface_resource);
if (!ec->re_manage)
{
ec->re_manage = 1;
ec->comp_data->cursor = ec->re_manage = 1;
ec->ignored = 0;
ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1;
ec->icccm.title = eina_stringshare_add("noshadow");
evas_object_pass_events_set(ec->frame, 1);
evas_object_show(ec->frame);
if (e_comp_object_damage_exists(ec->frame))
e_comp_object_render_update_add(ec->frame);
ec->comp_data->mapped = 1;
e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec));
EC_CHANGED(ec);
}
@ -126,9 +131,13 @@ _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource)
e_comp_wl->kbd.resources =
eina_list_remove(e_comp_wl->kbd.resources, resource);
EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
if (res == resource)
e_comp_wl->kbd.focused =
eina_list_remove_list(e_comp_wl->kbd.focused, l);
{
if (res == resource)
{
e_comp_wl->kbd.focused =
eina_list_remove_list(e_comp_wl->kbd.focused, l);
}
}
}
void
@ -169,8 +178,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
wl_resource_get_version(resource), id);
if (!res)
{
ERR("Could not create keyboard on seat %s: %m",
e_comp_wl->seat.name);
ERR("Could not create keyboard on seat %s: %m", e_comp_wl->seat.name);
wl_client_post_no_memory(client);
return;
}
@ -187,8 +195,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
/* send current keymap */
wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
e_comp_wl->xkb.fd,
e_comp_wl->xkb.size);
e_comp_wl->xkb.fd, e_comp_wl->xkb.size);
/* if the client owns the focused surface, we need to send an enter */
focused = e_client_focused_get();
@ -210,31 +217,38 @@ _e_comp_wl_input_cb_touch_unbind(struct wl_resource *resource)
static void
_e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id EINA_UNUSED)
{
struct wl_resource *res;
struct wl_resource *res;
/* try to create pointer resource */
res = wl_resource_create(client, &wl_touch_interface,
wl_resource_get_version(resource), id);
if (!res)
{
ERR("Could not create touch on seat %s: %m",
e_comp_wl->seat.name);
wl_client_post_no_memory(client);
return;
}
res = wl_resource_create(client, &wl_touch_interface,
wl_resource_get_version(resource), id);
if (!res)
{
ERR("Could not create touch on seat %s: %m",
e_comp_wl->seat.name);
wl_client_post_no_memory(client);
return;
}
e_comp_wl->touch.resources =
e_comp_wl->touch.resources =
eina_list_append(e_comp_wl->touch.resources, res);
wl_resource_set_implementation(res, &_e_touch_interface,
e_comp->wl_comp_data,
wl_resource_set_implementation(res, &_e_touch_interface,
e_comp->wl_comp_data,
_e_comp_wl_input_cb_touch_unbind);
}
static void
_e_comp_wl_input_cb_release(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
wl_resource_destroy(resource);
}
static const struct wl_seat_interface _e_seat_interface =
{
_e_comp_wl_input_cb_pointer_get,
_e_comp_wl_input_cb_keyboard_get,
_e_comp_wl_input_cb_touch_get,
_e_comp_wl_input_cb_release,
};
static void
@ -321,7 +335,7 @@ static void
_e_comp_wl_input_keymap_update(struct xkb_keymap *keymap)
{
char *tmp;
xkb_mod_mask_t latched = 0, locked = 0, group = 0;
xkb_mod_mask_t latched = 0, locked = 0;
struct wl_resource *res;
Eina_List *l;
@ -343,18 +357,14 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap)
locked =
xkb_state_serialize_mods(e_comp_wl->xkb.state,
XKB_STATE_MODS_LOCKED);
group =
xkb_state_serialize_layout(e_comp_wl->xkb.state,
XKB_STATE_LAYOUT_EFFECTIVE);
xkb_state_unref(e_comp_wl->xkb.state);
}
/* create a new xkb state */
e_comp_wl->xkb.state = xkb_state_new(keymap);
if ((latched) || (locked) || (group))
xkb_state_update_mask(e_comp_wl->xkb.state, 0,
latched, locked, 0, 0, group);
xkb_state_update_mask(e_comp_wl->xkb.state, 0,
latched, locked, 0, 0, 0);
/* increment keymap reference */
e_comp_wl->xkb.keymap = keymap;
@ -403,8 +413,7 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap)
/* send updated keymap */
EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
e_comp_wl->xkb.fd,
e_comp_wl->xkb.size);
e_comp_wl->xkb.fd, e_comp_wl->xkb.size);
/* update modifiers */
e_comp_wl_input_keyboard_modifiers_update();
@ -501,23 +510,25 @@ e_comp_wl_input_keyboard_modifiers_serialize(void)
xkb_mod_mask_t mod;
xkb_layout_index_t grp;
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state,
XKB_STATE_DEPRESSED);
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_DEPRESSED);
changed |= mod != e_comp_wl->kbd.mod_depressed;
e_comp_wl->kbd.mod_depressed = mod;
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state,
XKB_STATE_MODS_LATCHED);
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LATCHED);
changed |= mod != e_comp_wl->kbd.mod_latched;
e_comp_wl->kbd.mod_latched = mod;
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state,
XKB_STATE_MODS_LOCKED);
mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LOCKED);
changed |= mod != e_comp_wl->kbd.mod_locked;
e_comp_wl->kbd.mod_locked = mod;
grp = xkb_state_serialize_layout(e_comp_wl->xkb.state,
XKB_STATE_LAYOUT_EFFECTIVE);
XKB_STATE_LAYOUT_EFFECTIVE);
if (grp != e_comp_wl->kbd.mod_group)
{
e_config->xkb.cur_group = grp;
ecore_event_add(E_EVENT_XKB_CHANGED, NULL, NULL, NULL);
}
changed |= grp != e_comp_wl->kbd.mod_group;
e_comp_wl->kbd.mod_group = grp;
return changed;
@ -532,7 +543,7 @@ e_comp_wl_input_keyboard_modifiers_update(void)
if (!e_comp_wl_input_keyboard_modifiers_serialize()) return;
if (!e_comp_wl->kbd.focused) return;
if ((!e_comp_wl->kbd.focused) || e_comp->input_key_grabs) return;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res)

View File

@ -52,6 +52,12 @@ static Eina_Hash *damages_hash = NULL;
static Eina_Hash *frame_extents = NULL;
static Eina_Hash *alarm_hash = NULL;
static Evas_Point mouse_in_coords = {-1, -1};
static Ecore_Job *mouse_in_job;
static E_Client *focus_job_client;
static Ecore_Job *focus_job;
static E_Client *unfocus_job_client;
static Ecore_Job *unfocus_job;
static Ecore_Idle_Enterer *_e_comp_x_post_client_idler = NULL;
static Ecore_Idle_Enterer *_x_idle_flush = NULL;
static Eina_List *post_clients = NULL;
@ -210,20 +216,21 @@ _e_comp_x_focus_setup(E_Client *ec)
static void
_e_comp_x_focus_setdown(E_Client *ec)
{
Ecore_X_Window win;
Ecore_X_Window win, pwin;
if (!_e_comp_x_client_data_get(ec)->button_grabbed) return;
if ((!e_client_focus_policy_click(ec)) ||
(e_config->always_click_to_raise) ||
(e_config->always_click_to_focus)) return;
win = e_client_util_win_get(ec);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win);
pwin = e_client_util_pwin_get(ec);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, pwin);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, pwin);
ecore_x_window_button_ungrab(win, 1, 0, 1);
ecore_x_window_button_ungrab(win, 2, 0, 1);
ecore_x_window_button_ungrab(win, 3, 0, 1);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, pwin);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, pwin);
_e_comp_x_client_data_get(ec)->button_grabbed = 0;
}
@ -969,10 +976,10 @@ _e_comp_x_client_hide(E_Client *ec)
if ((!ec->iconic) && (!ec->override))
ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_MAPPED, &visible, 1);
ec->comp_data->iconic = ec->iconic && (!e_comp_object_mirror_visibility_check(ec->frame));
if (ec->unredirected_single || ec->comp_data->iconic)
_e_comp_x_client_data_get(ec)->iconic = ec->iconic && (!e_comp_object_mirror_visibility_check(ec->frame));
if (ec->unredirected_single || _e_comp_x_client_data_get(ec)->iconic)
ecore_x_window_hide(_e_comp_x_client_window_get(ec));
if (ec->comp_data->iconic)
if (_e_comp_x_client_data_get(ec)->iconic)
e_hints_window_iconic_set(ec);
}
@ -982,6 +989,12 @@ _e_comp_x_evas_hide_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
E_Client *ec = data, *tmp;
Eina_List *l;
if (ec == mouse_client)
{
mouse_client = NULL;
E_FREE_FUNC(mouse_in_job, ecore_job_del);
}
if (!_e_comp_x_client_data_get(ec)) return; // already deleted, happens with internal wins
_e_comp_x_client_hide(ec);
@ -1002,13 +1015,13 @@ _e_comp_x_client_show(E_Client *ec)
win = e_client_util_win_get(ec);
ecore_x_window_shadow_tree_flush();
if (!_e_comp_x_client_data_get(ec)->need_reparent)
if ((!_e_comp_x_client_data_get(ec)->need_reparent) && (!ec->override))
ecore_x_window_show(win);
if (ec->unredirected_single || ec->comp_data->iconic)
if (ec->unredirected_single || _e_comp_x_client_data_get(ec)->iconic)
{
e_pixmap_clear(ec->pixmap);
ecore_x_window_show(_e_comp_x_client_window_get(ec));
ec->comp_data->iconic = 0;
_e_comp_x_client_data_get(ec)->iconic = 0;
}
if (!ec->override)
e_hints_window_visible_set(ec);
@ -1177,7 +1190,7 @@ _e_comp_x_evas_mirror_hidden(void *data, Evas_Object *obj EINA_UNUSED, void *eve
E_Client *ec = data;
if (!_e_comp_x_client_data_get(ec)) return;
if ((!ec->iconic) || (!ec->comp_data->iconic)) return;
if ((!ec->iconic) || (!_e_comp_x_client_data_get(ec)->iconic)) return;
_e_comp_x_client_hide(ec);
}
@ -1187,7 +1200,7 @@ _e_comp_x_evas_mirror_visible(void *data, Evas_Object *obj EINA_UNUSED, void *ev
E_Client *ec = data;
if (!_e_comp_x_client_data_get(ec)) return;
if ((!ec->iconic) || ec->comp_data->iconic) return;
if ((!ec->iconic) || _e_comp_x_client_data_get(ec)->iconic) return;
_e_comp_x_client_show(ec);
}
@ -1323,7 +1336,7 @@ _e_comp_x_show_helper(E_Client *ec)
evas_object_hide(ec->frame);
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
}
else if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
else if (ec->override || (ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_NORMAL))
evas_object_show(ec->frame);
_e_comp_x_client_data_get(ec)->first_map = 1;
if (ec->internal_elm_win)
@ -1561,8 +1574,8 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
return ECORE_CALLBACK_PASS_ON;
}
x = ox = ec->x;
y = oy = ec->y;
x = ox = ec->client.x;
y = oy = ec->client.y;
w = ow = ec->client.w;
h = oh = ec->client.h;
@ -1599,6 +1612,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
h = ev->h, _e_comp_x_client_data_get(ec)->initial_attributes.h = ev->h;
}
e_comp_object_frame_xy_adjust(ec->frame, x, y, &x, &y);
e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h);
move = (x != ec->x) || (y != ec->y);
@ -1610,8 +1624,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
{
E_Zone *zone;
ec->saved.x = x;
ec->saved.y = y;
e_comp_object_frame_xy_unadjust(ec->frame, x, y, &ec->saved.x, &ec->saved.y);
zone = e_comp_zone_xy_get(x, y);
if (zone && (zone->x || zone->y))
@ -1620,7 +1633,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
ec->saved.y -= zone->y;
}
}
else
else if (!ec->maximize_override)
{
/* client is completely outside the screen, policy does not allow */
if (((!E_INTERSECTS(x, y, ec->w, ec->h, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
@ -1642,12 +1655,9 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
if (resize && (!ec->lock_client_size) && (move || ((!ec->maximized) && (!ec->fullscreen))))
{
if ((ec->maximized & E_MAXIMIZE_TYPE) != E_MAXIMIZE_NONE)
{
ec->saved.w = w;
ec->saved.h = h;
}
else
if (ec->shaded || ((ec->maximized & E_MAXIMIZE_TYPE) != E_MAXIMIZE_NONE))
e_comp_object_frame_wh_unadjust(ec->frame, w, h, &ec->saved.w, &ec->saved.h);
else if (!ec->maximize_override)
{
evas_object_resize(ec->frame, w, h);
}
@ -2172,7 +2182,21 @@ _e_comp_x_message(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Cl
if (res)
wc = wl_resource_get_user_data(res);
if (wc)
e_comp_x_xwayland_client_setup(ec, wc);
{
if (wc->internal)
{
e_object_del(E_OBJECT(wc));
e_object_del(E_OBJECT(ec));
/* this is an xwayland bug. somehow the wrong surface is being passed
* and it's an internal surface--internal surfaces are NEVER
* xwayland clients.
*
* ever.
*/
return ECORE_CALLBACK_RENEW;
}
e_comp_x_xwayland_client_setup(ec, wc);
}
else
{
ec->comp_data->surface_id = ev->data.l[0];
@ -2217,10 +2241,7 @@ _e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E
e_comp_canvas_keys_ungrab();
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
Ecore_X_Window win;
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) continue;
win = e_client_util_win_get(ec);
if ((!_e_comp_x_client_data_get(ec)->first_map) || (!_e_comp_x_client_data_get(ec)->reparented)) continue;
if (ec->focused)
{
@ -2231,14 +2252,22 @@ _e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E
{
_e_comp_x_focus_setdown(ec);
_e_comp_x_focus_setup(ec);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
}
}
e_comp_canvas_keys_grab();
return ECORE_CALLBACK_PASS_ON;
}
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));
mouse_in_job = NULL;
}
static Eina_Bool
_e_comp_x_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Mouse_In *ev)
{
@ -2251,19 +2280,22 @@ _e_comp_x_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_M
{
if (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR)
{
if (ev->win != e_client_util_win_get(ec)) return ECORE_CALLBACK_RENEW;
if (ev->event_win != e_client_util_pwin_get(ec)) return ECORE_CALLBACK_RENEW;
if (ev->win != e_client_util_pwin_get(ec)) return ECORE_CALLBACK_RENEW;
if (ev->event_win != e_client_util_win_get(ec)) return ECORE_CALLBACK_RENEW;
}
if (ev->detail == ECORE_X_EVENT_DETAIL_VIRTUAL)
{
if (ev->win != e_client_util_pwin_get(ec)) return ECORE_CALLBACK_RENEW;
if (ev->event_win != e_client_util_win_get(ec)) return ECORE_CALLBACK_RENEW;
if (ev->win != e_client_util_win_get(ec)) return ECORE_CALLBACK_RENEW;
if (ev->event_win != e_client_util_pwin_get(ec)) return ECORE_CALLBACK_RENEW;
}
if (!evas_object_visible_get(ec->frame)) return ECORE_CALLBACK_RENEW;
}
if (_e_comp_x_client_data_get(ec)->deleted) return ECORE_CALLBACK_RENEW;
mouse_client = ec;
e_client_mouse_in(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_x_root_adjust(ev->root.y));
if (!mouse_in_job)
mouse_in_job = ecore_job_add(_e_comp_x_mouse_in_job, NULL);
mouse_in_coords.x = ev->root.x;
mouse_in_coords.y = ev->root.y;
return ECORE_CALLBACK_RENEW;
}
@ -2284,8 +2316,13 @@ _e_comp_x_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
ec = _e_comp_x_client_find_by_window(ev->win);
if (!ec) return ECORE_CALLBACK_RENEW;
if (_e_comp_x_client_data_get(ec)->deleted) return ECORE_CALLBACK_RENEW;
if (mouse_client == ec) mouse_client = NULL;
e_client_mouse_out(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_x_root_adjust(ev->root.y));
if (mouse_client == ec)
{
mouse_client = NULL;
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));
return ECORE_CALLBACK_RENEW;
}
@ -2390,7 +2427,8 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M
if (!evas_object_visible_get(tec->frame)) continue;
if (E_INSIDE(x, y, tec->x, tec->y, tec->w, tec->h)) return ECORE_CALLBACK_RENEW;
}
e_client_mouse_in(ec, x, y);
if (!mouse_in_job)
e_client_mouse_in(ec, x, y);
}
return ECORE_CALLBACK_RENEW;
}
@ -2810,6 +2848,7 @@ static Eina_Bool
_e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Shape *ev)
{
E_Client *ec;
Eina_Bool pshaped;
//const char *txt[] =
//{
//[ECORE_X_SHAPE_BOUNDING] = "BOUNDING",
@ -2819,6 +2858,7 @@ _e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wind
ec = _e_comp_x_client_find_by_window(ev->win);
if (!ec) return ECORE_CALLBACK_RENEW;
pshaped = ec->shaped;
//INF("%p(%s): %d,%d %dx%d || %d", ec, txt[ev->type], ev->x, ev->y, ev->w, ev->h, ev->shaped);
if (ev->win == e_client_util_win_get(ec))
{
@ -2845,8 +2885,11 @@ _e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wind
ec->need_shape_export = 1;
if (ec->changes.shape)
{
if (ev->type == ECORE_X_SHAPE_BOUNDING)
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
if ((ev->type == ECORE_X_SHAPE_BOUNDING) && (ec->shaped || (pshaped != ec->shaped)))
{
if (ec->shape_rects || (!ec->shaped))
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
}
}
EC_CHANGED(ec);
return ECORE_CALLBACK_PASS_ON;
@ -2863,8 +2906,6 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam
ec = _e_comp_x_client_find_by_damage(ev->damage);
if ((!ec) || e_object_is_del(E_OBJECT(ec))) return ECORE_CALLBACK_PASS_ON;
skip = ec->shape_rects_num > 50;
if (ec->override && (!_e_comp_x_client_data_get(ec)->first_damage))
skip = EINA_TRUE;
if (_e_comp_x_client_data_get(ec)->damage)
{
Ecore_X_Region parts;
@ -2882,7 +2923,7 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam
e_pixmap_dirty(ec->pixmap);
else if (skip)
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
else if (n)
else
{
int i;
@ -3118,8 +3159,8 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
ecore_x_window_show(pwin);
_e_comp_x_focus_init(ec);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, pwin);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, pwin);
_e_comp_x_client_evas_init(ec);
if (ec->netwm.ping && (!ec->ping_poller))
e_client_ping(ec);
@ -3360,8 +3401,8 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
ec->focus_policy_override = E_FOCUS_CLICK;
_e_comp_x_focus_setdown(ec);
_e_comp_x_focus_setup(ec);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, pwin);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, pwin);
if (!ec->netwm.state.skip_pager)
{
ec->netwm.state.skip_pager = 1;
@ -3449,11 +3490,15 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
ec->icccm.initial_state = ec->icccm.state;
if (state != ec->icccm.state)
{
ecore_x_icccm_state_set(win, ec->icccm.state);
if (ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
ec->ignored = 1, ec->visible = 0;
else
ec->changes.visible = ec->visible = 1;
{
ec->visible = 1;
ec->changes.visible = ec->new_client;
if (!ec->new_client)
evas_object_show(ec->frame);
}
}
ec->icccm.accepts_focus = accepts_focus;
ec->icccm.urgent = is_urgent;
@ -4273,9 +4318,9 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
ecl = ec->leader;
if (!ecl)
{
E_Client *child = e_client_bottom_get();
E_Client *child;
do
E_CLIENT_FOREACH(child)
{
if (child == ec) continue;
if (e_object_is_del(E_OBJECT(child))) continue;
@ -4286,8 +4331,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
ecl = child;
break;
}
child = e_client_above_get(child);
} while (child);
}
}
if (ecl)
{
@ -4394,6 +4438,10 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
*/
e_comp_object_frame_geometry_set(ec->frame,
-extents[0], -extents[1], -extents[2], -extents[3]);
if (ec->override &&
(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);
}
cd->fetch_gtk_frame_extents = 0;
@ -4416,7 +4464,8 @@ _e_comp_x_first_draw_delay_cb(void *data)
E_Client *ec = data;
_e_comp_x_client_data_get(ec)->first_draw_delay = NULL;
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
if (ec->shape_rects || (!ec->shaped))
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
return EINA_FALSE;
}
@ -4451,16 +4500,37 @@ _e_comp_x_hook_client_new(void *d EINA_UNUSED, E_Client *ec)
}
static void
_e_comp_x_hook_client_focus_unset(void *d EINA_UNUSED, E_Client *ec)
_e_comp_x_hook_client_focus_unset_job(void *d EINA_UNUSED)
{
E_Client *ec = unfocus_job_client;
unfocus_job = NULL;
if (!unfocus_job_client) return;
unfocus_job_client = NULL;
E_COMP_X_PIXMAP_CHECK;
_e_comp_x_focus_setup(ec);
_e_comp_x_focus_check();
}
static void
_e_comp_x_hook_client_focus_set(void *d EINA_UNUSED, E_Client *ec)
_e_comp_x_hook_client_focus_unset(void *d EINA_UNUSED, E_Client *ec)
{
if (focus_job_client == ec)
{
focus_job_client = NULL;
E_FREE_FUNC(focus_job, ecore_job_del);
}
unfocus_job_client = ec;
if (!unfocus_job)
unfocus_job = ecore_job_add(_e_comp_x_hook_client_focus_unset_job, NULL);
}
static void
_e_comp_x_hook_client_focus_set_job(void *d EINA_UNUSED)
{
E_Client *ec = focus_job_client;
focus_job = NULL;
if (!focus_job_client) return;
focus_job_client = NULL;
focus_time = ecore_x_current_time_get();
focus_canvas_time = 0;
if (!e_client_has_xwindow(ec))
@ -4485,6 +4555,19 @@ _e_comp_x_hook_client_focus_set(void *d EINA_UNUSED, E_Client *ec)
}
}
static void
_e_comp_x_hook_client_focus_set(void *d EINA_UNUSED, E_Client *ec)
{
if (unfocus_job_client == ec)
{
unfocus_job_client = NULL;
E_FREE_FUNC(unfocus_job, ecore_job_del);
}
focus_job_client = ec;
if (!focus_job)
focus_job = ecore_job_add(_e_comp_x_hook_client_focus_set_job, NULL);
}
static void
_e_comp_x_hook_client_redirect(void *d EINA_UNUSED, E_Client *ec)
{
@ -4543,13 +4626,15 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
cd = _e_comp_x_client_data_get(ec);
if (mouse_client == ec) mouse_client = NULL;
if (focus_job_client == ec) focus_job_client = NULL;
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 ((!ec->already_unparented) && cd && cd->reparented)
{
_e_comp_x_focus_setdown(ec);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, pwin);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, pwin);
if (!cd->deleted)
{
if (stopping)
@ -4620,7 +4705,14 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
e_pixmap_free(e_comp_x_client_pixmap_get(ec));
}
}
else
#endif
{
if (e_pixmap_free(ec->pixmap))
e_pixmap_client_set(ec->pixmap, NULL);
ec->pixmap = NULL;
}
if (post_clients)
post_clients = eina_list_remove(post_clients, ec);
@ -4905,9 +4997,6 @@ _e_comp_x_del(E_Comp *c)
ecore_x_window_key_ungrab(c->root, "F", ECORE_EVENT_MODIFIER_SHIFT |
ECORE_EVENT_MODIFIER_CTRL |
ECORE_EVENT_MODIFIER_ALT, 0);
ecore_x_window_key_ungrab(c->root, "Home", ECORE_EVENT_MODIFIER_SHIFT |
ECORE_EVENT_MODIFIER_CTRL |
ECORE_EVENT_MODIFIER_ALT, 0);
if (c->grabbed)
{
c->grabbed = 0;
@ -4928,6 +5017,9 @@ _e_comp_x_del(E_Comp *c)
eina_list_free(c->x_comp_data->retry_clients);
ecore_timer_del(c->x_comp_data->retry_timer);
E_FREE_FUNC(mouse_in_job, ecore_job_del);
E_FREE_FUNC(focus_job, ecore_job_del);
E_FREE_FUNC(unfocus_job, ecore_job_del);
free(c->x_comp_data);
}
@ -5080,8 +5172,8 @@ _e_comp_x_bindings_grab_cb(void)
else
{
_e_comp_x_focus_setup(ec);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_win_get(ec));
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_win_get(ec));
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
}
}
}
@ -5101,8 +5193,8 @@ _e_comp_x_bindings_ungrab_cb(void)
ecore_x_window_button_ungrab(win, 1, 0, 1);
ecore_x_window_button_ungrab(win, 2, 0, 1);
ecore_x_window_button_ungrab(win, 3, 0, 1);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
_e_comp_x_client_data_get(ec)->button_grabbed = 0;
}
}
@ -5236,14 +5328,14 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
e_alert_composite_win(root, e_comp->win);
if (!e_comp_x_randr_canvas_new(e_comp->win, w, h))
ecore_job_add(_e_comp_x_add_fail_job, NULL);
if (!e_comp->ee)
{
if (!e_comp_x_randr_canvas_new(e_comp->win, w, h))
ecore_job_add(_e_comp_x_add_fail_job, NULL);
}
ecore_x_composite_redirect_subwindows(root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
ecore_x_window_key_grab(root, "Home", ECORE_EVENT_MODIFIER_SHIFT |
ECORE_EVENT_MODIFIER_CTRL |
ECORE_EVENT_MODIFIER_ALT, 0);
ecore_x_window_key_grab(root, "F", ECORE_EVENT_MODIFIER_SHIFT |
ECORE_EVENT_MODIFIER_CTRL |
ECORE_EVENT_MODIFIER_ALT, 0);
@ -5293,6 +5385,7 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
e_comp->pointer->color = ecore_x_cursor_color_supported_get();
e_pointer_type_push(e_comp->pointer, e_comp->pointer, "default");
ecore_x_icccm_state_set(ecore_evas_window_get(e_comp->ee), ECORE_X_WINDOW_STATE_HINT_NORMAL);
e_startup();
}
else
e_pointer_window_add(e_comp->pointer, e_comp->root);
@ -5306,6 +5399,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)
{
@ -5321,12 +5415,18 @@ _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
e_comp_x_init(void)
{
Eina_List *h = NULL;
if (!ecore_x_init(NULL))
{
e_error_message_show(_("Enlightenment cannot initialize Ecore_X!\n"));
@ -5354,12 +5454,40 @@ e_comp_x_init(void)
"or Ecore was built without XDamage support."));
return EINA_FALSE;
}
if (!e_atoms_init()) return 0;
clients_win_hash = eina_hash_int32_new(NULL);
damages_hash = eina_hash_int32_new(NULL);
alarm_hash = 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));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_RESIZE_BEGIN, _e_comp_x_hook_client_resize_begin, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_RESIZE_END, _e_comp_x_hook_client_resize_end, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_MOVE_BEGIN, _e_comp_x_hook_client_move_begin, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_MOVE_END, _e_comp_x_hook_client_move_end, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_DEL, _e_comp_x_hook_client_del, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_NEW_CLIENT, _e_comp_x_hook_client_new, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_EVAL_FETCH, _e_comp_x_hook_client_fetch, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, _e_comp_x_hook_client_pre_frame_assign, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_UNREDIRECT, _e_comp_x_hook_client_unredirect, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_REDIRECT, _e_comp_x_hook_client_redirect, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_NEW_CLIENT, _e_comp_x_hook_client_post_new_client, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_FOCUS_SET, _e_comp_x_hook_client_focus_set, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_FOCUS_UNSET, _e_comp_x_hook_client_focus_unset, NULL));
h = eina_list_append(h, e_client_hook_add(E_CLIENT_HOOK_EVAL_END, _e_comp_x_hook_client_eval_end, NULL));
if (!_e_comp_x_screens_setup())
{
e_atoms_shutdown();
E_FREE_LIST(h, e_client_hook_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(frame_extents, eina_hash_free);
return 0;
}
E_LIST_HANDLER_APPEND(handlers, E_EVENT_COMP_OBJECT_ADD, _e_comp_x_object_add, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_DESTROY, _e_comp_x_destroy, NULL);
@ -5421,42 +5549,8 @@ e_comp_x_init(void)
if (!backlight_atom)
backlight_atom = ecore_x_atom_get("BACKLIGHT");
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
{
ecore_x_screensaver_event_listen_set(1);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_SCREENSAVER_NOTIFY, _e_comp_x_screensaver_notify_cb, NULL);
ecore_x_screensaver_custom_blanking_enable();
e_screensaver_attrs_set(ecore_x_screensaver_timeout_get(),
ecore_x_screensaver_blank_get(),
ecore_x_screensaver_expose_get());
}
ecore_x_passive_grab_replay_func_set(_e_comp_x_grab_replay, NULL);
e_client_hook_add(E_CLIENT_HOOK_DESK_SET, _e_comp_x_hook_client_desk_set, NULL);
e_client_hook_add(E_CLIENT_HOOK_RESIZE_BEGIN, _e_comp_x_hook_client_resize_begin, NULL);
e_client_hook_add(E_CLIENT_HOOK_RESIZE_END, _e_comp_x_hook_client_resize_end, NULL);
e_client_hook_add(E_CLIENT_HOOK_MOVE_BEGIN, _e_comp_x_hook_client_move_begin, NULL);
e_client_hook_add(E_CLIENT_HOOK_MOVE_END, _e_comp_x_hook_client_move_end, NULL);
e_client_hook_add(E_CLIENT_HOOK_DEL, _e_comp_x_hook_client_del, NULL);
e_client_hook_add(E_CLIENT_HOOK_NEW_CLIENT, _e_comp_x_hook_client_new, NULL);
e_client_hook_add(E_CLIENT_HOOK_EVAL_FETCH, _e_comp_x_hook_client_fetch, NULL);
e_client_hook_add(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, _e_comp_x_hook_client_pre_frame_assign, NULL);
e_client_hook_add(E_CLIENT_HOOK_UNREDIRECT, _e_comp_x_hook_client_unredirect, NULL);
e_client_hook_add(E_CLIENT_HOOK_REDIRECT, _e_comp_x_hook_client_redirect, NULL);
e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_NEW_CLIENT, _e_comp_x_hook_client_post_new_client, NULL);
e_client_hook_add(E_CLIENT_HOOK_FOCUS_SET, _e_comp_x_hook_client_focus_set, NULL);
e_client_hook_add(E_CLIENT_HOOK_FOCUS_UNSET, _e_comp_x_hook_client_focus_unset, NULL);
e_client_hook_add(E_CLIENT_HOOK_EVAL_END, _e_comp_x_hook_client_eval_end, NULL);
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
{
e_desklock_show_hook_add(_e_comp_x_desklock_show);
e_desklock_hide_hook_add(_e_comp_x_desklock_hide);
}
if (!e_atoms_init()) return 0;
if (!_e_comp_x_screens_setup()) return EINA_FALSE;
if (!e_xsettings_init())
e_error_message_show(_("Enlightenment cannot initialize the XSettings system.\n"));
E_LIST_HANDLER_APPEND(handlers, E_EVENT_RANDR_CHANGE, _e_comp_x_randr_change, NULL);
@ -5466,6 +5560,15 @@ e_comp_x_init(void)
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
{
ecore_x_screensaver_event_listen_set(1);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_SCREENSAVER_NOTIFY, _e_comp_x_screensaver_notify_cb, NULL);
ecore_x_screensaver_custom_blanking_enable();
e_screensaver_attrs_set(ecore_x_screensaver_timeout_get(),
ecore_x_screensaver_blank_get(),
ecore_x_screensaver_expose_get());
e_desklock_show_hook_add(_e_comp_x_desklock_show);
e_desklock_hide_hook_add(_e_comp_x_desklock_hide);
int timeout = e_screensaver_timeout_get(EINA_TRUE);
ecore_x_screensaver_set(timeout + 10,
0,
@ -5478,7 +5581,7 @@ e_comp_x_init(void)
}
else
e_dnd_init();
eina_list_free(h);
return EINA_TRUE;
}

View File

@ -55,7 +55,13 @@ _output_screen_get(Ecore_X_Window root, Ecore_X_Randr_Output o)
if (!edid) return NULL;
name = ecore_x_randr_edid_display_name_get(edid, len);
free(edid);
return name;
if (name)
{
char *name2 = strdup(name);
free(name);
return name2;
}
return NULL;
}
static Ecore_X_Randr_Edid_Display_Interface_Type
@ -76,7 +82,12 @@ _output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output o)
{
// get the output name - like connector (hdmi-0, dp1, dvi-0-1 etc.)
char *name = ecore_x_randr_output_name_get(root, o, NULL);
if (name) return name;
if (name)
{
char *name2 = strdup(name);
free(name);
return name2;
}
return _output_screen_get(root, o);
}
@ -525,6 +536,7 @@ e_comp_x_randr_config_apply(void)
ecore_x_randr_crtc_info_free(info);
break;
}
ecore_x_randr_crtc_info_free(info);
}
}
}

View File

@ -56,6 +56,7 @@ E_API int E_EVENT_CONFIG_MODE_CHANGED = 0;
E_API int E_EVENT_CONFIG_LOADED = 0;
static E_Dialog *_e_config_error_dialog = NULL;
static Eina_List *handlers = NULL;
typedef struct _E_Color_Class
{
@ -65,6 +66,24 @@ typedef struct _E_Color_Class
int r3, g3, b3, a3;
} E_Color_Class;
static Eina_Bool
_e_config_cb_efreet_cache_update(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
{
if (e_config)
{
if (e_config->icon_theme)
{
if (!efreet_icon_theme_find(e_config->icon_theme))
{
eina_stringshare_replace(&e_config->icon_theme, "hicolor");
e_config_save_queue();
}
}
}
return ECORE_CALLBACK_RENEW;
}
static void
_e_config_error_dialog_cb_delete(void *dia)
{
@ -308,6 +327,7 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, prop.w, INT);
E_CONFIG_VAL(D, T, prop.h, INT);
E_CONFIG_VAL(D, T, prop.layer, INT);
E_CONFIG_VAL(D, T, prop.maximize, UINT);
E_CONFIG_VAL(D, T, prop.lock_user_location, UCHAR);
E_CONFIG_VAL(D, T, prop.lock_client_location, UCHAR);
E_CONFIG_VAL(D, T, prop.lock_user_size, UCHAR);
@ -932,12 +952,21 @@ e_config_init(void)
e_config_load();
e_config_save_queue();
E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_DESKTOP_CACHE_UPDATE,
_e_config_cb_efreet_cache_update, NULL);
E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_ICON_CACHE_UPDATE,
_e_config_cb_efreet_cache_update, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CONFIG_ICON_THEME,
_e_config_cb_efreet_cache_update, NULL);
return 1;
}
EINTERN int
e_config_shutdown(void)
{
E_FREE_LIST(handlers, ecore_event_handler_del);
eina_stringshare_del(_e_config_profile);
E_CONFIG_DD_FREE(_e_config_binding_edd);
E_CONFIG_DD_FREE(_e_config_bindings_mouse_edd);
@ -1831,7 +1860,7 @@ e_config_profile_save(void)
{
e_user_dir_snprintf(bsrc, sizeof(bsrc), "config/profile.cfg");
e_user_dir_snprintf(bdst, sizeof(bdst), "config/profile.1.cfg");
ret = ecore_file_mv(bsrc, bdst);
ecore_file_mv(bsrc, bdst);
// if (!ret)
// _e_config_mv_error(bsrc, bdst);
}

View File

@ -9,6 +9,7 @@ struct _E_DBusMenu_Ctx
void *data;
E_DBusMenu_Pop_Request_Cb pop_request_cb;
E_DBusMenu_Update_Cb update_cb;
Eina_Bool hacks : 1;
};
static const char *Menu_Item_Type_Names[] =
@ -31,6 +32,8 @@ static const char *Menu_Item_Event_Names[] =
"clicked", "hovered", "opened", "closed"
};
static void proxy_init(E_DBusMenu_Ctx *ctx);
static int
id_find(const char *text, const char *array_of_names[], unsigned max)
{
@ -197,6 +200,46 @@ dbus_menu_free(E_DBusMenu_Item *m)
free(m);
}
static Eina_Bool
attempt_hacks(E_DBusMenu_Ctx *ctx)
{
/* https://phab.enlightenment.org/T3139 */
Eldbus_Object *obj;
Eldbus_Connection *conn;
const char *bus, *p;
int n;
char buf[1024] = {0}, buf2[1024] = {0};
if (ctx->hacks) return EINA_FALSE;
obj = eldbus_proxy_object_get(ctx->proxy);
conn = eldbus_object_connection_get(obj);
bus = eldbus_object_bus_name_get(obj);
if (bus[0] != ':') return EINA_FALSE;
/* if this is a qt5 app, menu bus is $bus + 2
* ...probably
*/
p = strchr(bus + 1, '.');
if (!p) return EINA_FALSE;
p++;
if (!p[0]) return EINA_FALSE;
n = strtol(p, NULL, 10);
if (n == -1) return EINA_FALSE;
n += 2;
if ((unsigned int)(p - bus) > sizeof(buf) - 1) return EINA_FALSE;
strncpy(buf, bus, p - bus);
snprintf(buf2, sizeof(buf2), "%s%d", buf, n);
E_FREE_FUNC(ctx->root_menu, dbus_menu_free);
eldbus_proxy_unref(ctx->proxy);
eldbus_object_unref(obj);
obj = eldbus_object_get(conn, buf2, "/MenuBar");
ctx->proxy = eldbus_proxy_get(obj, DBUS_MENU_IFACE);
proxy_init(ctx);
ctx->hacks = 1;
return EINA_TRUE;
}
static void
layout_get_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
@ -220,6 +263,15 @@ layout_get_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EIN
m = parse_layout(layout, NULL, ctx);
m->revision = revision;
if (m->is_submenu && (!m->parent) && (!m->sub_items))
{
if (attempt_hacks(ctx))
{
dbus_menu_free(m);
return;
}
}
if (ctx->update_cb)
ctx->update_cb(ctx->data, m);
if (ctx->root_menu)
@ -270,32 +322,6 @@ menu_pop_request(void *data, const Eldbus_Message *msg)
ctx->pop_request_cb(ctx->data, m);
}
static void
icon_theme_path_get_cb(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
const char *error, *error_msg;
Eldbus_Message_Iter *var, *array;
const char *path;
if (eldbus_message_error_get(msg, &error, &error_msg))
{
ERR("%s %s", error, error_msg);
return;
}
if (!eldbus_message_arguments_get(msg, "v", &var) ||
!eldbus_message_iter_arguments_get(var, "as", &array))
{
ERR("Error reading message.");
return;
}
while (eldbus_message_iter_get_and_next(array, 's', &path))
{
//TODO
}
}
static void
prop_changed_cb(void *data EINA_UNUSED, const Eldbus_Message *msg)
{
@ -337,6 +363,23 @@ layout_updated_cb(void *data, const Eldbus_Message *msg EINA_UNUSED)
layout_update(ctx);
}
static void
proxy_init(E_DBusMenu_Ctx *ctx)
{
layout_update(ctx);
eldbus_proxy_signal_handler_add(ctx->proxy,
"ItemActivationRequested",
menu_pop_request, ctx);
eldbus_proxy_properties_changed_callback_add(ctx->proxy,
prop_changed_cb, ctx);
eldbus_proxy_signal_handler_add(ctx->proxy, "ItemsPropertiesUpdated",
layout_updated_cb, ctx);
eldbus_proxy_signal_handler_add(ctx->proxy, "LayoutUpdated",
layout_updated_cb, ctx);
}
E_API E_DBusMenu_Ctx *
e_dbusmenu_load(Eldbus_Connection *conn, const char *bus, const char *path, const void *data)
{
@ -353,21 +396,7 @@ e_dbusmenu_load(Eldbus_Connection *conn, const char *bus, const char *path, cons
eldbus_connection_ref(conn);
obj = eldbus_object_get(conn, bus, path);
ctx->proxy = eldbus_proxy_get(obj, DBUS_MENU_IFACE);
layout_update(ctx);
eldbus_proxy_signal_handler_add(ctx->proxy,
"ItemActivationRequested",
menu_pop_request, ctx);
eldbus_proxy_property_get(ctx->proxy, "IconThemePath",
icon_theme_path_get_cb, ctx);
eldbus_proxy_properties_changed_callback_add(ctx->proxy,
prop_changed_cb, ctx);
eldbus_proxy_signal_handler_add(ctx->proxy, "ItemsPropertiesUpdated",
layout_updated_cb, ctx);
eldbus_proxy_signal_handler_add(ctx->proxy, "LayoutUpdated",
layout_updated_cb, ctx);
proxy_init(ctx);
return ctx;
}

View File

@ -13,7 +13,7 @@ typedef void (*E_Desk_Flip_Cb)(void *data, E_Desk *desk, int dx, int dy, Eina_Bo
#ifndef E_DESK_H
#define E_DESK_H
#define E_DESK_TYPE 0xE0b01005
#define E_DESK_TYPE (int)0xE0b01005
typedef enum
{

View File

@ -312,6 +312,17 @@ _e_deskmirror_mirror_frame_recalc_cb(void *data, Evas_Object *obj EINA_UNUSED, v
mb->m->comp_object = NULL;
}
static void
_e_deskmirror_mirror_color_set_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
Mirror *m = data;
int r, g, b, a;
if (!m->mirror) return;
evas_object_color_get(obj, &r, &g, &b, &a);
evas_object_color_set(m->mirror, r, g, b, a);
}
static void
_mirror_client_smart_add(Evas_Object *obj)
{
@ -490,6 +501,7 @@ _e_deskmirror_mirror_del_hash(Mirror *m)
m->sd->mirrors = eina_inlist_remove(m->sd->mirrors, EINA_INLIST_GET(m));
evas_object_smart_callback_del_full(m->comp_object, "dirty", _comp_object_dirty, m);
evas_object_smart_callback_del_full(m->comp_object, "frame_recalc_done", _e_deskmirror_mirror_frame_recalc_cb, m);
evas_object_smart_callback_del_full(m->comp_object, "color_set", _e_deskmirror_mirror_color_set_cb, m);
evas_object_event_callback_del_full(m->comp_object, EVAS_CALLBACK_DEL, _e_deskmirror_mirror_del_cb, m);
evas_object_del(m->mirror);
m->mirror = NULL;
@ -687,6 +699,7 @@ _e_deskmirror_mirror_add(E_Smart_Data *sd, Evas_Object *obj)
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, (Evas_Object_Event_Cb)_comp_object_configure, m);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, (Evas_Object_Event_Cb)_comp_object_configure, m);
evas_object_smart_callback_add(obj, "frame_recalc_done", _e_deskmirror_mirror_frame_recalc_cb, m);
evas_object_smart_callback_add(obj, "color_set", _e_deskmirror_mirror_color_set_cb, m);
if (ec && (!ec->redirected) && (!ec->new_client) && e_pixmap_usable_get(ec->pixmap))
evas_object_smart_callback_add(obj, "dirty", _comp_object_dirty, m);
sd->mirrors = eina_inlist_append(sd->mirrors, EINA_INLIST_GET(m));

View File

@ -188,7 +188,7 @@ _e_drag_finalize(E_Drag *drag, E_Drag_Type type, int x, int y)
}
#endif
}
e_bindings_disabled_set(1);
_drag_current = drag;
return 1;
}
@ -985,13 +985,11 @@ _e_drag_end(int x, int y)
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
if (!(dropped = ecore_x_dnd_drop()))
{
if (win == e_comp->ee_win) break;
}
break;
}
else
#endif
if ((e_comp->comp_type == E_PIXMAP_TYPE_WL) && (win == e_comp->ee_win))
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
break;
if (_drag_current->cb.finished)
_drag_current->cb.finished(_drag_current, dropped);
@ -1156,8 +1154,7 @@ _e_drag_free(E_Drag *drag)
ecore_x_window_shadow_tree_flush();
}
#endif
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
e_comp_ungrab_input(1, 1);
e_bindings_disabled_set(0);
_drag_win = 0;
}

View File

@ -411,7 +411,6 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
E_Exec_Launch *launch;
Eina_List *l, *lnew;
Ecore_Exe *exe = NULL;
const char *penv_display;
char buf[4096];
launch = data;
@ -425,53 +424,6 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
if (startup_id < 0) startup_id = 0;
}
if (++startup_id < 1) startup_id = 1;
/* save previous env vars we need to save */
penv_display = getenv("DISPLAY");
if ((penv_display) && (launch->zone))
{
const char *p1, *p2;
char buf2[32];
char *buf3 = NULL;
int head_length;
int penv_display_length;
penv_display_length = strlen(penv_display);
/* Check for insane length for DISPLAY env */
if (penv_display_length + 32 > 4096)
{
free(inst);
return NULL;
}
/* buf2 = '.%i' */
*buf2 = '.';
head_length = eina_convert_itoa(0, buf2 + 1) + 2;
/* set env vars */
p1 = strrchr(penv_display, ':');
p2 = strrchr(penv_display, '.');
if ((p1) && (p2) && (p2 > p1)) /* "blah:x.y" */
{
buf3 = alloca((p2 - penv_display) + head_length + 1);
memcpy(buf3, penv_display, p2 - penv_display);
memcpy(buf3 + (p2 - penv_display), buf2, head_length);
}
else if (p1) /* "blah:x */
{
buf3 = alloca(penv_display_length + head_length);
memcpy(buf3, penv_display, penv_display_length);
memcpy(buf3 + penv_display_length, buf2, head_length);
}
else
{
buf3 = alloca(penv_display_length + 1);
memcpy(buf3, penv_display, penv_display_length + 1);
}
e_util_env_set("DISPLAY", buf3);
}
snprintf(buf, sizeof(buf), "E_START|%i", startup_id);
e_util_env_set("DESKTOP_STARTUP_ID", buf);
@ -565,8 +517,6 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
exe = ecore_exe_run(exec, inst);
}
if (penv_display)
e_util_env_set("DISPLAY", penv_display);
if (!exe)
{
free(inst);
@ -660,6 +610,7 @@ _e_exec_instance_free(E_Exec_Instance *inst)
if (!inst->deleted)
{
inst->deleted = 1;
inst->ref++;
ecore_event_add(E_EVENT_EXEC_DEL, inst, _e_exec_cb_exec_del_free, inst);
return;
}
@ -712,7 +663,10 @@ _e_exec_cb_exec_new_free(void *data, void *ev EINA_UNUSED)
static void
_e_exec_cb_exec_del_free(void *data, void *ev EINA_UNUSED)
{
_e_exec_instance_free(data);
E_Exec_Instance *inst = data;
inst->ref--;
_e_exec_instance_free(inst);
}
static Eina_Bool

View File

@ -233,7 +233,7 @@ e_flowlayout_pack_end(Evas_Object *obj, Evas_Object *child)
sd->items = eina_list_append(sd->items, child);
sd->changed = 1;
if (sd->frozen <= 0) _e_flowlayout_smart_reconfigure(sd);
return (int)(eina_list_count(sd->items) - 1);
return (int)eina_list_count(sd->items) - 1;
}
E_API int

View File

@ -2351,7 +2351,11 @@ e_fm2_icon_geometry_get(E_Fm2_Icon *ic, int *x, int *y, int *w, int *h)
{
int xx, yy, ww, hh;
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
if (x) *x = 0;
if (y) *y = 0;
if (w) *w = 0;
if (h) *h = 0;
if (ic)
{
evas_object_geometry_get(ic->obj, &xx, &yy, &ww, &hh);
@ -10417,9 +10421,8 @@ _e_fm2_icon_entry_widget_add(E_Fm2_Icon *ic)
ic->entry_widget = e_widget_entry_add(e_win_evas_win_get(e), NULL, NULL, NULL, NULL);
evas_object_event_callback_add(ic->entry_widget, EVAS_CALLBACK_KEY_DOWN,
_e_fm2_icon_entry_widget_cb_key_down, ic);
#ifndef HAVE_WAYLAND_ONLY
evas_event_feed_mouse_out(evas_object_evas_get(ic->obj), ecore_x_current_time_get(), NULL);
#endif
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
evas_event_feed_mouse_out(evas_object_evas_get(ic->obj), 0, NULL);
if (e_comp->evas == e)
e_comp_grab_input(0, 1);
ic->keygrab = (e_comp->evas == e);
@ -10432,9 +10435,8 @@ _e_fm2_icon_entry_widget_add(E_Fm2_Icon *ic)
e_widget_entry_select_all(ic->entry_widget);
ic->sd->iop_icon = ic;
ic->sd->typebuf.disabled = EINA_TRUE;
#ifndef HAVE_WAYLAND_ONLY
evas_event_feed_mouse_in(e, ecore_x_current_time_get(), NULL);
#endif
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
evas_event_feed_mouse_in(e, 0, NULL);
return ic->entry_widget;
}

View File

@ -1016,12 +1016,10 @@ _e_fm_ipc_file_add_mod(E_Dir *ed, const char *path, E_Fm_Op_Type op, int listing
struct stat st;
char *lnk = NULL, *rlnk = NULL;
int broken_lnk = 0;
int bsz = 0;
unsigned char *p, buf
Eina_Binbuf *buf;
/* file add/change format is as follows:
*
* stat_info[stat size] + broken_link[1] + path[n]\0 + lnk[n]\0 + rlnk[n]\0 */
[sizeof(struct stat) + 1 + 4096 + 4096 + 4096];
/* FIXME: handle BACKOFF */
if ((!listing) && (op == E_FM_OP_FILE_CHANGE) && (!ed->cleaning)) /* 5 == mod */
@ -1082,29 +1080,21 @@ _e_fm_ipc_file_add_mod(E_Dir *ed, const char *path, E_Fm_Op_Type op, int listing
if (!lnk) lnk = strdup("");
if (!rlnk) rlnk = strdup("");
p = buf;
buf = eina_binbuf_new();
/* NOTE: i am NOT converting this data to portable arch/os independent
* format. i am ASSUMING e_fm_main and e are local and built together
* and thus this will work. if this ever changes this here needs to
* change */
memcpy(buf, &st, sizeof(struct stat));
p += sizeof(struct stat);
eina_binbuf_append_length(buf, (void*)&st, sizeof(struct stat));
p[0] = broken_lnk;
p += 1;
eina_binbuf_append_char(buf, !!broken_lnk);
eina_binbuf_append_length(buf, (void*)path, strlen(path) + 1);
eina_binbuf_append_length(buf, (void*)lnk, strlen(lnk) + 1);
eina_binbuf_append_length(buf, (void*)rlnk, strlen(rlnk) + 1);
strcpy((char *)p, path);
p += strlen(path) + 1;
strcpy((char *)p, lnk);
p += strlen(lnk) + 1;
strcpy((char *)p, rlnk);
p += strlen(rlnk) + 1;
bsz = p - buf;
ecore_ipc_server_send(_e_fm_ipc_server, 6 /*E_IPC_DOMAIN_FM*/, op, 0, ed->id,
listing, buf, bsz);
listing, eina_binbuf_string_get(buf), eina_binbuf_length_get(buf));
eina_binbuf_free(buf);
free(lnk);
free(rlnk);
}

View File

@ -1,33 +1,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca(size_t);
#endif
#include "e.h"
#ifdef __linux__
#include <features.h>
#endif
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <Eet.h>
#include <Eeze.h>
#include <Eeze_Disk.h>

View File

@ -1,52 +1,4 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca(size_t);
#endif
#ifdef __linux__
#include <features.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/param.h>
#include <utime.h>
#include <math.h>
#include <fnmatch.h>
#include <limits.h>
#include <ctype.h>
#include <time.h>
#include <dirent.h>
#include <pwd.h>
#include <glob.h>
#include <errno.h>
#include <signal.h>
#include <Ecore.h>
#include <Ecore_Ipc.h>
#include <Ecore_File.h>
#include <Eet.h>
#include <Eldbus.h>
#include "e.h"
#include "e_fm_shared_device.h"
#include "e_fm_shared_codec.h"
#include "e_fm_ipc.h"

View File

@ -1,52 +1,4 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca(size_t);
#endif
#ifdef __linux__
#include <features.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/param.h>
#include <utime.h>
#include <math.h>
#include <fnmatch.h>
#include <limits.h>
#include <ctype.h>
#include <time.h>
#include <dirent.h>
#include <pwd.h>
#include <glob.h>
#include <errno.h>
#include <signal.h>
#include <Ecore.h>
#include <Ecore_Ipc.h>
#include <Ecore_File.h>
#include <Eet.h>
#include <Eldbus.h>
#include "e.h"
#include "e_fm_shared_device.h"
#include "e_fm_shared_codec.h"
#include "e_fm_ipc.h"

View File

@ -321,7 +321,6 @@ e_fm2_op_registry_entry_listener_add(E_Fm2_Op_Registry_Entry *entry, void (*cb)(
{
E_Fm2_Op_Registry_Entry_Internal *e;
E_Fm2_Op_Registry_Entry_Listener *listener;
Eina_Error err;
if ((!entry) || (!cb))
{
@ -341,14 +340,6 @@ e_fm2_op_registry_entry_listener_add(E_Fm2_Op_Registry_Entry *entry, void (*cb)(
e = _e_fm2_op_registry_entry_internal_get(entry);
e->listeners = eina_inlist_append(e->listeners, EINA_INLIST_GET(listener));
err = eina_error_get();
if (err)
{
printf("could not add listener: %s\n", eina_error_msg_get(err));
if (free_data) free_data((void *)data);
free(listener);
return;
}
}
/**

View File

@ -250,6 +250,7 @@ e_gadcon_shutdown(void)
if (_module_init_end_handler)
ecore_event_handler_del(_module_init_end_handler);
_module_init_end_handler = NULL;
E_LIST_FOREACH(gadcons, e_gadcon_unpopulate);
return 1;
}

View File

@ -80,6 +80,7 @@ _e_grab_dialog_free(E_Grab_Dialog *eg)
e_comp_ungrab_input(1, 1);
}
E_FREE_LIST(eg->handlers, ecore_event_handler_del);
e_bindings_disabled_set(0);
e_object_del(E_OBJECT(eg->dia));
free(eg);
@ -162,6 +163,7 @@ e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_
}
e_dialog_show(eg->dia);
evas_object_layer_set(e_win_client_get(eg->dia->win)->frame, E_LAYER_CLIENT_PRIO);
e_bindings_disabled_set(1);
return eg;
}

View File

@ -35,9 +35,6 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
ecore_x_pointer_ungrab();
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
ecore_wl_input_ungrab(ecore_wl_input_get());
#endif
grab_mouse_win = 0;
}
@ -46,9 +43,6 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
ecore_x_keyboard_ungrab();
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
ecore_wl_input_ungrab(ecore_wl_input_get());
#endif
grab_key_win = 0;
@ -66,14 +60,6 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
ret = ecore_x_pointer_grab(mouse_win);
if (!ret) return 0;
}
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
Ecore_Wl_Window *wl_win;
if ((wl_win = ecore_wl_window_find(mouse_win)))
ecore_wl_input_grab(ecore_wl_input_get(), wl_win, 0);
}
#endif
grab_mouse_win = mouse_win;
}
@ -95,14 +81,6 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
return 0;
}
}
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
Ecore_Wl_Window *wl_win;
if ((wl_win = ecore_wl_window_find(key_win)))
ecore_wl_input_grab(ecore_wl_input_get(), wl_win, 0);
}
#endif
grab_key_win = key_win;
}
@ -120,9 +98,6 @@ e_grabinput_release(Ecore_Window mouse_win, Ecore_Window key_win)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
ecore_x_pointer_ungrab();
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
ecore_wl_input_ungrab(ecore_wl_input_get());
#endif
grab_mouse_win = 0;
@ -132,9 +107,6 @@ e_grabinput_release(Ecore_Window mouse_win, Ecore_Window key_win)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
ecore_x_keyboard_ungrab();
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
ecore_wl_input_ungrab(ecore_wl_input_get());
#endif
grab_key_win = 0;
@ -191,10 +163,6 @@ e_grabinput_mouse_win_get(void)
static void
_e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
{
#ifdef HAVE_WAYLAND
Ecore_Wl_Window *wl_win;
#endif
/* fprintf(stderr, "focus to %x method %i\n", win, method); */
switch (method)
{
@ -205,18 +173,9 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp_util_has_x())
{
ecore_x_window_focus_at_time(win, ecore_x_current_time_get());
ecore_x_window_focus(win);
ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get());
}
#endif
#ifdef HAVE_WAYLAND
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
if ((wl_win = ecore_wl_window_find(win)))
{
/* FIXME: Need to add an ecore_wl_window_focus function */
}
}
#endif
break;
@ -224,29 +183,13 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp_util_has_x())
ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get());
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
if ((wl_win = ecore_wl_window_find(win)))
{
/* FIXME: Need to add an ecore_wl_window_focus function */
}
}
#endif
break;
case E_FOCUS_METHOD_PASSIVE:
#ifndef HAVE_WAYLAND_ONLY
if (e_comp_util_has_x())
ecore_x_window_focus_at_time(win, ecore_x_current_time_get());
#else
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
{
if ((wl_win = ecore_wl_window_find(win)))
{
/* FIXME: Need to add an ecore_wl_window_focus function */
}
}
ecore_x_window_focus(win);
#endif
break;

View File

@ -1283,15 +1283,13 @@ e_hints_window_hidden_set(E_Client *ec)
(void)ec;
#else
if (!e_client_has_xwindow(ec)) return;
if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
ecore_x_icccm_state_set(e_client_util_win_get(ec), ECORE_X_WINDOW_STATE_HINT_WITHDRAWN);
if (ec->netwm.state.hidden)
{
ec->netwm.update.state = 1;
ec->netwm.state.hidden = 0;
EC_CHANGED(ec);
}
ecore_x_window_prop_property_del(e_client_util_win_get(ec), ECORE_X_ATOM_WM_STATE);
_e_hints_process_wakeup(ec);
#endif
}

View File

@ -224,7 +224,7 @@ e_int_client_menu_create(E_Client *ec)
e_menu_item_submenu_set(mi, subm);
e_object_unref(E_OBJECT(subm));
e_object_data_set(E_OBJECT(subm), e_comp);
if (e_pixmap_type_get(ec->pixmap) == E_PIXMAP_TYPE_X)
if (e_pixmap_is_x(ec->pixmap) && (e_comp->nocomp_ec != ec))
{
mi = e_menu_item_new(subm);
e_menu_item_check_set(mi, 1);
@ -259,7 +259,7 @@ e_int_client_menu_show(E_Client *ec, Evas_Coord x, Evas_Coord y, int key, unsign
e_menu_activate_key(ec->border_menu, ec->zone, x, y, 1, 1,
E_MENU_POP_DIRECTION_DOWN);
else
e_menu_activate_mouse(ec->border_menu, ec->zone, x, y, 1, 1,
e_menu_activate_mouse(ec->border_menu, e_zone_current_get(), x, y, 1, 1,
E_MENU_POP_DIRECTION_DOWN, timestamp);
}

View File

@ -255,8 +255,11 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
of = e_widget_framelist_add(evas, _("Behavior"), 0);
ob = e_widget_check_add(evas, _("Smooth scaling"), &(cfdata->smooth_windows));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Don't composite fullscreen windows"), &(cfdata->nocomp_fs));
e_widget_framelist_object_append(of, ob);
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
ob = e_widget_check_add(evas, _("Don't composite fullscreen windows"), &(cfdata->nocomp_fs));
e_widget_framelist_object_append(of, ob);
}
ob = e_widget_check_add(evas, _("Don't fade backlight"), &(cfdata->nofade));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
@ -300,47 +303,24 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
///////////////////////////////////////////
ol = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("X Messages"), 0);
ob = e_widget_check_add(evas, _("Send flush"), &(cfdata->send_flush));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Send dump"), &(cfdata->send_dump));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
of = e_widget_framelist_add(evas, _("X Messages"), 0);
ob = e_widget_check_add(evas, _("Send flush"), &(cfdata->send_flush));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Send dump"), &(cfdata->send_dump));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
/*
ob = e_widget_check_add(evas, _("Keep hidden windows"), &(cfdata->keep_unmapped));
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
of = e_widget_frametable_add(evas, _("Maximum hidden pixels"), 0);
e_widget_frametable_content_align_set(of, 0.5, 0.5);
rg = e_widget_radio_group_new(&(cfdata->max_unmapped_pixels));
ob = e_widget_radio_add(evas, _("1M"), 1 * 1024, rg);
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("2M"), 2 * 1024, rg);
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("4M"), 4 * 1024, rg);
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("8M"), 8 * 1024, rg);
e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("16M"), 16 * 1024, rg);
e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("32M"), 32 * 1024, rg);
e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("64M"), 64 * 1024, rg);
e_widget_frametable_object_append(of, ob, 2, 0, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("128M"), 128 * 1024, rg);
e_widget_frametable_object_append(of, ob, 2, 1, 1, 1, 1, 1, 0, 0);
ob = e_widget_radio_add(evas, _("256M"), 256 * 1024, rg);
e_widget_frametable_object_append(of, ob, 2, 2, 1, 1, 1, 1, 0, 0);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
*/
of = e_widget_framelist_add(evas, _("Sync"), 0);
ob = e_widget_check_add(evas, _("Grab Server during draw"), &(cfdata->grab));
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Initial draw timeout for newly mapped windows"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%1.2f Seconds"), 0.01, 0.5, 0.01, 0, &(cfdata->first_draw_delay), NULL, 150);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Sync"), 0);
ob = e_widget_check_add(evas, _("Grab Server during draw"), &(cfdata->grab));
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Initial draw timeout for newly mapped windows"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%1.2f Seconds"), 0.01, 0.5, 0.01, 0, &(cfdata->first_draw_delay), NULL, 150);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
}
of = e_widget_framelist_add(evas, _("DANGEROUS"), 0);
ob = e_widget_check_add(evas, _("Enable advanced compositing features"), &(cfdata->enable_advanced_features));
e_widget_framelist_object_append(of, ob);
@ -590,8 +570,11 @@ _basic_create_widgets(E_Config_Dialog *cfd,
ob = e_widget_check_add(evas, _("Smooth scaling of window content"), &(cfdata->smooth_windows));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Don't composite fullscreen windows"), &(cfdata->nocomp_fs));
e_widget_framelist_object_append(of, ob);
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
ob = e_widget_check_add(evas, _("Don't composite fullscreen windows"), &(cfdata->nocomp_fs));
e_widget_framelist_object_append(of, ob);
}
e_widget_list_object_append(ol, of, 1, 0, 0.5);
@ -601,10 +584,6 @@ _basic_create_widgets(E_Config_Dialog *cfd,
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("OpenGL"), E_COMP_ENGINE_GL, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("To reset compositor:"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Ctrl+Alt+Shift+Home"));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 0, 0.5);

View File

@ -92,7 +92,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->fit_along = cfdata->escfg->fit_along;
/* size */
cfdata->size = cfdata->escfg->size;
cfdata->size = MAX(cfdata->escfg->size, 20);
/* style */
if (cfdata->escfg->style)
@ -207,7 +207,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
/* size */
ol = e_widget_list_add(evas, 0, 0);
ow = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels"), 4, 256, 4, 0,
ow = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels"), 20, 256, 4, 0,
NULL, &(cfdata->size), 100);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
ow = e_widget_check_add(evas, _("Shrink to Content Width"),

View File

@ -536,8 +536,8 @@ _e_intl_locale_alias_get(const char *language)
{
Eina_Hash *alias_hash;
char *alias;
char llbuf[256];
char *lower_language = llbuf;
char lbuf[256];
char *lower_language = lbuf;
if ((!language) || (!strncmp(language, "POSIX", strlen("POSIX"))))
return strdup("C");
@ -546,8 +546,8 @@ _e_intl_locale_alias_get(const char *language)
if (!alias_hash) /* No alias file available */
return strdup(language);
strncpy(lower_language, language, sizeof(lower_language) - 1);
lower_language[sizeof(lower_language) - 1] = '\0';
strncpy(lbuf, language, sizeof(lbuf) - 1);
lbuf[sizeof(lbuf) - 1] = '\0';
eina_str_tolower(&lower_language);
alias = eina_hash_find(alias_hash, lower_language);

View File

@ -4,7 +4,6 @@ EINTERN char *e_ipc_socket = NULL;
#ifdef USE_IPC
/* local subsystem functions */
static Eina_Bool _e_ipc_cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
static Eina_Bool _e_ipc_cb_client_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
static Eina_Bool _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
@ -17,7 +16,7 @@ EINTERN int
e_ipc_init(void)
{
char buf[4096], buf2[128], buf3[4096];
char *tmp, *user, *disp, *disp2, *base;
char *tmp, *user, *base;
int pid, trynum = 0, id1 = 0;
struct stat st;
@ -71,15 +70,6 @@ e_ipc_init(void)
}
}
disp = getenv("DISPLAY");
if (!disp) disp = ":0";
else
{
/* $DISPLAY may be a path (e.g. Xquartz), keep the basename. */
disp2 = strrchr(disp, '/');
if (disp2) disp = disp2 + 1;
}
e_util_env_set("E_IPC_SOCKET", "");
pid = (int)getpid();
@ -87,17 +77,11 @@ e_ipc_init(void)
{
snprintf(buf, sizeof(buf), "%s/e-%s@%x",
base, user, id1);
if (mkdir(buf, S_IRWXU) < 0)
goto retry;
if (stat(buf, &st) < 0)
goto retry;
if ((st.st_uid == getuid()) &&
((st.st_mode & (S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)) ==
(S_IRWXU | S_IFDIR)))
if (!mkdir(buf, S_IRWXU))
{
#ifdef USE_IPC
snprintf(buf3, sizeof(buf3), "%s/%s-%i",
buf, disp, pid);
snprintf(buf3, sizeof(buf3), "%s/%i",
buf, pid);
_e_ipc_server = ecore_ipc_server_add
(ECORE_IPC_LOCAL_SYSTEM, buf3, 0, NULL);
if (_e_ipc_server)
@ -107,7 +91,6 @@ e_ipc_init(void)
break;
}
}
retry:
id1 = rand();
}
#ifdef USE_IPC
@ -119,8 +102,6 @@ retry:
INF("E_IPC_SOCKET=%s", buf3);
e_util_env_set("E_IPC_SOCKET", buf3);
ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_ADD,
_e_ipc_cb_client_add, NULL);
ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DEL,
_e_ipc_cb_client_del, NULL);
ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DATA,
@ -148,17 +129,6 @@ e_ipc_shutdown(void)
#ifdef USE_IPC
/* local subsystem globals */
static Eina_Bool
_e_ipc_cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Ipc_Event_Client_Add *e;
e = event;
if (ecore_ipc_client_server_get(e->client) != _e_ipc_server)
return ECORE_CALLBACK_PASS_ON;
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_e_ipc_cb_client_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
@ -188,48 +158,6 @@ _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
case E_IPC_DOMAIN_REQUEST:
case E_IPC_DOMAIN_REPLY:
case E_IPC_DOMAIN_EVENT:
switch (e->minor)
{
case E_IPC_OP_EXEC_ACTION:
{
E_Ipc_2Str *req = NULL;
if (e_ipc_codec_2str_dec(e->data, e->size, &req))
{
int len, ok = 0;
void *d;
E_Action *act = e_action_find(req->str1);
if ((act) && (act->func.go))
{
act->func.go(E_OBJECT(e_comp), req->str2);
ok = 1;
}
d = e_ipc_codec_int_enc(ok, &len);
if (d)
{
ecore_ipc_client_send(e->client,
E_IPC_DOMAIN_REPLY,
E_IPC_OP_EXEC_ACTION_REPLY,
0, 0, 0, d, len);
free(d);
}
if (req)
{
E_FREE(req->str1);
E_FREE(req->str2);
E_FREE(req);
}
}
}
break;
default:
break;
}
break;
case E_IPC_DOMAIN_THUMB:

View File

@ -4,9 +4,6 @@ EINTERN extern char *e_ipc_socket;
#ifdef USE_IPC
#define E_IPC_OP_EXEC_ACTION 386
#define E_IPC_OP_EXEC_ACTION_REPLY 387
typedef enum _E_Ipc_Domain
{
E_IPC_DOMAIN_NONE,

View File

@ -27,8 +27,18 @@ _e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, cons
EINTERN int
e_log_init(void)
{
const char *bt_level;
e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
eina_log_print_cb_set(_e_log_cb, NULL);
bt_level = getenv("EINA_LOG_BACKTRACE");
if (bt_level)
{
int level;
level = strtol(bt_level, NULL, 10);
if (level < 1)
eina_log_print_cb_set(_e_log_cb, NULL);
}
return e_log_dom != -1;
}

View File

@ -327,6 +327,21 @@ 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");
@ -450,7 +465,8 @@ main(int argc, char **argv)
_e_main_shutdown(-1);
}
TS("Emotion Init Done");
_e_main_shutdown_push((void *)emotion_shutdown);
/* triggers event flush: do not call */
//_e_main_shutdown_push((void *)emotion_shutdown);
/* e doesn't sync to compositor - it should be one */
ecore_evas_app_comp_sync_set(0);
@ -485,14 +501,6 @@ main(int argc, char **argv)
}
TS("Ecore_Evas Engine Check Done");
TS("Edje Init");
if (!edje_init())
{
e_error_message_show(_("Enlightenment cannot initialize Edje!\n"));
_e_main_shutdown(-1);
}
TS("Edje Init Done");
_e_main_shutdown_push(edje_shutdown);
edje_freeze();
/*** Initialize E Subsystems We Need ***/
@ -625,7 +633,17 @@ main(int argc, char **argv)
if (e_config->show_splash)
e_init_status_set(_("Setup Message Bus"));
TS("E_Msgbus Init");
if (e_msgbus_init())
if (!e_msgbus_init())
{
if (!getenv("E_NO_DBUS_SESSION"))
{
e_error_message_show(_("Enlightenment cannot create a dbus session connection.\n"
"At best this will break many things, at worst it will hard lock your machine.\n"
"If you're sure you know what you're doing, export E_NO_DBUS_SESSION=1"));
_e_main_shutdown(-1);
}
}
else
_e_main_shutdown_push(e_msgbus_shutdown);
TS("E_Msgbus Init Done");
@ -1003,9 +1021,9 @@ main(int argc, char **argv)
if (!nostartup)
{
if (after_restart)
e_startup(E_STARTUP_RESTART);
e_startup_mode_set(E_STARTUP_RESTART);
else
e_startup(E_STARTUP_START);
e_startup_mode_set(E_STARTUP_START);
}
TS("Run Startup Apps Done");

View File

@ -189,6 +189,8 @@ e_menu_hide_all(void)
if (m->post_deactivate_cb.func)
m->post_deactivate_cb.func(m->post_deactivate_cb.data, m);
m->active = 0;
if (m->comp_object == e_comp->autoclose.obj)
e_comp_object_util_autoclose(NULL, NULL, NULL, NULL);
_e_menu_unrealize(m);
m->in_active_list = 0;
e_object_unref(E_OBJECT(m));
@ -1184,6 +1186,7 @@ e_menu_idler_before(void)
{
e_comp_ungrab_input(1, 1);
_e_menu_win = 0;
e_bindings_disabled_set(0);
}
}
}
@ -1878,6 +1881,7 @@ _e_menu_activate_internal(E_Menu *m, E_Zone *zone)
_e_menu_win = 0;
return;
}
e_bindings_disabled_set(1);
}
m->zone = zone;
if (!m->active)
@ -2699,9 +2703,13 @@ _e_menu_cb_key_down(void *data EINA_UNUSED, Ecore_Event_Key *ev)
*/
static void
_e_menu_cb_mouse_evas_down(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED)
_e_menu_cb_mouse_evas_down(void *data, Evas_Object *obj EINA_UNUSED)
{
_e_menu_deactivate_all();
E_Menu *m = data;
while (m->parent_item)
m = m->parent_item->menu;
e_menu_deactivate(m);
}
static Eina_Bool

View File

@ -3,46 +3,43 @@
E_API int
e_mouse_update(void)
{
unsigned char map[256] = { 0 };
int n;
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
unsigned char map[256] = { 0 };
int n;
if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
e_config->mouse_accel_denominator,
e_config->mouse_accel_threshold))
return 0;
if (!ecore_x_pointer_mapping_get(map, 256)) return 0;
}
#endif
for (n = 0; n < 256; n++)
{
if (!map[n]) break;
}
if (n < 3)
{
map[0] = 1;
map[1] = 2;
map[2] = 3;
n = 3;
}
if (e_config->mouse_hand == E_MOUSE_HAND_RIGHT)
{
map[0] = 1;
map[2] = 3;
}
else if (e_config->mouse_hand == E_MOUSE_HAND_LEFT)
{
map[0] = 3;
map[2] = 1;
}
for (n = 0; n < 256; n++)
{
if (!map[n]) break;
}
if (n < 3)
{
map[0] = 1;
map[1] = 2;
map[2] = 3;
n = 3;
}
if (e_config->mouse_hand == E_MOUSE_HAND_RIGHT)
{
map[0] = 1;
map[2] = 3;
}
else if (e_config->mouse_hand == E_MOUSE_HAND_LEFT)
{
map[0] = 3;
map[2] = 1;
}
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
if (!ecore_x_pointer_mapping_set(map, n)) return 0;
if (!ecore_x_pointer_mapping_set(map, n)) return 0;
}
#endif
return 1;

View File

@ -69,12 +69,169 @@ hints_dict_iter(void *data, const void *key, Eldbus_Message_Iter *var)
}
}
/* this function should be external in edje for use in cases such as this module.
*
* happily, it was decided that the function would not be external so that it could
* be duplicated into the module in full.
*/
static int
_text_escape(Eina_Strbuf *txt, const char *text)
{
const char *escaped;
int advance;
escaped = evas_textblock_string_escape_get(text, &advance);
if (!escaped)
{
eina_strbuf_append_char(txt, text[0]);
advance = 1;
}
else
eina_strbuf_append(txt, escaped);
return advance;
}
/* hardcoded list of allowed tags based on
* https://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#markup
*/
static const char *tags[] =
{
"<b",
"<i",
"<u",
//"<a", FIXME: we can't actually display these right now
//"<img",
};
static const char *
_get_tag(const char *c)
{
unsigned int i;
if (c[1] != '>') return NULL;
for (i = 0; i < EINA_C_ARRAY_LENGTH(tags); i++)
if (tags[i][1] == c[0]) return tags[i];
return NULL;
}
char *
_nedje_text_escape(const char *text)
{
Eina_Strbuf *txt;
char *ret;
const char *text_end;
size_t text_len;
Eina_Array *arr;
const char *cur_tag = NULL;
if (!text) return NULL;
txt = eina_strbuf_new();
text_len = strlen(text);
arr = eina_array_new(3);
text_end = text + text_len;
while (text < text_end)
{
int advance;
if ((text[0] == '<') && text[1])
{
const char *tag, *popped;
Eina_Bool closing = EINA_FALSE;
if (text[1] == '/') //closing tag
{
closing = EINA_TRUE;
tag = _get_tag(text + 2);
}
else
tag = _get_tag(text + 1);
if (closing)
{
if (cur_tag && (tag != cur_tag))
{
/* tag mismatch: autoclose all failure tags
* not technically required by the spec,
* but it makes me feel better about myself
*/
do
{
popped = eina_array_pop(arr);
if (eina_array_count(arr))
cur_tag = eina_array_data_get(arr, eina_array_count(arr) - 1);
else
cur_tag = NULL;
eina_strbuf_append_printf(txt, "</%c>", popped[1]);
} while (cur_tag && (popped != tag));
advance = 4;
}
else if (cur_tag)
{
/* tag match: just pop */
popped = eina_array_pop(arr);
if (eina_array_count(arr))
cur_tag = eina_array_data_get(arr, eina_array_count(arr) - 1);
else
cur_tag = NULL;
eina_strbuf_append_printf(txt, "</%c>", popped[1]);
advance = 4;
}
else
{
/* no current tag: escape */
advance = _text_escape(txt, text);
}
}
else
{
if (tag)
{
cur_tag = tag;
eina_array_push(arr, tag);
eina_strbuf_append_printf(txt, "<%c>", tag[1]);
advance = 3;
}
else
advance = _text_escape(txt, text);
}
}
else if (text[0] == '&')
{
const char *s;
s = strchr(text, ';');
if (s)
s = evas_textblock_escape_string_range_get(text, s + 1);
if (s)
{
eina_strbuf_append_char(txt, text[0]);
advance = 1;
}
else
advance = _text_escape(txt, text);
}
else
advance = _text_escape(txt, text);
text += advance;
}
eina_array_free(arr);
ret = eina_strbuf_string_steal(txt);
eina_strbuf_free(txt);
return ret;
}
static Eldbus_Message *
notify_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
E_Notification_Notify *n;
Eldbus_Message_Iter *actions_iter, *hints_iter;
Eldbus_Message *reply;
char *txt;
if (!n_data->notify_cb)
return NULL;
@ -100,7 +257,9 @@ notify_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Messag
n->app_name = eina_stringshare_add(n->app_name);
n->icon.icon = eina_stringshare_add(n->icon.icon);
n->summary = eina_stringshare_add(n->summary);
n->body = eina_stringshare_add(n->body);
txt = _nedje_text_escape(n->body);
n->body = eina_stringshare_add(txt);
free(txt);
e_object_ref(E_OBJECT(n));
n->id = n_data->notify_cb(n_data->data, n);
@ -193,7 +352,6 @@ e_notification_server_register(const E_Notification_Server_Info *server_info, E_
n_data = calloc(1, sizeof(Notification_Data));
EINA_SAFETY_ON_NULL_RETURN_VAL(n_data, EINA_FALSE);
eldbus_init();
n_data->conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
n_data->iface = eldbus_service_interface_register(n_data->conn, PATH, &desc);
n_data->notify_cb = n_cb;
@ -212,7 +370,6 @@ e_notification_server_unregister(void)
EINA_SAFETY_ON_NULL_RETURN(n_data);
eldbus_service_interface_unregister(n_data->iface);
eldbus_connection_unref(n_data->conn);
eldbus_shutdown();
free(n_data);
n_data = NULL;
}

View File

@ -8,6 +8,7 @@
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
#include <sys/wait.h>
# ifdef E_API
# undef E_API
@ -562,7 +563,7 @@ main(int argc, char *argv[])
}
free(cmds);
return ret;
return WEXITSTATUS(ret);
}
}

View File

@ -26,7 +26,7 @@ struct _E_Pixmap
E_Client *client;
E_Pixmap_Type type;
uint64_t win;
int64_t win;
Ecore_Window parent;
int w, h;
@ -42,11 +42,13 @@ struct _E_Pixmap
#ifdef HAVE_WAYLAND
E_Comp_Wl_Buffer *buffer;
E_Comp_Wl_Buffer_Ref buffer_ref;
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
Eina_Bool usable : 1;
@ -55,15 +57,36 @@ struct _E_Pixmap
};
#ifdef HAVE_WAYLAND
static void
_e_pixmap_cb_deferred_buffer_destroy(struct wl_listener *listener, void *data EINA_UNUSED)
{
E_Comp_Wl_Buffer *buffer;
buffer = container_of(listener, E_Comp_Wl_Buffer, deferred_destroy_listener);
buffer->discarding_pixmap->free_buffers = eina_list_remove(buffer->discarding_pixmap->free_buffers, buffer);
buffer->discarding_pixmap = NULL;
}
static void
_e_pixmap_cb_buffer_destroy(struct wl_listener *listener, void *data EINA_UNUSED)
{
E_Pixmap *cp;
cp = container_of(listener, E_Pixmap, buffer_destroy_listener);
cp->data = NULL;
cp->buffer = NULL;
cp->buffer_destroy_listener.notify = NULL;
}
static void
_e_pixmap_cb_held_buffer_destroy(struct wl_listener *listener, void *data EINA_UNUSED)
{
E_Pixmap *cp;
cp = container_of(listener, E_Pixmap, held_buffer_destroy_listener);
cp->held_buffer = NULL;
cp->held_buffer_destroy_listener.notify = NULL;
}
#endif
static void
@ -79,7 +102,7 @@ _e_pixmap_clear(E_Pixmap *cp, Eina_Bool cache)
{
ecore_x_pixmap_free(cp->pixmap);
cp->pixmap = 0;
ecore_x_e_comp_pixmap_set(cp->parent ?: cp->win, 0);
ecore_x_e_comp_pixmap_set(cp->parent ?: (Ecore_X_Window)cp->win, 0);
e_pixmap_image_clear(cp, cache);
}
#endif
@ -102,6 +125,67 @@ _e_pixmap_image_clear_x(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
}
#endif
#ifdef HAVE_WAYLAND
static void
_e_pixmap_wayland_buffer_release(E_Pixmap *cp, E_Comp_Wl_Buffer *buffer)
{
if (!buffer) return;
if (e_comp->rendering)
{
if (buffer->discarding_pixmap) return;
buffer->discarding_pixmap = cp;
buffer->deferred_destroy_listener.notify = _e_pixmap_cb_deferred_buffer_destroy;
wl_signal_add(&buffer->destroy_signal, &buffer->deferred_destroy_listener);
cp->free_buffers = eina_list_append(cp->free_buffers, buffer);
return;
}
buffer->busy--;
if (buffer->busy) return;
wl_resource_queue_event(buffer->resource, WL_BUFFER_RELEASE);
wl_shm_pool_unref(buffer->pool);
buffer->pool = NULL;
}
static void
_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);
b->deferred_destroy_listener.notify = NULL;
_e_pixmap_wayland_buffer_release(cp, b);
b->discarding_pixmap = NULL;
}
}
static void
_e_pixmap_wayland_image_clear(E_Pixmap *cp)
{
EINA_SAFETY_ON_NULL_RETURN(cp);
if (!cp->held_buffer) return;
if (!cp->held_buffer->pool) return;
_e_pixmap_wayland_buffer_release(cp, cp->held_buffer);
if (cp->held_buffer_destroy_listener.notify)
{
wl_list_remove(&cp->held_buffer_destroy_listener.link);
cp->held_buffer_destroy_listener.notify = NULL;
}
cp->data = NULL;
cp->held_buffer = NULL;
}
#endif
static void
_e_pixmap_free(E_Pixmap *cp)
{
@ -124,6 +208,12 @@ _e_pixmap_free(E_Pixmap *cp)
break;
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
_e_pixmap_wayland_image_clear(cp);
if (cp->buffer_destroy_listener.notify)
{
wl_list_remove(&cp->buffer_destroy_listener.link);
cp->buffer_destroy_listener.notify = NULL;
}
#endif
break;
default:
@ -153,7 +243,7 @@ _e_pixmap_find(E_Pixmap_Type type, va_list *l)
Ecore_X_Window xwin;
#endif
#ifdef HAVE_WAYLAND
uintptr_t id;
int64_t id;
#endif
E_Pixmap *cp;
@ -170,7 +260,7 @@ _e_pixmap_find(E_Pixmap_Type type, va_list *l)
break;
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
id = va_arg(*l, uintptr_t);
id = va_arg(*l, int64_t);
cp = eina_hash_find(aliases[type], &id);
if (!cp) cp = eina_hash_find(pixmaps[type], &id);
return cp;
@ -208,7 +298,7 @@ e_pixmap_new(E_Pixmap_Type type, ...)
Ecore_X_Window xwin;
#endif
#ifdef HAVE_WAYLAND
uintptr_t id;
int64_t id;
#endif
EINA_SAFETY_ON_TRUE_RETURN_VAL((type != E_PIXMAP_TYPE_WL) && (type != E_PIXMAP_TYPE_X), NULL);
@ -236,7 +326,7 @@ e_pixmap_new(E_Pixmap_Type type, ...)
break;
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
id = va_arg(l, uintptr_t);
id = va_arg(l, int64_t);
if (pixmaps[type])
{
cp = eina_hash_find(pixmaps[type], &id);
@ -247,7 +337,7 @@ e_pixmap_new(E_Pixmap_Type type, ...)
}
}
else
pixmaps[type] = eina_hash_pointer_new((Eina_Free_Cb)_e_pixmap_free);
pixmaps[type] = eina_hash_int64_new((Eina_Free_Cb)_e_pixmap_free);
cp = _e_pixmap_new(type);
cp->win = id;
eina_hash_add(pixmaps[type], &id, cp);
@ -372,7 +462,7 @@ e_pixmap_refresh(E_Pixmap *cp)
int pw, ph;
E_Comp_X_Client_Data *cd = NULL;
pixmap = ecore_x_composite_name_window_pixmap_get(cp->parent ?: cp->win);
pixmap = ecore_x_composite_name_window_pixmap_get(cp->parent ?: (Ecore_X_Window)cp->win);
if (cp->client)
{
cd = (E_Comp_X_Client_Data*)cp->client->comp_data;
@ -394,7 +484,7 @@ e_pixmap_refresh(E_Pixmap *cp)
ecore_x_pixmap_free(cp->pixmap);
cp->pixmap = pixmap;
cp->w = pw, cp->h = ph;
ecore_x_e_comp_pixmap_set(cp->parent ?: cp->win, cp->pixmap);
ecore_x_e_comp_pixmap_set(cp->parent ?: (Ecore_X_Window)cp->win, cp->pixmap);
e_pixmap_image_clear(cp, 0);
}
else
@ -519,7 +609,7 @@ e_pixmap_find_client(E_Pixmap_Type type, ...)
return (!cp) ? NULL : cp->client;
}
E_API uint64_t
E_API int64_t
e_pixmap_window_get(E_Pixmap *cp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, 0);
@ -546,7 +636,25 @@ e_pixmap_resource_set(E_Pixmap *cp, void *resource)
{
if ((!cp) || (cp->type != E_PIXMAP_TYPE_WL)) return;
#ifdef HAVE_WAYLAND
if (cp->buffer == resource) return;
if (cp->buffer)
{
cp->buffer->busy--;
if (!cp->buffer->busy) wl_resource_queue_event(cp->buffer->resource, WL_BUFFER_RELEASE);
}
if (cp->buffer_destroy_listener.notify)
{
wl_list_remove(&cp->buffer_destroy_listener.link);
cp->buffer_destroy_listener.notify = NULL;
}
cp->buffer = resource;
if (!cp->buffer) return;
cp->buffer_destroy_listener.notify = _e_pixmap_cb_buffer_destroy;
wl_signal_add(&cp->buffer->destroy_signal,
&cp->buffer_destroy_listener);
cp->buffer->busy++;
#else
(void)resource;
#endif
@ -580,6 +688,7 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns)
break;
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
if (!cp->buffer) return EINA_FALSE;
ns->type = EVAS_NATIVE_SURFACE_WL;
ns->version = EVAS_NATIVE_SURFACE_VERSION;
ns->data.wl.legacy_buffer = cp->buffer->resource;
@ -606,7 +715,7 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
#endif
#ifdef HAVE_WAYLAND
if (cp->type == E_PIXMAP_TYPE_WL)
if (!cp->buffer_ref.buffer) return;
if (!cp->buffer) return;
#endif
}
@ -635,22 +744,24 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
{
E_Comp_Wl_Client_Data *cd;
struct wl_resource *cb;
Eina_List *free_list;
if (!e_comp->rendering) _e_pixmap_wl_buffers_free(cp);
if ((!cp->client) || (!cp->client->comp_data)) return;
cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
EINA_LIST_FREE(cd->frames, cb)
/* The destroy callback will remove items from the frame list
* so we move the list to a temporary before walking it here
*/
free_list = cd->frames;
cd->frames = NULL;
EINA_LIST_FREE(free_list, cb)
{
wl_callback_send_done(cb, ecore_time_unix_get() * 1000);
wl_resource_destroy(cb);
}
}
if (cp->buffer_destroy_listener.notify)
{
wl_list_remove(&cp->buffer_destroy_listener.link);
cp->buffer_destroy_listener.notify = NULL;
}
e_comp_wl_buffer_reference(&cp->buffer_ref, NULL);
cp->data = NULL;
#endif
break;
default:
@ -688,27 +799,22 @@ e_pixmap_image_refresh(E_Pixmap *cp)
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
{
E_Comp_Wl_Buffer *buffer = cp->buffer;
struct wl_shm_buffer *shm_buffer;
if (cp->held_buffer == cp->buffer) return EINA_TRUE;
shm_buffer = buffer->shm_buffer;
if (cp->buffer_ref.buffer && (cp->buffer_ref.buffer != buffer))
{
/* FIXME: wtf? */
}
else if (cp->buffer_ref.buffer) return EINA_TRUE;
e_comp_wl_buffer_reference(&cp->buffer_ref, buffer);
if (cp->held_buffer) _e_pixmap_wayland_image_clear(cp);
if (cp->buffer_destroy_listener.notify)
{
wl_list_remove(&cp->buffer_destroy_listener.link);
cp->buffer_destroy_listener.notify = NULL;
}
if (!cp->buffer->shm_buffer) return EINA_TRUE;
cp->buffer_destroy_listener.notify = _e_pixmap_cb_buffer_destroy;
wl_signal_add(&buffer->destroy_signal, &cp->buffer_destroy_listener);
if (shm_buffer)
cp->data = wl_shm_buffer_get_data(shm_buffer);
cp->held_buffer = cp->buffer;
if (!cp->held_buffer) return EINA_TRUE;
cp->held_buffer->pool = wl_shm_buffer_ref_pool(cp->held_buffer->shm_buffer);
cp->held_buffer->busy++;
cp->data = wl_shm_buffer_get_data(cp->buffer->shm_buffer);
cp->held_buffer_destroy_listener.notify = _e_pixmap_cb_held_buffer_destroy;
wl_signal_add(&cp->held_buffer->destroy_signal,
&cp->held_buffer_destroy_listener);
return EINA_TRUE;
}
#endif
@ -749,7 +855,7 @@ e_pixmap_image_is_argb(const E_Pixmap *cp)
#endif
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
return ((cp->buffer_ref.buffer != NULL) && (cp->image_argb));
return ((cp->buffer != NULL) && (cp->image_argb));
#endif
default: break;
}
@ -800,36 +906,7 @@ e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Recta
break;
case E_PIXMAP_TYPE_WL:
if (cp->image_argb) return EINA_TRUE;
#ifdef HAVE_WAYLAND
if (cp->buffer_ref.buffer)
{
struct wl_shm_buffer *shm_buffer;
uint32_t format;
int i, x, y;
unsigned int *src, *dst;
shm_buffer = cp->buffer_ref.buffer->shm_buffer;
if (!shm_buffer) return EINA_FALSE;
format = wl_shm_buffer_get_format(shm_buffer);
if (format == WL_SHM_FORMAT_XRGB8888)
{
dst = (unsigned int *)pix;
src = (unsigned int *)ipix;
for (y = 0; y < r->h; y++)
{
i = (r->y + y) * stride / 4 + r->x;
for (x = 0; x < r->w; x++)
dst[i+x] = 0xff000000 | src[i+x];
}
pix = (void *)dst;
}
return EINA_TRUE;
}
#endif
break;
return EINA_FALSE;
default:
break;
}
@ -899,7 +976,7 @@ e_pixmap_alias(E_Pixmap *cp, E_Pixmap_Type type, ...)
Ecore_X_Window xwin;
#endif
#ifdef HAVE_WAYLAND
uintptr_t id;
int64_t id;
#endif
va_start(l, type);
@ -915,9 +992,9 @@ e_pixmap_alias(E_Pixmap *cp, E_Pixmap_Type type, ...)
break;
case E_PIXMAP_TYPE_WL:
#ifdef HAVE_WAYLAND
id = va_arg(l, uintptr_t);
id = va_arg(l, int64_t);
if (!aliases[type])
aliases[type] = eina_hash_pointer_new(NULL);
aliases[type] = eina_hash_int64_new(NULL);
eina_hash_set(aliases[type], &id, cp);
#endif
break;

View File

@ -36,7 +36,7 @@ E_API void e_pixmap_client_set(E_Pixmap *cp, E_Client *ec);
E_API E_Client *e_pixmap_client_get(E_Pixmap *cp);
E_API E_Pixmap *e_pixmap_find(E_Pixmap_Type type, ...);
E_API E_Client *e_pixmap_find_client(E_Pixmap_Type type, ...);
E_API uint64_t e_pixmap_window_get(E_Pixmap *cp);
E_API int64_t e_pixmap_window_get(E_Pixmap *cp);
E_API Ecore_Window e_pixmap_parent_window_get(E_Pixmap *cp);
E_API Eina_Bool e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns);
E_API void e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache);

View File

@ -29,7 +29,7 @@ e_place_zone_region_smart_cleanup(E_Zone *zone)
/* Insert the ec if larger than the current ec */
if (area >= testarea)
{
clients = eina_list_prepend_relative(clients, ec2, ec);
clients = eina_list_prepend_relative_list(clients, ec, ll);
break;
}
}
@ -41,10 +41,12 @@ e_place_zone_region_smart_cleanup(E_Zone *zone)
/* Loop over the clients moving each one using the smart placement */
EINA_LIST_FREE(clients, ec)
{
int new_x, new_y;
int new_x = zone->x, new_y = zone->y;
Eina_List *l = eina_list_append(NULL, ec);
e_place_zone_region_smart(zone, clients, ec->x, ec->y,
e_place_zone_region_smart(zone, l, zone->x, zone->y,
ec->w, ec->h, &new_x, &new_y);
eina_list_free(l);
evas_object_move(ec->frame, new_x, new_y);
}
}
@ -55,22 +57,44 @@ _e_place_cb_sort_cmp(const void *v1, const void *v2)
return (*((int *)v1)) - (*((int *)v2));
}
static Eina_Bool
ignore_client_and_break(const E_Client *ec)
{
if (ec->fullscreen) return EINA_TRUE;
if (ec->maximized)
{
E_Maximize max = ec->maximized & E_MAXIMIZE_DIRECTION;
if (max == E_MAXIMIZE_FULLSCREEN) return EINA_TRUE;
if (max == E_MAXIMIZE_BOTH) return EINA_TRUE;
}
return EINA_FALSE;
}
static Eina_Bool
ignore_client(const E_Client *ec, const Eina_List *skiplist)
{
if (eina_list_data_find(skiplist, ec)) return EINA_TRUE;
if (e_client_util_ignored_get(ec)) return EINA_TRUE;
if (!evas_object_visible_get(ec->frame)) return EINA_TRUE;
return EINA_FALSE;
}
static int
_e_place_coverage_client_add(E_Desk *desk, Eina_List *skiplist, int ar, int x, int y, int w, int h)
_e_place_coverage_client_add(Eina_List *skiplist, int ar, int x, int y, int w, int h)
{
E_Client *ec;
int x2, y2, w2, h2;
int iw, ih;
int x0, x00, yy0, y00;
E_CLIENT_FOREACH(ec)
E_CLIENT_REVERSE_FOREACH(ec)
{
if (eina_list_data_find(skiplist, ec)) continue;
if (e_client_util_ignored_get(ec)) continue;
x2 = (ec->x - desk->zone->x); y2 = (ec->y - desk->zone->y); w2 = ec->w; h2 = ec->h;
if (E_INTERSECTS(x, y, w, h, x2, y2, w2, h2) &&
((ec->sticky) || (ec->desk == desk)) &&
(!ec->iconic) && (ec->visible))
if (ignore_client(ec, skiplist)) continue;
if (ignore_client_and_break(ec)) break;
x2 = ec->x; y2 = ec->y; w2 = ec->w; h2 = ec->h;
if (E_INTERSECTS(x, y, w, h, x2, y2, w2, h2))
{
x0 = x;
if (x < x2) x0 = x2;
@ -122,12 +146,67 @@ _e_place_coverage_shelf_add(E_Desk *desk, int ar, int x, int y, int w, int h)
return ar;
}
static int *
_e_place_array_resize(int *array, int *pos, int *size)
{
(*pos)++;
if (*pos > *size)
{
*size += 32;
E_REALLOC(array, int, *size);
}
return array;
}
static void
_e_place_desk_region_smart_obstacle_add(char *u_x, char *u_y, int **a_x, int **a_y, int *a_w, int *a_h, int *a_alloc_w, int *a_alloc_h, int zx, int zy, int zw, int zh, int bx, int by, int bw, int bh)
{
if (bx < zx)
{
bw += bx;
bx = zx;
}
if ((bx + bw) > zx + zw) bw = zx + zw - bx;
if (bx >= zx + zw) return;
if (by < zy)
{
bh += by;
by = zy;
}
if ((by + bh) > zy + zh) bh = zy + zh - by;
if (by >= zy + zh) return;
if (!u_x[bx])
{
*a_x = _e_place_array_resize(*a_x, a_w, a_alloc_w);
(*a_x)[*a_w - 1] = bx;
u_x[bx] = 1;
}
if (!u_x[bx + bw])
{
*a_x = _e_place_array_resize(*a_x, a_w, a_alloc_w);
(*a_x)[*a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if (!u_y[by])
{
*a_y = _e_place_array_resize(*a_y, a_h, a_alloc_h);
(*a_y)[*a_h - 1] = by;
u_y[by] = 1;
}
if (!u_y[by + bh])
{
*a_y = _e_place_array_resize(*a_y, a_h, a_alloc_h);
(*a_y)[*a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
E_API int
e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w, int h, int *rx, int *ry)
{
int a_w = 0, a_h = 0, a_alloc_w = 0, a_alloc_h = 0;
int *a_x = NULL, *a_y = NULL;
int zw, zh;
int zx, zy, zw, zh;
char *u_x = NULL, *u_y = NULL;
E_Client *ec;
@ -152,21 +231,23 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
a_alloc_w = 2;
a_alloc_h = 2;
zx = desk->zone->x;
zy = desk->zone->y;
zw = desk->zone->w;
zh = desk->zone->h;
u_x = calloc(zw + 1, sizeof(char));
u_y = calloc(zh + 1, sizeof(char));
u_x = calloc(zx + zw + 1, sizeof(char));
u_y = calloc(zy + zh + 1, sizeof(char));
a_x[0] = 0;
a_x[1] = zw;
a_y[0] = 0;
a_y[1] = zh;
a_x[0] = zx;
a_x[1] = zx + zw;
a_y[0] = zy;
a_y[1] = zy + zh;
u_x[0] = 1;
u_x[zw] = 1;
u_y[0] = 1;
u_y[zh] = 1;
u_x[zx] = 1;
u_x[zx + zw] = 1;
u_y[zy] = 1;
u_y[zy + zh] = 1;
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
{
@ -184,145 +265,27 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
by = es->y;
bw = es->w;
bh = es->h;
if (!E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh)) continue;
if (bx < 0)
{
bw += bx;
bx = 0;
}
if ((bx + bw) > zw) bw = zw - bx;
if (bx >= zw) continue;
if (by < 0)
{
bh += by;
by = 0;
}
if ((by + bh) > zh) bh = zh - by;
if (by >= zh) continue;
if (!u_x[bx])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (!u_x[bx + bw])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if (!u_y[by])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (!u_y[by + bh])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
if (E_INTERSECTS(bx, by, bw, bh, zx, zy, zw, zh))
_e_place_desk_region_smart_obstacle_add(u_x, u_y, &a_x, &a_y,
&a_w, &a_h, &a_alloc_w, &a_alloc_h, zx, zy, zw, zh, bx, by, bw, bh);
}
}
E_CLIENT_FOREACH(ec)
E_CLIENT_REVERSE_FOREACH(ec)
{
int bx, by, bw, bh;
if (e_client_util_ignored_get(ec)) continue;
if (ignore_client(ec, skiplist)) continue;
if (ignore_client_and_break(ec)) break;
if (eina_list_data_find(skiplist, ec)) continue;
if (!((ec->sticky) || (ec->desk == desk))) continue;
bx = ec->x - desk->zone->x;
by = ec->y - desk->zone->y;
bx = ec->x;
by = ec->y;
bw = ec->w;
bh = ec->h;
if (E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh))
{
if (bx < 0)
{
bw += bx;
bx = 0;
}
if ((bx + bw) > zw) bw = zw - bx;
if (bx >= zw) continue;
if (by < 0)
{
bh += by;
by = 0;
}
if ((by + bh) > zh) bh = zh - by;
if (by >= zh) continue;
if (!u_x[bx])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (!u_x[bx + bw])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if (!u_y[by])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (!u_y[by + bh])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
if (E_INTERSECTS(bx, by, bw, bh, zx, zy, zw, zh))
_e_place_desk_region_smart_obstacle_add(u_x, u_y, &a_x, &a_y,
&a_w, &a_h, &a_alloc_w, &a_alloc_h, zx, zy, zw, zh, bx, by, bw, bh);
}
qsort(a_x, a_w, sizeof(int), _e_place_cb_sort_cmp);
qsort(a_y, a_h, sizeof(int), _e_place_cb_sort_cmp);
@ -333,22 +296,47 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
int i, j;
int area = 0x7fffffff;
if ((x <= zx + (zw - w)) &&
(y <= zy + (zh - h)))
{
int ar = 0;
ar = _e_place_coverage_client_add(skiplist, ar,
x, y,
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk, ar,
x, y,
w, h);
if (ar < area)
{
area = ar;
*rx = x;
*ry = y;
if (ar == 0) goto done;
}
}
for (j = 0; j < a_h - 1; j++)
{
for (i = 0; i < a_w - 1; i++)
{
if ((a_x[i] <= (zw - w)) &&
(a_y[j] <= (zh - h)))
if ((a_x[i] <= zx + (zw - w)) &&
(a_y[j] <= zy + (zh - h)))
{
int ar = 0;
ar = _e_place_coverage_client_add(desk, skiplist, ar,
ar = _e_place_coverage_client_add(skiplist, ar,
a_x[i], a_y[j],
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk, ar,
a_x[i], a_y[j],
w, h);
if (ar < area)
{
area = ar;
@ -357,17 +345,19 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j] <= (zh - h)))
if ((a_x[i + 1] - w > zx) && (a_y[j] <= zy + (zh - h)))
{
int ar = 0;
ar = _e_place_coverage_client_add(desk, skiplist, ar,
ar = _e_place_coverage_client_add(skiplist, ar,
a_x[i + 1] - w, a_y[j],
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk, ar,
a_x[i + 1] - w, a_y[j],
w, h);
if (ar < area)
{
area = ar;
@ -376,17 +366,19 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j + 1] - h > 0))
if ((a_x[i + 1] - w > zx) && (a_y[j + 1] - h > zy))
{
int ar = 0;
ar = _e_place_coverage_client_add(desk, skiplist, ar,
ar = _e_place_coverage_client_add(skiplist, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
if (ar < area)
{
area = ar;
@ -395,17 +387,19 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
if (ar == 0) goto done;
}
}
if ((a_x[i] <= (zw - w)) && (a_y[j + 1] - h > 0))
if ((a_x[i] <= zx + (zw - w)) && (a_y[j + 1] - h > zy))
{
int ar = 0;
ar = _e_place_coverage_client_add(desk, skiplist, ar,
ar = _e_place_coverage_client_add(skiplist, ar,
a_x[i], a_y[j + 1] - h,
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk, ar,
a_x[i], a_y[j + 1] - h,
w, h);
if (ar < area)
{
area = ar;
@ -421,15 +415,13 @@ done:
E_FREE(a_x);
E_FREE(a_y);
if ((*rx + w) > desk->zone->w) *rx = desk->zone->w - w;
if (*rx < 0) *rx = 0;
if ((*ry + h) > desk->zone->h) *ry = desk->zone->h - h;
if (*ry < 0) *ry = 0;
if ((*rx + w) > desk->zone->x + desk->zone->w) *rx = desk->zone->x + desk->zone->w - w;
if (*rx < zx) *rx = zx;
if ((*ry + h) > desk->zone->y + desk->zone->h) *ry = desk->zone->y + desk->zone->h - h;
if (*ry < zy) *ry = zy;
// printf("0 - PLACE %i %i | %ix%i\n", *rx, *ry, w, h);
*rx += desk->zone->x;
*ry += desk->zone->y;
return 1;
}
@ -445,6 +437,7 @@ e_place_zone_cursor(E_Zone *zone, int x EINA_UNUSED, int y EINA_UNUSED, int w, i
{
int cursor_x = 0, cursor_y = 0;
int zone_right, zone_bottom;
int zx, zy, zw, zh;
E_OBJECT_CHECK_RETURN(zone, 0);
@ -452,14 +445,16 @@ e_place_zone_cursor(E_Zone *zone, int x EINA_UNUSED, int y EINA_UNUSED, int w, i
*rx = cursor_x - (w >> 1);
*ry = cursor_y - (it >> 1);
e_zone_useful_geometry_get(zone, &zx, &zy, &zw, &zh);
if (*rx < zone->x)
*rx = zone->x;
*rx = zx;
if (*ry < zone->y)
*ry = zone->y;
*ry = zy;
zone_right = zone->x + zone->w;
zone_bottom = zone->y + zone->h;
zone_right = zx + zw;
zone_bottom = zy + zh;
if ((*rx + w) > zone_right)
*rx = zone_right - w;

View File

@ -167,6 +167,32 @@ _screen_closed(E_Randr2_Screen *s)
return EINA_FALSE;
}
static void
_screen_check_unconfigured(E_Randr2 *r, E_Config_Randr2 *cfg)
{
Eina_List *l;
E_Randr2_Screen *s;
E_Config_Randr2_Screen *cs;
printf("RRR: check for unconfigured screens....\n");
EINA_LIST_FOREACH(r->screens, l, s)
{
cs = NULL;
printf("RRR: looking at %s ...\n", s->info.name);
if ((!_screen_closed(s)) && (s->info.connected))
{
cs = e_randr2_config_screen_find(s, cfg);
if (!cs)
{
printf("RRR: unconfig display on: %s\n", s->info.name);
e_configure_registry_call("screen/screen_setup",
NULL, s->info.name);
return;
}
}
}
}
static void
_animated_apply_abort(void)
{
@ -206,6 +232,7 @@ _cb_fade_animator(void *data EINA_UNUSED)
{
_apply_delay = ecore_timer_add(3.0, _cb_delay_timer, NULL);
_do_apply();
_screen_check_unconfigured(e_randr2, e_randr2_cfg);
}
else
{
@ -412,9 +439,9 @@ _config_really_apply(E_Randr2_Screen *s, E_Config_Randr2_Screen *cs)
static void
_config_apply(E_Randr2 *r, E_Config_Randr2 *cfg)
{
Eina_List *l, *l2;
E_Randr2_Screen *s, *s2;
E_Config_Randr2_Screen *cs, *cs2;
Eina_List *l;
E_Randr2_Screen *s;
E_Config_Randr2_Screen *cs;
if ((!r) || (!cfg)) return;
EINA_LIST_FOREACH(r->screens, l, s)
@ -430,50 +457,6 @@ _config_apply(E_Randr2 *r, E_Config_Randr2 *cfg)
printf("RRR: ... priority = %i\n", cs->priority);
_config_really_apply(s, cs);
}
else if ((!cs) && (!_screen_closed(s)))
{
printf("RRR: ... no config found...\n");
cs2 = NULL;
if (s->info.connected)
{
EINA_LIST_FOREACH(r->screens, l2, s2)
{
if (s2 == s) continue;
if (s2->info.is_lid)
{
cs2 = e_randr2_config_screen_find(s2, cfg);
if (cs2) break;
}
}
if (!cs2)
{
EINA_LIST_FOREACH(r->screens, l2, s2)
{
if (s2 == s) continue;
if (s2->info.connected)
{
cs2 = e_randr2_config_screen_find(s2, cfg);
if (cs2) break;
}
}
}
}
if (cs2)
{
printf("RRR: ... enabled - fallback clone\n");
_config_really_apply(s, cs2);
free(s->config.relative.to);
s->config.relative.to = strdup(cs2->id);
printf("RRR: ... clone = %s\n", s->config.relative.to);
s->config.relative.mode = E_RANDR2_RELATIVE_CLONE;
s->config.relative.align = 0.0;
}
else
{
printf("RRR: ... disabled\n");
_config_really_apply(s, NULL);
}
}
else
{
printf("RRR: ... disabled\n");
@ -827,7 +810,10 @@ again:
{
// one of the common modes matches the base config - we are ok
if ((m->w == sbase->config.mode.w) && (m->h == sbase->config.mode.h))
return;
{
modes = eina_list_free(modes);
return;
}
}
// find a common mode since current config doesn't match
EINA_LIST_FOREACH(modes, l, m)

View File

@ -248,7 +248,7 @@ e_remember_use(E_Remember *rem)
E_API void
e_remember_unuse(E_Remember *rem)
{
rem->used_count--;
if (rem->used_count) rem->used_count--;
}
E_API void

View File

@ -27,8 +27,12 @@ e_scale_update(void)
e_scale = (double)ecore_x_dpi_get() / (double)e_config->scale.base_dpi;
#endif
#ifdef HAVE_WAYLAND
/* FIXME: This needs to get the DPI from a given output */
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
e_scale = (double)ecore_wl_dpi_get() / (double)e_config->scale.base_dpi;
{
e_scale = (double)ecore_wl2_output_dpi_get(NULL) /
(double)e_config->scale.base_dpi;
}
#endif
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
else if (e_scale < e_config->scale.min)

View File

@ -91,7 +91,7 @@ _e_shelf_remaximize(E_Shelf *es)
{
E_Client *ec;
if (es->cfg->overlap) return;
if ((!e_config->border_fix_on_shelf_toggle) || es->cfg->overlap) return;
E_CLIENT_FOREACH(ec)
{
E_Maximize max = ec->maximized;
@ -211,6 +211,12 @@ e_shelf_zone_dummy_new(E_Zone *zone, Evas_Object *obj, int id)
return es;
}
static void
_e_shelf_hidden(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Shelf *es = data;
es->hiding = 0;
}
E_API E_Shelf *
e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, E_Layer layer, int id)
@ -246,9 +252,10 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, E_Layer laye
e_shelf_style_set(es, style);
evas_object_move(es->o_base, es->zone->x + es->x, es->zone->y + es->y);
if (layer == E_LAYER_DESKTOP)
if ((layer == E_LAYER_DESKTOP) || edje_object_data_get(es->o_base, "noshadow"))
type = E_COMP_OBJECT_TYPE_NONE;
es->comp_object = e_comp_object_util_add(es->o_base, type);
evas_object_event_callback_add(es->comp_object, EVAS_CALLBACK_HIDE, _e_shelf_hidden, es);
evas_object_data_set(es->comp_object, "E_Shelf", es);
evas_object_data_set(es->comp_object, "comp_skip", (void*)1);
evas_object_name_set(es->comp_object, es->name);
@ -365,6 +372,7 @@ e_shelf_show(E_Shelf *es)
{
E_OBJECT_CHECK(es);
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
if (es->hiding) evas_object_hide(es->comp_object);
evas_object_show(es->comp_object);
}
@ -374,6 +382,7 @@ e_shelf_hide(E_Shelf *es)
E_OBJECT_CHECK(es);
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
evas_object_hide(es->comp_object);
es->hiding = evas_object_visible_get(es->comp_object);
}
E_API void
@ -494,7 +503,8 @@ e_shelf_move(E_Shelf *es, int x, int y)
es->x = x;
es->y = y;
evas_object_move(es->comp_object, es->zone->x + es->x, es->zone->y + es->y);
_e_shelf_remaximize(es);
if (!es->hide_animator)
_e_shelf_remaximize(es);
}
E_API void
@ -506,7 +516,8 @@ e_shelf_resize(E_Shelf *es, int w, int h)
es->w = w;
es->h = h;
evas_object_resize(es->comp_object, es->w, es->h);
_e_shelf_remaximize(es);
if (!es->hide_animator)
_e_shelf_remaximize(es);
}
E_API void
@ -521,7 +532,8 @@ e_shelf_move_resize(E_Shelf *es, int x, int y, int w, int h)
es->h = h;
evas_object_move(es->comp_object, es->zone->x + es->x, es->zone->y + es->y);
evas_object_resize(es->comp_object, es->w, es->h);
_e_shelf_remaximize(es);
if (!es->hide_animator)
_e_shelf_remaximize(es);
}
E_API void
@ -1377,7 +1389,6 @@ _e_shelf_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *styl
static void
_e_shelf_toggle_client_fix(E_Shelf *es)
{
Eina_List *l;
E_Client *ec;
if (!e_config->border_fix_on_shelf_toggle)
@ -1385,8 +1396,10 @@ _e_shelf_toggle_client_fix(E_Shelf *es)
if (es->cfg->overlap)
return;
EINA_LIST_FOREACH(e_comp->clients, l, ec)
E_CLIENT_FOREACH(ec)
{
if ((!ec->sticky) && (!e_shelf_desk_visible(es, ec->desk ?: e_desk_current_get(es->zone))))
continue;
if ((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_NONE)
{
if (ec->lock_client_location) continue;

View File

@ -49,6 +49,7 @@ struct _E_Shelf
unsigned char dummy : 1;
Eina_Bool cfg_delete : 1;
unsigned int locked;
Eina_Bool hiding : 1;
};
typedef struct E_Event_Shelf

View File

@ -613,13 +613,13 @@ main(int argc, char **argv)
}
putchar('\n');
/* mtrack memory tracker support */
home = getenv("HOME");
if (home)
{
FILE *f;
const char *tmps;
#if 0
FILE *f;
/* mtrack memory tracker support */
/* if you have ~/.e-mtrack, then the tracker will be enabled
* using the content of this file as the path to the mtrack.so
* shared object that is the mtrack preload */
@ -643,7 +643,7 @@ main(int argc, char **argv)
}
fclose(f);
}
#endif
tmps = getenv("XDG_DATA_HOME");
if (tmps)
snprintf(buf, sizeof(buf), "%s/Applications/.bin", tmps);

View File

@ -15,9 +15,13 @@ static E_Order *startup_apps = NULL;
static int start_app_pos = -1;
static Ecore_Event_Handler *desktop_cache_update_handler = NULL;
static Eina_Bool desktop_cache_update = EINA_FALSE;
static Eina_Bool started = EINA_FALSE;
/* externally accessible functions */
E_API void
e_startup(E_Startup_Mode mode)
e_startup_mode_set(E_Startup_Mode mode)
{
char buf[PATH_MAX];
@ -40,6 +44,15 @@ e_startup(E_Startup_Mode mode)
e_init_undone();
}
E_API void
e_startup(void)
{
if (!desktop_cache_update)
started = EINA_TRUE;
else
_e_startup();
}
/* local subsystem functions */
static void
_e_startup(void)
@ -104,13 +117,15 @@ _e_startup_event_cb(void *data, int ev_type EINA_UNUSED, void *ev)
_e_startup_error_dialog("E: Efreet could not build cache. "
"Please check your DBus setup");
}
ecore_event_handler_del(desktop_cache_update_handler);
desktop_cache_update = EINA_TRUE;
E_FREE_FUNC(desktop_cache_update_handler, ecore_event_handler_del);
buf = data;
startup_apps = e_order_new(buf);
if (startup_apps)
start_app_pos = 0;
free(buf);
_e_startup();
if (started)
_e_startup();
return ECORE_CALLBACK_PASS_ON;
}

View File

@ -10,7 +10,8 @@ typedef enum _E_Startup_Mode
#ifndef E_STARTUP_H
#define E_STARTUP_H
E_API void e_startup(E_Startup_Mode mode);
E_API void e_startup(void);
E_API void e_startup_mode_set(E_Startup_Mode mode);
#endif
#endif

View File

@ -281,11 +281,11 @@ _e_static_grab_x(E_Static_Grab *grab)
switch (*current)
{
case 'R':
if (_e_static_grab_string(current, line->end, RELEASE_DATE, &grab->x.release_date)) break;
_e_static_grab_string(current, line->end, RELEASE_DATE, &grab->x.release_date);
break;
case 'B':
if (_e_static_grab_string(current, line->end, BUILD_DATE, &grab->x.build_date)) break;
_e_static_grab_string(current, line->end, BUILD_DATE, &grab->x.build_date);
break;
case '(':

View File

@ -176,7 +176,6 @@ e_sys_init(void)
Eldbus_Connection *conn;
Eldbus_Object *obj;
eldbus_init();
conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM);
obj = eldbus_object_get(conn, "org.freedesktop.login1",
"/org/freedesktop/login1");
@ -222,7 +221,6 @@ e_sys_shutdown(void)
close(_e_sys_systemd_inhibit_fd);
_e_sys_systemd_inhibit_fd = -1;
}
eldbus_shutdown();
return 1;
}

View File

@ -1176,7 +1176,7 @@ e_util_binding_match(const Eina_List *bindlist, Ecore_Event_Key *ev, unsigned in
{
if (bi != skip)
{
if ((bi->modifiers == mod) && (!strcmp(bi->key, ev->key)))
if ((bi->modifiers == mod) && eina_streq(bi->key, ev->key))
return bi;
}
if (num) (*num)++;

View File

@ -6,14 +6,8 @@
* 3. (optional) Write the whole blob into a file on disk for later use)
*/
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <Eina.h>
#include <e.h>
#include <sys/mman.h>
/* Use anonymous mapping if we don't want a persistent file on the disk */
#define OBJECT_NAME "/e_uuid_store"

View File

@ -164,6 +164,8 @@ e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
{
if (e_widget_can_focus_get(sobj)) sd->child_can_focus = 1;
}
if (!evas_object_smart_parent_get(sobj))
evas_object_smart_member_add(sobj, obj);
if (strcmp(evas_object_type_get(sobj), SMART_NAME)) return;
sd = evas_object_smart_data_get(sobj);
@ -179,6 +181,8 @@ E_API void
e_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj)
{
API_ENTRY return;
if (evas_object_smart_parent_get(sobj) == obj)
evas_object_smart_member_del(sobj);
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
sd->subobjs = eina_list_remove(sd->subobjs, sobj);
if (!sd->child_can_focus)

View File

@ -123,10 +123,10 @@ e_widget_bgpreview_desk_configurable_set(Evas_Object *obj, Eina_Bool enable)
enable = !!enable;
if (dd->configurable == enable) return;
if (enable)
evas_object_event_callback_add(dd->icon, EVAS_CALLBACK_MOUSE_DOWN,
evas_object_event_callback_add(dd->icon, EVAS_CALLBACK_MOUSE_UP,
_e_wid_desk_cb_config, dd);
else
evas_object_event_callback_del_full(dd->icon, EVAS_CALLBACK_MOUSE_DOWN,
evas_object_event_callback_del_full(dd->icon, EVAS_CALLBACK_MOUSE_UP,
_e_wid_desk_cb_config, dd);
dd->configurable = enable;
}
@ -267,7 +267,7 @@ _e_wid_reconfigure(E_Widget_Data *wd)
edje_object_part_swallow(dd->icon, "e.swallow.content", dd->live);
dd->configurable = EINA_TRUE;
evas_object_event_callback_add(dd->icon, EVAS_CALLBACK_MOUSE_DOWN,
evas_object_event_callback_add(dd->icon, EVAS_CALLBACK_MOUSE_UP,
_e_wid_desk_cb_config, dd);
evas_object_show(dd->icon);
evas_object_data_set(dd->icon, "desk_data", dd);

View File

@ -26,9 +26,13 @@ struct _E_Widget_Data
Evas_Object *o_preview_time_entry;
Evas_Object *o_preview_preview;
Evas_Object *o_preview_scrollframe;
Evas_Coord preview_w, preview_h;
int w, h;
Ecore_Thread *preview_text_file_thread;
Eio_File *preview_text_file_thread;
Eina_File *preview_text_file;
Eio_Monitor *monitor;
Eina_List *handlers;
char *preview_extra_text;
@ -39,6 +43,7 @@ struct _E_Widget_Data
const char *path;
const char *mime;
double vid_pct;
Eina_Bool mime_icon : 1;
Eina_Bool is_dir : 1;
Eina_Bool is_txt : 1;
@ -48,6 +53,8 @@ struct _E_Widget_Data
Eina_Bool prev_is_font : 1;
Eina_Bool prev_is_video : 1;
Eina_Bool clamp_video : 1;
Eina_Bool delete_me : 1;
Eina_Bool preview_text_file_next : 1;
};
static void _e_wid_fprev_preview_update(void *data, Evas_Object *obj, void *event_info);
@ -214,8 +221,8 @@ _e_wid_fprev_clear_widgets(E_Widget_Data *wd)
CLRWID(o_preview_scrollframe);
wd->is_dir = wd->is_txt = wd->is_font = wd->prev_is_fm = wd->prev_is_video = EINA_FALSE;
wd->vid_pct = 0;
if (wd->preview_text_file_thread) ecore_thread_cancel(wd->preview_text_file_thread);
wd->preview_text_file_thread = NULL;
if (wd->preview_text_file_thread) eio_file_cancel(wd->preview_text_file_thread);
}
static void
@ -850,10 +857,15 @@ _e_wid_del_hook(Evas_Object *obj)
E_FREE(wd->preview_time_text);
eina_stringshare_del(wd->path);
eina_stringshare_del(wd->mime);
if (wd->preview_text_file_thread) ecore_thread_cancel(wd->preview_text_file_thread);
wd->preview_text_file_thread = NULL;
if (wd->monitor) eio_monitor_del(wd->monitor);
E_FREE_LIST(wd->handlers, ecore_event_handler_del);
wd->preview_text_file_next = EINA_FALSE;
if (wd->preview_text_file_thread)
{
wd->delete_me = EINA_TRUE;
eio_file_cancel(wd->preview_text_file_thread);
return ;
}
free(wd);
}
@ -864,7 +876,7 @@ _e_wid_fprev_preview_reset(E_Widget_Data *wd)
evas_object_del(wd->o_preview_scrollframe);
wd->o_preview_scrollframe = wd->o_preview_preview = NULL;
if (wd->preview_text_file_thread) ecore_thread_cancel(wd->preview_text_file_thread);
if (wd->preview_text_file_thread) eio_file_cancel(wd->preview_text_file_thread);
wd->preview_text_file_thread = NULL;
if (wd->is_dir || wd->is_txt || wd->is_font) return;
o = e_widget_preview_add(evas_object_evas_get(wd->obj), wd->w, wd->h);
@ -912,48 +924,67 @@ _e_wid_cb_file_deleted(void *data, Evas_Object *obj, void *event EINA_UNUSED)
}
static void
_e_wid_fprev_preview_txt_read_cancel(void *data EINA_UNUSED, Ecore_Thread *eth EINA_UNUSED)
{
}
static void
_e_wid_fprev_preview_txt_read_end(void *data EINA_UNUSED, Ecore_Thread *eth EINA_UNUSED)
{
}
static void
_e_wid_fprev_preview_txt_read_notify(void *data, Ecore_Thread *eth EINA_UNUSED, void *msg)
_e_wid_fprev_preview_txt_map_success(void *data, Eio_File *handler EINA_UNUSED, void *map, size_t length)
{
E_Widget_Data *wd = data;
char *buf;
Eina_Strbuf *buf;
char *msg;
Evas_Coord mw, mh;
//INF("text='%s'", (char*)msg);
buf = alloca(strlen(msg) + 4096);
strcpy(buf, "<align=left>");
strcat(buf, msg);
edje_object_part_text_set(wd->o_preview_preview, "e.textblock.message", buf);
buf = eina_strbuf_new();
eina_strbuf_append_n(buf, map, length);
msg = evas_textblock_text_utf8_to_markup(NULL, eina_strbuf_string_get(buf));
eina_strbuf_reset(buf);
eina_strbuf_append(buf, "<align=left>");
eina_strbuf_append(buf, msg);
free(msg);
edje_object_part_text_set(wd->o_preview_preview, "e.textblock.message", eina_strbuf_string_get(buf));
edje_object_size_min_calc(wd->o_preview_preview, &mw, &mh);
evas_object_resize(wd->o_preview_preview, mw, mh);
free(msg);
eina_strbuf_free(buf);
eina_file_map_free(wd->preview_text_file, map);
eina_file_close(wd->preview_text_file);
wd->preview_text_file = NULL;
wd->preview_text_file_thread = NULL;
}
static void _e_wid_fprev_preview_txt_open_success(void *data, Eio_File *handler, Eina_File *file);
static void
_e_wid_fprev_preview_txt_error(void *data, Eio_File *handler EINA_UNUSED, int error EINA_UNUSED)
{
E_Widget_Data *wd = data;
wd->preview_text_file_thread = NULL;
if (wd->preview_text_file) eina_file_close(wd->preview_text_file);
wd->preview_text_file = NULL;
if (wd->preview_text_file_next)
{
wd->preview_text_file_thread = eio_file_open(wd->path, EINA_FALSE,
_e_wid_fprev_preview_txt_open_success,
_e_wid_fprev_preview_txt_error, wd);
wd->preview_text_file_next = EINA_FALSE;
}
if (wd->delete_me) free(wd);
}
static void
_e_wid_fprev_preview_txt_read(void *data EINA_UNUSED, Ecore_Thread *eth)
_e_wid_fprev_preview_txt_open_success(void *data, Eio_File *handler EINA_UNUSED, Eina_File *file)
{
char *text;
char buf[FILEPREVIEW_TEXT_PREVIEW_SIZE + 1];
FILE *f;
size_t n;
E_Widget_Data *wd = data;
unsigned int length = eina_file_size_get(file);
text = ecore_thread_global_data_find("fprev_file");
if (!text) return;
f = fopen(text, "r");
if (!f) return;
n = fread(buf, sizeof(char), FILEPREVIEW_TEXT_PREVIEW_SIZE, f);
buf[n] = 0;
ecore_thread_feedback(eth, evas_textblock_text_utf8_to_markup(NULL, buf));
fclose(f);
if (length > FILEPREVIEW_TEXT_PREVIEW_SIZE) length = FILEPREVIEW_TEXT_PREVIEW_SIZE;
wd->preview_text_file = file;
wd->preview_text_file_thread = eio_file_map_new(file, EINA_FILE_POPULATE,
0, length,
NULL, _e_wid_fprev_preview_txt_map_success, _e_wid_fprev_preview_txt_error, wd);
}
static void
@ -972,7 +1003,7 @@ _e_wid_fprev_preview_txt(E_Widget_Data *wd)
if (!wd->o_preview_preview)
{
Evas *evas;
evas = evas_object_evas_get(wd->obj);
o = edje_object_add(evas);
/* using dialog theme for now because it's simple, common, and doesn't require all
@ -998,11 +1029,18 @@ _e_wid_fprev_preview_txt(E_Widget_Data *wd)
wd->o_preview_properties_table,
1, 1, 0.5);
}
ecore_thread_global_data_del("fprev_file");
if (wd->preview_text_file_thread) ecore_thread_cancel(wd->preview_text_file_thread);
ecore_thread_global_data_add("fprev_file", strdup(wd->path), free, 0);
wd->preview_text_file_thread = ecore_thread_feedback_run(_e_wid_fprev_preview_txt_read, _e_wid_fprev_preview_txt_read_notify,
_e_wid_fprev_preview_txt_read_end, _e_wid_fprev_preview_txt_read_cancel, wd, EINA_FALSE);
if (wd->preview_text_file_thread)
{
eio_file_cancel(wd->preview_text_file_thread);
wd->preview_text_file_next = EINA_TRUE;
}
else
{
wd->preview_text_file_thread = eio_file_open(wd->path, EINA_FALSE,
_e_wid_fprev_preview_txt_open_success,
_e_wid_fprev_preview_txt_error, wd);
}
}
static void

View File

@ -7,8 +7,10 @@ typedef struct _Elm_Win_Trap_Ctx
{
E_Client *client;
E_Pointer *pointer;
int x, y, w, h;
Eina_Bool centered : 1;
Eina_Bool placed : 1;
Eina_Bool sized : 1;
Eina_Bool internal_no_remember : 1;
Eina_Bool internal_no_reopen : 1;
Eina_Bool visible : 1;
@ -71,7 +73,7 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
E_Client *ec;
Ecore_Window win;
#ifdef HAVE_WAYLAND
uintptr_t wl_win_id;
int64_t wl_win_id = -1;
#endif
E_Pixmap_Type type = E_PIXMAP_TYPE_X;
@ -79,11 +81,13 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
#ifdef HAVE_WAYLAND
if (!strncmp(ecore_evas_engine_name_get(ee), "wayland", 7))
{
Ecore_Wl2_Window *ewin = elm_win_wl_window_get(o);
type = E_PIXMAP_TYPE_WL;
ecore_evas_object_cursor_set(ee, NULL, 0, 0, 0);
ctx->pointer = e_comp->pointer;
elm_win_borderless_set(o, 1);
wl_win_id = win;
wl_win_id = ecore_wl2_window_surface_id_get(ewin);
}
else
#endif
@ -92,12 +96,11 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
ctx->pointer = e_pointer_window_new(win, EINA_TRUE);
}
#ifdef HAVE_WAYLAND
if (type == E_PIXMAP_TYPE_WL)
ec = e_pixmap_find_client(type, wl_win_id);
ec = e_pixmap_find_client(type, (int64_t)win);
else
#endif
ec = e_pixmap_find_client(type, win);
if (ec)
ctx->client = ec;
else
@ -114,13 +117,16 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
title = "E";
ecore_evas_title_set(ee, title);
#ifdef HAVE_WAYLAND
if (type == E_PIXMAP_TYPE_WL)
cp = e_pixmap_new(type, wl_win_id);
cp = e_pixmap_new(type, (int64_t)win);
else
#endif
cp = e_pixmap_new(type, win);
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
#ifdef HAVE_WAYLAND
if (wl_win_id >= 0)
e_pixmap_alias(cp, type, wl_win_id);
#endif
current_win = ctx;
ctx->client = e_client_new(cp, 0, 1);
@ -152,6 +158,8 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
e_comp_object_frame_xy_adjust(ctx->client->frame, ctx->client->client.x, ctx->client->client.y, &ctx->client->x, &ctx->client->y);
e_comp_object_frame_wh_adjust(ctx->client->frame, ctx->client->client.w, ctx->client->client.h, &ctx->client->w, &ctx->client->h);
if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
else if (ctx->placed) evas_object_move(o, ctx->x, ctx->y);
if (ctx->sized) evas_object_resize(o, ctx->w, ctx->h);
return EINA_TRUE;
}
@ -172,6 +180,7 @@ _e_elm_win_trap_move(void *data, Evas_Object *o, int x, int y)
if ((x == ex) && (y == ey)) return EINA_FALSE;
}
ctx->placed = 1;
ctx->x = x, ctx->y = y;
if (!ctx->client) return EINA_TRUE;
if ((ctx->client->client.x != x) || (ctx->client->client.y != y))
e_client_util_move_without_frame(ctx->client, x, y);
@ -183,6 +192,8 @@ _e_elm_win_trap_resize(void *data, Evas_Object *o EINA_UNUSED, int w, int h)
{
Elm_Win_Trap_Ctx *ctx = data;
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
ctx->sized = 1;
ctx->w = w, ctx->h = h;
if (!ctx->client) return EINA_TRUE;
e_comp_object_frame_wh_adjust(ctx->client->frame, w, h, &w, &h);
e_client_resize_limit(ctx->client, &w, &h);

View File

@ -565,11 +565,9 @@ _e_xsettings_cursor_path_set(void)
path = getenv("XCURSOR_PATH");
if (path)
{
if (!strstr(path, buf))
{
snprintf(env, sizeof(env), "%s:%s", buf, path);
path = env;
}
if (strstr(path, buf)) return;
snprintf(env, sizeof(env), "%s:%s", buf, path);
path = env;
}
else
{

View File

@ -400,6 +400,7 @@ e_zone_current_get(void)
Eina_List *l = NULL;
E_Zone *zone;
if (!e_comp) return NULL;
if (!starting)
{
int x, y;

View File

@ -10,6 +10,7 @@ struct _E_Smart_Data
Evas_Object *smart_obj, *child_obj;
Evas_Coord x, y, w, h;
Evas_Coord child_w, child_h;
unsigned int recurse;
Eina_Bool solid : 1;
Eina_Bool smooth : 1;
Eina_Bool always : 1;
@ -49,6 +50,8 @@ e_zoomap_child_set(Evas_Object *obj, Evas_Object *child)
if (child == sd->child_obj) return;
if (sd->child_obj)
{
evas_object_map_set(sd->child_obj, NULL);
evas_object_map_enable_set(sd->child_obj, EINA_FALSE);
evas_object_clip_unset(sd->child_obj);
evas_object_smart_member_del(sd->child_obj);
evas_object_event_callback_del(sd->child_obj, EVAS_CALLBACK_DEL,
@ -190,6 +193,7 @@ static void
_e_zoomap_smart_reconfigure(E_Smart_Data *sd)
{
if (!sd->child_obj) return;
sd->recurse++;
if ((!sd->always) &&
((sd->w == sd->child_w) && (sd->h == sd->child_h)))
{
@ -206,7 +210,13 @@ _e_zoomap_smart_reconfigure(E_Smart_Data *sd)
int r = 0, g = 0, b = 0, a = 0;
evas_object_geometry_get(sd->child_obj, &cx, &cy, NULL, NULL);
evas_object_color_get(sd->child_obj, &r, &g, &b, &a);
if (sd->recurse != 1)
{
/* recursion: do move and exit to set map in outer call */
evas_object_move(sd->child_obj, sd->x, sd->y);
sd->recurse--;
return;
}
if ((cx != sd->x) || (cy != sd->y))
{
evas_smart_objects_calculate(e);
@ -215,6 +225,7 @@ _e_zoomap_smart_reconfigure(E_Smart_Data *sd)
evas_smart_objects_calculate(e);
evas_nochange_pop(e);
}
evas_object_color_get(sd->child_obj, &r, &g, &b, &a);
m = evas_map_new(4);
evas_map_util_points_populate_from_geometry(m, sd->x, sd->y,
sd->w, sd->h, 0);
@ -233,6 +244,7 @@ _e_zoomap_smart_reconfigure(E_Smart_Data *sd)
evas_object_map_enable_set(sd->child_obj, EINA_TRUE);
evas_map_free(m);
}
sd->recurse--;
}
static void

View File

@ -27,17 +27,12 @@ endif
src_modules_battery_module_la_LIBADD = $(MOD_LIBS)
src_modules_battery_module_la_LDFLAGS = $(MOD_LDFLAGS)
if HAVE_ENOTIFY
src_modules_battery_module_la_CPPFLAGS += @ENOTIFY_CFLAGS@
src_modules_battery_module_la_LIBADD += @ENOTIFY_LIBS@
endif
src_modules_battery_batgetdir = $(batterypkgdir)
src_modules_battery_batget_PROGRAMS = src/modules/battery/batget
src_modules_battery_batget_CPPFLAGS = $(MOD_CPPFLAGS) @BATTERY_CFLAGS@
src_modules_battery_batget_LDADD = $(MOD_LIBS)
src_modules_battery_batget_SOURCES = src/modules/battery/batget.c
src_modules_battery_batget_LDADD = @BATTERY_LIBS@
src_modules_battery_batget_LDFLAGS = @BATTERY_LDFLAGS@
PHONIES += battery install-battery

View File

@ -18,7 +18,7 @@ src_modules_bluez4_module_la_SOURCES = src/modules/bluez4/e_mod_main.h \
src/modules/bluez4/agent.c
src_modules_bluez4_module_la_CPPFLAGS = $(MOD_CPPFLAGS) -Wno-unused-parameter
src_modules_bluez4_module_la_LIBADD = $(MOD_LIBS) @BLUEZ4_LIBS@
src_modules_bluez4_module_la_LIBADD = $(MOD_LIBS)
PHONIES += bluez4 install-bluez4
bluez4: $(bluez4pkg_LTLIBRARIES) $(bluez4_DATA)

View File

@ -18,7 +18,7 @@ src_modules_connman_module_la_SOURCES = src/modules/connman/e_mod_main.h \
src/modules/connman/E_Connman.h
src_modules_connman_module_la_CPPFLAGS = $(MOD_CPPFLAGS) -Wno-unused-parameter
src_modules_connman_module_la_LIBADD = $(MOD_LIBS) @ECONNMAN_LIBS@
src_modules_connman_module_la_LIBADD = $(MOD_LIBS)
PHONIES += connman install-connman
connman: $(connmanpkg_LTLIBRARIES) $(connman_DATA)

View File

@ -10,7 +10,7 @@ iboxpkgdir = $(MDIR)/ibox/$(MODULE_ARCH)
iboxpkg_LTLIBRARIES = src/modules/ibox/module.la
src_modules_ibox_module_la_LIBADD = $(MOD_LIBS)
src_modules_ibox_module_la_CPPFLAGS = -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT $(MOD_CPPFLAGS)
src_modules_ibox_module_la_CPPFLAGS = $(MOD_CPPFLAGS)
src_modules_ibox_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_ibox_module_la_SOURCES = src/modules/ibox/e_mod_main.c \
src/modules/ibox/e_mod_main.h \

View File

@ -25,7 +25,7 @@ src_modules_mixer_emixerdir = $(mixerpkgdir)
bin_PROGRAMS += src/modules/mixer/emixer
src_modules_mixer_emixer_SOURCES = src/modules/mixer/emixer.c \
$(emixerlib)
src_modules_mixer_emixer_CPPFLAGS = $(MOD_CPPFLAGS) @e_cflags@ -I$(top_srcdir)/src/modules/mixer/lib
src_modules_mixer_emixer_CPPFLAGS = $(MOD_CPPFLAGS) -I$(top_srcdir)/src/modules/mixer/lib -DEMIXER_BUILD
src_modules_mixer_emixer_LDADD = $(MOD_LIBS) @PULSE_LIBS@ @ALSA_LIBS@
src_modules_mixer_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @e_cflags@ @ALSA_CFLAGS@ @PULSE_CFLAGS@ -I$(top_srcdir)/src/modules/mixer/lib

View File

@ -26,7 +26,7 @@ music_controlpkg_LTLIBRARIES = src/modules/music-control/module.la
src_modules_music_control_module_la_DEPENDENCIES = $(MDEPENDENCIES)
src_modules_music_control_module_la_CPPFLAGS = $(MOD_CPPFLAGS) -Wno-unused-parameter
src_modules_music_control_module_la_LIBADD = @MUSIC_CONTROL_LIBS@ $(MOD_LIBS)
src_modules_music_control_module_la_LIBADD = $(MOD_LIBS)
src_modules_music_control_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_music_control_module_la_SOURCES = \
src/modules/music-control/e_mod_main.h \

View File

@ -16,7 +16,7 @@ src_modules_notification_module_la_SOURCES = src/modules/notification/e_mod_main
src/modules/notification/e_mod_config.c \
src/modules/notification/e_mod_popup.c
src_modules_notification_module_la_LIBADD = $(MOD_LIBS) @ENOTIFY_LIBS@
src_modules_notification_module_la_LIBADD = $(MOD_LIBS)
PHONIES += notification install-notification
notification: $(notificationpkg_LTLIBRARIES) $(notification_DATA)

View File

@ -26,8 +26,8 @@ src_modules_temperature_tempgetdir = $(temperaturepkgdir)
src_modules_temperature_tempget_PROGRAMS = src/modules/temperature/tempget
src_modules_temperature_tempget_CPPFLAGS = $(MOD_CPPFLAGS)
src_modules_temperature_tempget_LDADD = $(MOD_LIBS)
src_modules_temperature_tempget_SOURCES = src/modules/temperature/tempget.c
src_modules_temperature_tempget_LDADD = @TEMPERATURE_LIBS@
PHONIES += temperature install-temperature
temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA) $(src_modules_temperature_tempget_PROGRAMS)

View File

@ -113,9 +113,6 @@ src_modules_wizard_page_110_la_LIBADD = $(MOD_LIBS)
src_modules_wizard_page_110_la_CPPFLAGS = $(MOD_CPPFLAGS)
src_modules_wizard_page_110_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_wizard_page_110_la_SOURCES = src/modules/wizard/page_110.c
if USE_MODULE_CONNMAN
src_modules_wizard_page_110_la_LIBADD += @ECONNMAN_LIBS@
endif
src_modules_wizard_page_120_la_LIBADD = $(MOD_LIBS)
src_modules_wizard_page_120_la_CPPFLAGS = $(MOD_CPPFLAGS)

View File

@ -14,8 +14,8 @@ wl_desktop_shellpkgdir = $(MDIR)/wl_desktop_shell/$(MODULE_ARCH)
wl_desktop_shellpkg_LTLIBRARIES = src/modules/wl_desktop_shell/module.la
src_modules_wl_desktop_shell_module_la_DEPENDENCIES = $(MDEPENDENCIES)
src_modules_wl_desktop_shell_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_DESKTOP_SHELL_CFLAGS@ @WAYLAND_CFLAGS@
src_modules_wl_desktop_shell_module_la_LIBADD = $(LIBS) @WL_DESKTOP_SHELL_LIBS@ @WAYLAND_LIBS@
src_modules_wl_desktop_shell_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WAYLAND_CFLAGS@
src_modules_wl_desktop_shell_module_la_LIBADD = $(MOD_LIBS) @WAYLAND_LIBS@
src_modules_wl_desktop_shell_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_wl_desktop_shell_module_la_SOURCES = \

View File

@ -6,7 +6,7 @@ wl_drmpkg_LTLIBRARIES = src/modules/wl_drm/module.la
src_modules_wl_drm_module_la_DEPENDENCIES = $(MDEPENDENCIES)
src_modules_wl_drm_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_DRM_CFLAGS@ @WAYLAND_CFLAGS@
src_modules_wl_drm_module_la_LIBADD = $(LIBS) @WL_DRM_LIBS@ @WAYLAND_LIBS@
src_modules_wl_drm_module_la_LIBADD = $(MOD_LIBS) @WL_DRM_LIBS@ @WAYLAND_LIBS@
src_modules_wl_drm_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_wl_drm_module_la_SOURCES = src/modules/wl_drm/e_mod_main.c

View File

@ -6,7 +6,7 @@ wl_fbpkg_LTLIBRARIES = src/modules/wl_fb/module.la
src_modules_wl_fb_module_la_DEPENDENCIES = $(MDEPENDENCIES)
src_modules_wl_fb_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_FB_CFLAGS@ @WAYLAND_CFLAGS@
src_modules_wl_fb_module_la_LIBADD = $(LIBS) @WL_FB_LIBS@ @WAYLAND_LIBS@
src_modules_wl_fb_module_la_LIBADD = $(MOD_LIBS) @WL_FB_LIBS@ @WAYLAND_LIBS@
src_modules_wl_fb_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_wl_fb_module_la_SOURCES = src/modules/wl_fb/e_mod_main.c

View File

@ -12,7 +12,7 @@ wl_text_inputpkg_LTLIBRARIES = src/modules/wl_text_input/module.la
src_modules_wl_text_input_module_la_DEPENDENCIES = $(MDEPENDENCIES)
src_modules_wl_text_input_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WAYLAND_CFLAGS@
src_modules_wl_text_input_module_la_LIBADD = $(LIBS) @WAYLAND_LIBS@
src_modules_wl_text_input_module_la_LIBADD = $(MOD_LIBS) @WAYLAND_LIBS@
src_modules_wl_text_input_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_wl_text_input_module_la_SOURCES = \
src/modules/wl_text_input/e_mod_main.c \

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