Commit Graph

17744 Commits

Author SHA1 Message Date
Chris Michael 868ea0fb76 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:44:19 -05:00
Mike Blumenkrantz 0973acbd60 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-21 09:26:55 -05:00
Mike Blumenkrantz 73bcac7e72 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-21 09:26:55 -05:00
Mike Blumenkrantz b14a9ca273 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-21 09:26:55 -05:00
Mike Blumenkrantz 86fc2b4019 remove duplicate visibility setting blocks from wayland surface commit
this is already present (and identical) in state commit
2016-01-21 09:26:55 -05:00
Mike Blumenkrantz 04aebcbeda always apply damages and input regions during wayland commit
mapped status is not relevant according to spec
2016-01-21 09:26:55 -05:00
Mike Blumenkrantz cd2ed1fc78 do not set focus in wayland client show callback for cursor clients 2016-01-21 09:26:55 -05:00
Mike Blumenkrantz 813a78ca05 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-21 09:26:55 -05:00
Mike Blumenkrantz 8999b6029d 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-21 09:26:55 -05:00
Mike Blumenkrantz efc247c376 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-21 09:26:55 -05:00
Chris Michael a4f3966afe fix compiler warning about comparison between signed and unsigned ints
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 09:26:55 -05:00
Chris Michael 5ec50a9e74 Add support for configuring output rotations
When running under DRM, this patch adds support for getting the
supported rotations of an output, listing them in the Screen Setup
dialog, and adds the ability to set a rotation on a given screen

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-20 10:54:18 -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
Marcel Hollerbach 7e74ad229c e_xkb: emit changed event if wayland keyboard has changed 2016-01-18 22:14:45 +01:00
Mike Blumenkrantz d12c5f9474 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:01:23 -05:00
Mike Blumenkrantz 352d023d76 use more correct defines for enabling wl output modules during comp init 2016-01-18 14:54:18 -05:00
Mike Blumenkrantz 4d717df870 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 14:52:53 -05:00
Mike Blumenkrantz 262b303984 use 2/3 screen size for wl output (nested) compositor size
1/4 screen size is a compositor for ants
2016-01-18 14:52:11 -05:00
Mike Blumenkrantz f8a0cbd534 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 13:46:31 -05:00
Mike Blumenkrantz 1dd45a3cc1 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 13:36:17 -05:00
Mike Blumenkrantz 3057b34098 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 13:36:11 -05:00
Mike Blumenkrantz 45be3360d8 apply zone coords when calculating zone useful geometry
calculated coords in this case have not yet been normalized for the
zone which they correspond to

ref bdd175a47a

fix T3061
2016-01-16 15:00:46 -05:00
Marcel Hollerbach dcbf258a35 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-16 12:20:43 +01:00
Mike Blumenkrantz ac809440e9 add function for creating a demo version of the lockscreen
this provides a simple way to (pre)view the current lockscreen without
fully locking down the compositor
2016-01-15 19:25:25 -05:00
Mike Blumenkrantz de59970690 set zone-based name on lokker comp objects
allows identification of desklock objects in events
2016-01-15 19:24:29 -05:00
Mike Blumenkrantz f12b6b9385 update existing shelf obstacle geometries on shelf move/resize
...instead of deleting and recreating the obstacles
2016-01-14 17:08:53 -05:00
Mike Blumenkrantz b1a0a91f83 only recalc shelf obstacles on desk count change if shelf uses desk_show_mode 2016-01-14 16:44:02 -05:00
Mike Blumenkrantz 297dbc6bdf use zone obstacles when generating list of obstacles in smart place
this should also fix an issue where shelves on other screens were not
blocking window placement in some cases
2016-01-14 16:16:57 -05:00
Mike Blumenkrantz a1576f2027 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-01-14 16:12:21 -05:00
Mike Blumenkrantz 5d63b07ca3 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-14 15:53:36 -05:00
Mike Blumenkrantz 5ec690512d use zone obstacles for window placement during shelf coverage calcs 2016-01-14 15:50:40 -05:00
Mike Blumenkrantz f033d5616a update shelf obstacles on move/resize 2016-01-14 15:20:13 -05:00
Mike Blumenkrantz bdd175a47a implement zone obstacles for calculating useful geometry
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
2016-01-14 15:13:57 -05:00
Mike Blumenkrantz 4d55682362 make E_DESK_TYPE an int define
this was causing unsigned vs signed comparison warnings
2016-01-14 15:13:57 -05:00
Mike Blumenkrantz 78c6b4c234 make e_desk_at_xy_get() const 2016-01-14 15:13:57 -05:00
Mike Blumenkrantz 4b2e75176b 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-14 15:13:57 -05:00