Commit Graph

20999 Commits

Author SHA1 Message Date
Mike Blumenkrantz 6e3b9763b0 remove e_bindings_key_up_event_find, rename other one to e_bindings_key_event_find
key up and key down are identical, having two functions here is misleading
2016-01-25 12:38:45 -05:00
Mike Blumenkrantz e88823dd1b 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-01-25 12:36:21 -05:00
Mike Blumenkrantz c637c70f1c add extra param to e_bindings_key_down_event_find() to return found binding
this should match the corresponding mouse binding function
2016-01-25 12:27:54 -05:00
Mike Blumenkrantz 6d45baa510 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-01-25 11:29:55 -05:00
Mike Blumenkrantz 85d7c121bd do not attempt to create x11 canvas during xwayland init
this kills the gl_drm engine
2016-01-22 17:06:42 -05:00
Mike Blumenkrantz 8f510bc228 add macros for creating and binding wayland globals in extensions file
wayland requires a ton of boilerplate code. anything that can be done to
reduce the amount of work (copy/pasting) required to handle extension adding
is a plus
2016-01-22 16:53:02 -05:00
Mike Blumenkrantz edba13322a disable bindings during wayland screenshot operations
recursive action activation is very bad.
2016-01-22 16:31:07 -05:00
Mike Blumenkrantz 446f9c4b68 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-01-22 16:25:32 -05:00
Mike Blumenkrantz 542079d841 move all wayland extension implementations into e_comp_wl_extensions.c
e_comp_wl.c getting a bit hard to manage already, future extension additions
are going to make it a lot worse
2016-01-22 16:25:29 -05:00
Mike Blumenkrantz df5106f1cb ship tiling module edj file
this never gets edited, no point in compiling it every build
2016-01-22 16:25:29 -05:00
Mike Blumenkrantz 1d092a08b4 move wayland protocols and generated files into separate directories
this should make it easier to track them as e starts shipping more private
extensions
2016-01-22 16:25:12 -05:00
Mike Blumenkrantz c86aa21e90 remove comp canvas key handler shortcuts for passing keys to wayland clients
now handled normally by disabling bindings
2016-01-22 13:13:08 -05:00
Mike Blumenkrantz fc6458bccd re-add MANAGER context bindings
these bindings activate before any other handler can process the
corresponding event and will block all propagation of the event upon
activation

as an example, the alt+wheel default binding for flipping desks currently
passes through a number of event handlers prior to activating the binding,
meaning that it's possible for the wheel action to have unwanted effects
when these handlers cause actions before the binding stops the propagation.
using a MANAGER context instead ensures that this is not possible
2016-01-22 12:59:19 -05:00
Mike Blumenkrantz 194b1ab336 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-01-22 12:58:16 -05:00
Mike Blumenkrantz 8500517e34 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-01-22 12:49:05 -05:00
Mike Blumenkrantz f54bf1ec60 allocate E_Shell_Data for all xdg surfaces (popups)
this crashes if the shell surface does not have shell data
2016-01-21 17:21:31 -05:00
Mike Blumenkrantz 9245b1ec27 handle more mouse buttons in wayland
according to the "reference" compositor this is how it works
2016-01-21 16:28:25 -05:00
Mike Blumenkrantz fabf2de023 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-01-21 15:35:05 -05:00
Mike Blumenkrantz b10344899d use zone obstacles for resist calculations 2016-01-21 15:34:26 -05:00
Mike Blumenkrantz 8d94637e28 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-01-21 14:43:52 -05:00
Mike Blumenkrantz 945eafd791 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-01-21 14:29:10 -05:00
Mike Blumenkrantz ec0cbc7ead remove duplicate E_Config_XKB_Option config descriptors
this appears to have been a copy/paste mishap

partially reverts e1369a24bd
2016-01-21 14:27:08 -05:00
Mike Blumenkrantz 3e8b5890bc enable surface visibility fallthrough for drag clients
more surfaces with no shell interfaces
2016-01-21 13:38:58 -05:00
Mike Blumenkrantz d689ab5e75 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-01-21 13:38:58 -05:00
Chris Michael d09b1030b8 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-01-21 11:28:31 -05:00
Mike Blumenkrantz d33a12b434 remove _e_comp_wl_focus_down_set()
this function does nothing for wayland clients and never should have
been used in this file
2016-01-20 17:06:50 -05:00
Mike Blumenkrantz 9c23679bac 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-01-20 17:06:45 -05:00
Mike Blumenkrantz 892c4a44ca 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-01-20 17:05:46 -05:00
Mike Blumenkrantz 039c08617e remove duplicate visibility setting blocks from wayland surface commit
this is already present (and identical) in state commit
2016-01-20 17:05:46 -05:00
Mike Blumenkrantz 1a47836723 always apply damages and input regions during wayland commit
mapped status is not relevant according to spec
2016-01-20 17:05:46 -05:00
Mike Blumenkrantz 97d8f26724 do not set focus in wayland client show callback for cursor clients 2016-01-20 17:05:46 -05:00
Mike Blumenkrantz fbedd9dcac 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-01-20 17:05:46 -05:00
Mike Blumenkrantz ba40fb5cb4 add wayland-only mouse action for translating a button press to a key
in some cases it might be desirable to remap a mouse button to a key.
this is not very user-friendly since it requires device-specific key names
which need to be translated to/from files such as /usr/share/X11/xkb/keycodes/evdev

 #SamsungFeatures
2016-01-20 17:05:30 -05:00
Mike Blumenkrantz 40c1e796fe add function for wayland compositors to generate (fake) keyboard events
in automated testing scenarios, being able to generate input events is useful
for detecting regressions related to keyboard actions

this depends on an xkbcommon function which is expected to be in the 0.6.0
release, so dlsym here in order to make that a runtime dependency for now
since this is not going to be a widely-used feature

 #SamsungFeatures
2016-01-20 17:03:17 -05:00
Chris Michael 01ae2a6287 fix compiler warning about comparison between signed and unsigned ints
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-20 15:10:36 -05:00
Mike Blumenkrantz 00d3cdd7ab remove WAYLAND_ONLY ifdefs from kbd layout change actions 2016-01-19 16:03:58 -05:00
Mike Blumenkrantz d4bbe0727e |= 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-01-19 13:52:07 -05:00
Mike Blumenkrantz 77485f322e 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-01-19 13:51:05 -05:00
Mike Blumenkrantz e3f829ace7 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-01-19 13:49:10 -05:00
Mike Blumenkrantz 0a2442d3b7 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-01-19 13:46:29 -05:00
Mike Blumenkrantz 0df8c94572 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-01-19 13:45:08 -05:00
Mike Blumenkrantz d52fffeec9 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-01-19 13:43:06 -05:00
Mike Blumenkrantz 092c834c5e Revert "Fix issue of compositor surface create passing wrong parameter to"
This reverts commit 67170f40a1.

this was changed intentionally to use the resource pointer in order to fix an
issue where external clients would reuse the same surface id,
thereby breaking the compositor with duplicate entries in the pixmap hash.

note, however, that internal windows in wayland DO use an int type pixmap id.
this is easily detected by checking the pid of the client for a window before doing
checks. this is necessary in order to be able to flag internal clients as internal
while still being able to match them with their surface id

also, uintptr_t is NOT indicative of an int type being used, it's an
int type which has the same size as a pointer, allowing casts between ints
and pointer.
2016-01-19 12:21:37 -05:00
Mike Blumenkrantz fbe959cccc remove need_reparent, reparented, first_damage flags from wl client comp_data
these flags, and related code, have no functional purpose in wayland
2016-01-19 12:10:49 -05:00
Chris Michael 1b36f93956 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-01-19 10:48:38 -05:00
Chris Michael 67170f40a1 Fix issue of compositor surface create passing wrong parameter to
e_pixmap_new function

e_pixmap_new (when creating wayland windows) is expecting to get a
uintptr_t type passed into it (surface id). Previously we were passing
the entire wl_resource.

ref T3058

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-19 10:48:38 -05:00
Marcel Hollerbach 37ad839f51 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-01-18 22:26:51 +01:00
Marcel Hollerbach 1c7cd941d0 xkbswitch: change icon if E_EVENT_XKB_CHANGED is emitted 2016-01-18 22:14:45 +01:00
Marcel Hollerbach bd7136ade1 xkbswitch: enable module for wayland 2016-01-18 22:14:45 +01:00
Marcel Hollerbach 8b2eb6fb8b e_xkb: emit changed event if ECORE_X_EVENT_XKB_STATE_NOTIFY is emitted 2016-01-18 22:14:45 +01:00