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
this fixes an issue where shrinking vertical shelves would cause vertically
maximized windows to always match the height of the shelf
possibly needs improving later depending on usage of zone obstacles in
the future...
in the case where an ANY context action exists and a SPECIFIC context action
also exists for the exact same binding (eg. alt+click), the action which was
added to the config first would be activated
this is unreliable and confusing since it's impossible for users to determine
the order without either manually examining the config or clearing all bindings
and starting over, and this presupposes that the user is even aware of such an
issue
instead, now the most specific binding context will be chosen, with ANY used only
as a fallback in the case where no other binding could be activated for a given
scenario
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
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
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
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
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
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
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
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
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>
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
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
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
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
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
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
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
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
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.
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>
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>
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
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
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
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
these are generic objects which can be added to indicate that there
is something blocking window placement at the edge of a screen/desk.
this replaces the traditional method of watching shelves to calculate
useful geometry with a managed object which will automatically trigger
a recalc whenever it is updated, and it allows non-shelf objects to
more easily register themselves as obstacles for window placement
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
Summary:
printf %m stringifies and prints errno. This is actually hugely confusing
if used in error messages after failures that don't set errno.
You may get "Success", or you may get an errno that was harmless ages
ago.
Some of the functions followed by %m have only some error paths that
set errno, or make multiple system calls that can set errno
independently - knowing the errno at failure time is unlikely to be
useful in these cases.
Reviewers: devilhorns, zmike
Reviewed By: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3571
This patch makes e_alert_main (the enlightenment_alert binary) work
for crashes when running with wayland (via the drm backend).
ref T2926
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
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
this fixes e's logs to include eina backtraces again. this is a
shortcoming of eina_log not being able to do multiple passes basically
(multiple outputs) per log.
this removes the per desktop profile config and replaces it with a
per-screen one that is tied to a specific display so it is far more
logical than per desktop. this allows e to set up different scaling
per screen for apps that use elementary for example via this derived
profile.
this of course is slightly problematic for e itself since it now uses
elm - as this will cause e to go kind-of-crazy with differing profiles
as it fights with itself and elm if 2 screens have different profiles.
this requires elm to be fixed to allow custom profiles per window.
this also currently won't switch profile of a window when you
reconfigure screens.
@feature
xx
there was previously no way to change the type of one of these objects,
meaning that if an object with a dropshadow should no longer have a dropshadow,
it must be re-created
Summary:
Set xkb context and keymap to Ecore_Drm.
In enlightenment (used in wayland with drm backend), keymap is used only one.
So for avoid unnecessary open keymap files, set cached context and keymap.
But for this, enlightenment must compile keymap before init ecore_drm.
So I changed booting sequence also.
Test Plan: Distinguish time between before and after during add a keyboard device.
Reviewers: raster, devilhorns, zmike
Subscribers: cedric, input.hacker, ohduna
Differential Revision: https://phab.enlightenment.org/D3504
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
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
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
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
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
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
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>
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
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
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
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>
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
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
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
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