this commit introduces the setting of the index. Setting the index here
means that the layout with the id 0..n, out of the compiled keymap file
will be used. After a new index is set the modifiers are updated, that
the client are aware of the new resulting group.
If the api is called before the compositor is inited (this can happen
in e_xkb, so the drm can use the keymap at startup) then the index is
saved in between and will be flushed once the compositor does the init.
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.
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.
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
in a choice between fixing a corner case popup behavior and breaking dnd
or having functional dnd and adding hacks to fix corner case popup behavior,
adding more hacks was the obvious correct solution
ref 03a4ecbdb0
Under wayland evas will sometimes use the old one, I have no idea why.
Fixes a crash bug when mousing out of menus in a GTK app under wayland.
fix T3576
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
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
performing the entire unfullscreen/unmaximize routine causes a significant
amount of overhead, and it also breaks window geometries in wayland due to
synchronization
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
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>
This adds compositor handling of DMABuf buffers. DMAbuf capabilities
are advertised for the drm back-ends, and DMAbuf buffers are handled
as native surfaces.
When running as a wayland compositor connected to another wayland
compositor, we don't want to advertise dmabuf capabilities if the
parent compositor doesn't support them.
If it does, we'll want to proxy dmabuf requests to it instead of handling
them ourselves.
Expose this as new bools in e_comp_wl.
This test has been pushed into e_comp_object_native_surface_set() and
will be done as appropriate.
Upcoming wayland DMAbuf buffers need native surfaces even if GL isn't
present.
This is supposed to be functionally equivalent, but is a little tricky to
prove.
The benefit of this is a simplification to the callers, which no longer
have to consider gl capabilities in the call, as that is now tested for
internally.
Until now it's been reasonable to consider these together as the
criteria have been similar. With the upcoming introduction of wayland
DMAbuf buffers, they diverge.
We don't need to test for GL in the wayland case because we don't
advertise GL capabilities to clients when we don't support it, so they
can't create GL buffers unless we can display them.
DMAbuf for wayland will complicate determining whether a pixmap can use
a native surface or not, so we add an API here to check this.
Note that this doesn't take compositor capabilities into account - for
example, X pixmaps need GL enabled to use native surfaces. This is
already tested elsewhere.
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
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.
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
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
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
there were recent changes to evas object deletion mechanics which caused
this to begin crashing due to recent changes to evas object deletion mechanics
src/bin/e_zone.c: In function ‘_e_zone_useful_geometry_calc’:
src/bin/e_zone.c:1272:14: warning: ‘geom.h’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (h) *h = geom.h;
^
src/bin/e_zone.c:1271:14: warning: ‘geom.w’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (w) *w = geom.w;
^
src/bin/e_zone.c:1270:23: warning: ‘geom.y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (y) *y = geom.y + zy;
^
src/bin/e_zone.c:1269:23: warning: ‘geom.x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (x) *x = geom.x + zx;
^
src/bin/e_client.c: In function ‘e_client_maximize_geometry_get’:
src/bin/e_client.c:3754:16: warning: ‘y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (my) *my = y;
^
src/bin/e_client.c:3753:16: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (mx) *mx = x;
^
src/bin/e_client.c: In function ‘e_client_fullscreen’:
src/bin/e_client.c:4032:21: warning: ‘h’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ec->saved.h = h;
^
src/bin/e_client.c:4031:21: warning: ‘w’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ec->saved.w = w;
^
src/bin/e_client.c:4030:21: warning: ‘y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ec->saved.y = y;
^
src/bin/e_client.c:4029:21: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ec->saved.x = x;
^
Signed-off-by: Eduardo Lima (Etrunko) <eblima@gmail.com>
this code is mostly copied from weston:
78d4bf9a3ec990dceee23fd53962a69891352a0e
9c93179023fe894e417ccd20533d72d672d976fc
b288988e831cee3deb7f8bb1a3f440c86230dd9f
4061e2b67e62d5d2a635f0b87098f331082e8145
credit to Carlos Garnacho <carlosg@gnome.org> as original author
ref T3455
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.
- 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
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
these are traditionally compositor-only actions which may filter through
many different objects but are not meant to activate on window contents
resolves issues where some related mouse bindings were blocking input on windows
under x11
#thingsthatneeddocs
if csd exists in only one of (before || after) a maximize/fullscreen,
this provides info so that the right size can be used when restoring
geometry
...again
Summary:
the new_keyboard event is now used to restore the known layouts out of
the config, if the state is changedthe new group is safed in the config
which will be safed later.
Reviewers: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3877
maximize is client-initiated and compositor-enforced in wayland, meaning that a
maximize should only be acted upon in the compositor after the client has
acknowledged that it has transitioned into the maximized state (likely removing
part of its csd region) and has resized itself to match the expected maximize
size
fix T3297
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
xdg shell configure states (maximize, fullscreen) return a client ack when the
client has applied the state. the ack, followed by the next surface commit,
indicates that the surface is ready to be transitioned into the configured state
so i was profiling today .. leak hunting .. and i noticed. if you have
enough appss open - eg terminology, e uses a huge amount of memory...
for icons. terminology is 128x128 ... thats 64k per icon. open up a
lot of terminology windows and we duplicate that 64k per every window
on the wm sside because we get the data. it would apply for any app
that sets a netwm icon. this can be come rather silly if you have like
100 terminals. it's worse with larger icons (eg 256x256 - 256k per
icon).
this puts in a simply list for shared icons and a lookup on fetch to
de-duplicate and share icon data. this should drop memory usage
nicely.
@improvement
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>
this ensures that notification text reaching the module can be considered
"usable" without forcing multiple escape passes onto the same notification
fix T2757
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
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
for the case e_xkb gets initialized, we need to init it before ecore_drm
is called, otherwise ecore_drm will create his own context and keymap,
which will be overriden a few moment later when e_xkb is initializied.
So by calling e_comp_wl_input_keymap_set before ecore_drm_init the
correct context and keymap is set and no useless elements are created.
The mainproblem is that the comp_type is set when the compositor is
already running, so we have to pass the type at the init to the e_xkb
to tell for which kind of compositor we are running.
bindings enforce compositor grabs, which will result in stuck canvas buttons and
break internal windows which have already received button presses
fix T3347
As the block which uses this parameter is #if 0'd out, we end up not
using this param, which generates a compiler warning
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary:
- Change mouse button mapping for left handed mode
- Change a mouse_hand config and save
Currently e_mouse had e_mouse_update() API for support left_handed mode.
But that API only for Xorg not support wayland and only for update mapping not change mapping.
So I added new support for change mouse mapping for left handed mode and support wayland backend system.
Test Plan:
After set left handed mode,
mouse button mapping is changed for left handed people.
Reviewers: raster, devilhorns, zmike
Subscribers: ohduna, input.hacker, cedric
Differential Revision: https://phab.enlightenment.org/D3433
in many cases where a zone's useful geometry is marked dirty, the resulting
recalc ends up having the same useful geometry as before: this is the case
for things like tasks gadgets, which continually expand and contract along
a single axis and thus will never affect useful geometry while still forcing
a recalc
by ignoring these cases, a huge amount of compositor thrashing is avoided and
a number of related bugs can also be fixed
if we are setting the group or the set of groups in e we will receive a
XkbNotifyState Event from x, which will result in a
ECORE_X_EVENT_XKB_STATE_NOTIFY event. We are setting there again our
settings, since we need to reset the settings from a potential external
application. So we should only reset our settings when the event is not
expected by e.
If someone plugs in a external monitor, the notify event is set AND the
group is changed externally. This means enlightenment cannot configure a
new keyboard anymore. So we are flushing in our new config all the time,
setting the old group-index again.
an agent object can be used when a client should be represented on the
canvas solely by its window geometry and not including any csd
this creates and manages a mutable object which maintains the same geom
as ec->x/y/w/h and can be operated upon to modify those values
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
If enlightenment is built with support for wayland, then previously
the WBOD would not work if we were running the same binary with X11.
This was because the alert system would try to connect via drm by
default (due to wayland build option). We fix that by checking for the
existance of $DISPLAY (as this will not be present under drm), and
running the X11 codepath if it is found, running the drm codepath if
it is not found.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
assume that an object is where it's supposed to be in order to avoid failing
to correctly animate objects which modify set geometries, such as e clients
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
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
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.
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.
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.
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.
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)
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
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
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
the current security policy for this is based on two points:
1) don't add gadgets to your lockscreen that you don't want on your lockscreen
2) see #1
future improvements here will probably add gadget info to show what risks a gadget
may incur when placed on the lockscreen
if an e config save is queued, it may also be the case that an elm config
value has been updated due to the intertwined nature of these configs.
adding a silent save here without a flush will account for such cases
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>
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>
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>
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
this avoids some minor canvas thrashing since the zoomap will try
to reapply existing geometries to the child instead of setting 0 and
triggering infinite callbacks
This reverts commit 26a7ba3a58.
this can only occur if something forces an event flush during shutdown.
in this case, whatever is triggering the event flush is a bug, not the
dereferencing of a pointer which is guaranteed to exist for the normal
lifetime of the process
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
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
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
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