Commit Graph

10067 Commits

Author SHA1 Message Date
Mike Blumenkrantz 8629d8a308 set e_comp->elm as fullscreen for internal elm hinting 2015-03-18 10:58:34 -04:00
Mike Blumenkrantz d4c0a663cf only throw frame object size CRI for X comp objects 2015-03-17 16:15:23 -04:00
Boram Park 7c41fb431d fix tty problem when enlightenment(drm-backend) is killed by SIGSEGV
Summary:
    When enlightenment is working as wayland display server, enlightenment
    changes KDSETMODE to KD_GRAPHICS in _ecore_drm_tty_setup(). However,
    when enlightenment is killed by SIGSEGV, it doesn't changes KDSETMODE
    to KD_TEXT because englightenment process doesn't call ecore_drm_tty_close().

    When enlightenment is killed by SIGSEGV, it should get drm devices with
    ecore_drm_device_get_list(), and will call ecore_drm_launcher_disconnect(),
    and ecore_drm_launcher_disconnect will call ecore_drm_tty_close() internally.

Change-Id: I425488eb4489709cc968b77bd4bc48a4aa4ae30c

Reviewers: zmike, cedric, raster, gwanglim, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2160
2015-03-17 09:33:55 -04:00
Derek Foreman feca6dce4f Wayland frame callback times are in milliseconds
Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2173
2015-03-16 13:35:16 -04:00
Bryce Harrington 7e24e3256f wayland: Free temporary string on error exit
Summary: wayland: Free temporary string on error exit

Reviewers: cedric, devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2154
2015-03-13 21:04:50 -04:00
Bryce Harrington ba7feb62f8 wayland: whitespace cleanup
Reviewers: cedric, devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2154
2015-03-13 21:03:56 -04:00
Bryce Harrington f4cb6a398b uuid: Check error on ftruncate call
Summary:
Fixes warning:

src/bin/e_uuid_store.c:71:4: warning: ignoring return value of
‘ftruncate’, declared with attribute warn_unused_result
[-Wunused-result]
    ftruncate(store->shmfd, TABLE_SIZE);
        ^

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2156
2015-03-13 20:26:24 -04:00
Bryce Harrington 673de24fa7 wayland: Handle failure to init a display screen
Summary:
e_comp_wl_output_init will fail (silently) under a couple of
conditions.  Instead, make it propagate the error so it can be handled
at a higher level.  For now just issue an error message.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: cedric, devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2155
2015-03-13 20:06:01 -04:00
Mike Blumenkrantz f225f04002 bump modapi version to 15 2015-03-13 20:03:21 -04:00
Mike Blumenkrantz 4deb313dd6 e_util_comp_desk_count_get() -> e_desks_count()
also wtf is this double loop counting
2015-03-13 17:58:48 -04:00
Mike Blumenkrantz fe2bc2346f remove e_util_zone_current_get() 2015-03-13 17:58:48 -04:00
Mike Blumenkrantz 09ec213a31 remove e_util_zone_current_get() usage 2015-03-13 17:58:45 -04:00
Mike Blumenkrantz ba7c1ac49c remove E_Zone->comp member 2015-03-13 17:44:24 -04:00
Mike Blumenkrantz f9f7f001c9 use correct wayland ifdef for E_Client uuid generation 2015-03-13 17:29:34 -04:00
Mike Blumenkrantz 34d906fa42 e_zone functions no longer require E_Comp param 2015-03-13 17:28:49 -04:00
Mike Blumenkrantz 1736d1ecb9 e_client functions no longer require E_Comp param 2015-03-13 16:53:19 -04:00
Mike Blumenkrantz d00127c2f5 e_comp functions no longer require E_Comp param 2015-03-13 16:48:41 -04:00
Mike Blumenkrantz b7f2777809 remove e_util_comp_current_get() 2015-03-13 16:28:49 -04:00
Mike Blumenkrantz b63e490a33 remove e_util_comp_current_get() usage 2015-03-13 16:28:08 -04:00
Mike Blumenkrantz 50839a51a9 remove e_comp_evas_find() 2015-03-13 16:24:27 -04:00
Mike Blumenkrantz f130aeafce remove e_comp_evas_find() usage 2015-03-13 16:23:37 -04:00
Mike Blumenkrantz bacf638d73 remove E_Drag->comp and E_Comp param from e_drag_new() 2015-03-13 16:21:15 -04:00
Mike Blumenkrantz 2a9296e0ec remove E_Event_Compositor_Resize struct
corresponding event no longer sends event info
2015-03-13 16:12:35 -04:00
Mike Blumenkrantz 1fe1c94245 comp canvas functions no longer require an E_Comp param 2015-03-13 16:07:08 -04:00
Mike Blumenkrantz 2461c6b50d remove unnecessary E_Comp references in comp object callbacks 2015-03-13 15:49:04 -04:00
Mike Blumenkrantz 91edd1ce2f E_CLIENT_*FOREACH() macros no longer take a E_Comp param 2015-03-13 15:45:07 -04:00
Mike Blumenkrantz 091142b032 remove E_Client->comp 2015-03-13 15:41:21 -04:00
Mike Blumenkrantz 96b13f2620 remove E_Comp_Object->comp member 2015-03-13 15:28:42 -04:00
Mike Blumenkrantz 00440e740a remove e_comp_util_evas_object_comp_get() 2015-03-13 15:24:33 -04:00
Mike Blumenkrantz dd5cf53542 remove e_comp_util_evas_object_comp_get() usage 2015-03-13 15:24:13 -04:00
Mike Blumenkrantz c8fcff8109 remove e_util_comp_zone_id_get() and e_util_comp_zone_number_get() 2015-03-13 15:20:41 -04:00
Mike Blumenkrantz b8d4072a13 e_util_comp_zone_number_get() -> e_comp_zone_number_get() 2015-03-13 15:18:16 -04:00
Mike Blumenkrantz a8f9c44b46 remove e_comp_get() function 2015-03-13 15:13:01 -04:00
Yomi b5ed3c9fea change DESKTOP env setting on startup
Summary:
From Enlightenment 17 to Enlightenment.

Seems e17 keeps popping up...
rEdb6aeef2b1a9c831fa0901e499dd8f73ff733836
rEec1cd25cfe666665b9e5641c91d3ad1fd2f9f11c

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2147
2015-03-12 18:55:47 -04:00
Mike Blumenkrantz 289c6f0d1f send client sizes for wl configure events when fullscreening/maximizing 2015-03-12 15:19:52 -04:00
Mike Blumenkrantz b533ad67f3 remove unused wl variables 2015-03-12 15:15:40 -04:00
Mike Blumenkrantz 662d9fea2d don't reset placement of internal wl clients on first commit
fixes placement of evry et al
2015-03-12 15:14:27 -04:00
Mike Blumenkrantz 08328f0c19 conditionally compile elm win trap wayland functionality 2015-03-12 14:28:18 -04:00
Mike Blumenkrantz a7dae25236 Revert "e - fix build when wayland not enabled"
This reverts commit 413ca8046e.

broke wayland runtime: wrong define names, wrong usage
2015-03-12 14:23:22 -04:00
Mike Blumenkrantz 3f8d2d0596 disable wl client hide animations even with gl
broken until we start making textures for rendering clients
2015-03-12 13:24:42 -04:00
Carsten Haitzler 03f05d16e5 e clients - make sure we handle client with a NULL zone 2015-03-11 18:34:38 +09:00
Mike Blumenkrantz d93bb6c899 don't modify pixmap hash when changing pixmap parent window
moderately certain I originally wrote this to work in the other direction
and then failed to remove it when I switched to setting parents instead of
children. regardless, pixmap hash should not be changed here
2015-03-10 18:29:09 -04:00
Mike Blumenkrantz 4c96e40f55 CRI on attempting to change a pixmap's client when pixmap already has client
this should never occur, so do something if it does since it means there's a big problem
2015-03-10 18:28:18 -04:00
Mike Blumenkrantz bb436e6750 don't reuse wl surface pixmaps without adding a ref 2015-03-10 16:37:57 -04:00
Derek Foreman 281f283d7d Wayland: more checks to avoid consuming serials needlessly
Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2135
2015-03-10 16:24:46 -04:00
Mike Blumenkrantz 808ab60181 fix invalid eina list usage when merging wl surface frame list 2015-03-10 16:11:57 -04:00
Bryce Harrington 13f4582c76 wayland: Check for potential OOM from wl_array_add()
Summary:
wl_array_add() returns NULL if it can't malloc/realloc.  This
is probably unlikely but check for it and issue a meaningful error if it
occurs.

Reviewers: cedric, devilhorns, zmike, raster

Reviewed By: raster

Subscribers: raster, cedric

Differential Revision: https://phab.enlightenment.org/D2054
2015-03-10 15:07:38 +09:00
Derek Foreman b7f3a81f59 Send modifiers to wayland clients on focus in
Summary:
If we don't update the modifiers on focus in we can end up with stuck
modifiers if a modifier is held when starting a client.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2124
2015-03-09 16:37:02 -04:00
Derek Foreman 5c345bf37f Break e_comp_wl_input_keyboard_modifiers_update into two functions
Summary:
Separate the state serialization from the send so we can use the
serialization function elsewhere.

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2123
2015-03-09 15:49:08 -04:00
Derek Foreman 8c7364b682 Don't update xkbstate when no app has focus
Summary:
We still update the keyboard array.  focus_in adds everything in the
array to xkbstate anyway, so adding it when there's no focus results
in a double update of state and potentially stuck modifiers.

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2111
2015-03-06 18:55:39 -05:00
Mike Blumenkrantz 567802f251 fix crash when using e_comp_object_util_center_pos_get() with non comp_objects 2015-03-06 17:59:43 -05:00
Mike Blumenkrantz 143c0a9292 fix horizontal/vertical smart maximize
fix T2170
2015-03-06 17:16:24 -05:00
Mike Blumenkrantz 7147b7d54b remove unnecessary wl client pixmap checks
these are direct object callbacks so they will only be triggered on wl clients
2015-03-06 16:02:49 -05:00
Mike Blumenkrantz 961a56ea10 use stderr messages when failing to init X compositor
can't show error dialogs when we're about to exit, may as well print something useful

fix T2182
2015-03-06 15:00:52 -05:00
Mike Blumenkrantz 691c5187c2 exit immediately if any unrecognized arg is passed on startup
ref T2182
2015-03-06 14:57:58 -05:00
Mike Blumenkrantz e8d408650f disable wl clients in X
this is untested and undeveloped, no point in leaving it around to crash randomly
2015-03-06 14:52:12 -05:00
Derek Foreman 6e4214c8ad Fix stuck modifiers on client exit
Summary:
We still need to remove the active keys when focus_out happens, even
if the pixmap is already gone.  If we don't and a modifier was held
down during exit then the xkb state will have that modifier stuck
forever.

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2110
2015-03-06 13:08:24 -05:00
Mike Blumenkrantz 08b9194c12 don't require client mirror object existence to hide dead comp object mirrors 2015-03-05 14:57:49 -05:00
Mike Blumenkrantz 02134369c0 only hide comp object images for dead clients on smart hide 2015-03-05 12:44:27 -05:00
Mike Blumenkrantz b9f797a277 flag non-internal wl shm clients as dead and delete mirrors on hide
no more crashing?
2015-03-05 12:18:27 -05:00
Mike Blumenkrantz 6696c99a26 trivial move comp object function 2015-03-05 12:18:06 -05:00
Mike Blumenkrantz 38e12a0370 add E_Client->dead to mark clients that should immediately be removed from the compositor
theme_shadow was unused
2015-03-05 12:16:53 -05:00
Mike Blumenkrantz 7e8d442ac3 force non-internal wl clients to hide when gl is not available 2015-03-05 11:59:29 -05:00
Mike Blumenkrantz caddd0f1d5 hide comp object image on smart hide
ensure that this is not being rendered anywhere at the time of hide
2015-03-05 11:56:26 -05:00
Mike Blumenkrantz 230033aa67 Revert "when we get a request to close client app, defer resource deletion"
This reverts commit 1cf7c1f151.

didn't fix the issue and obfuscated the code unnecessarily
2015-03-05 11:41:43 -05:00
Mike Blumenkrantz c9ef6e5c77 re-setting same cursor object updates hotspot as expected 2015-03-05 11:27:23 -05:00
Mike Blumenkrantz ac7a94261a never resize client clip object 2015-03-04 17:07:39 -05:00
Mike Blumenkrantz a38a34d599 set ec->fullscreen before applying fullscreen geometry 2015-03-04 15:52:16 -05:00
Mike Blumenkrantz de17793fe3 reapply wl surface focus during commit when necessary 2015-03-04 15:36:23 -05:00
Mike Blumenkrantz b069009a16 grab wl shell surface geom and use for adjusting resize operations
I think this still may not be 100% perfect,
but it's more like 95% perfect now instead of 50%
2015-03-03 16:48:25 -05:00
Chris Michael bc160488d8 enlightenment: Implement support for wl_data_device_interface "release" event
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-03 11:59:52 -05:00
Chris Michael 6e34bc32a0 don't install SIGBUS handler if we are running wayland-only
Wayland shm sets up a sigbus handler for catching invalid shm region
access. If we setup our sigbus handler here, then the wl-shm sigbus
handler will not function properly

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-03 09:54:23 -05:00
Chris Michael 1cf7c1f151 when we get a request to close client app, defer resource deletion
until After close animation has been run

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-02 15:42:26 -05:00
Mike Blumenkrantz c6f0597774 remove ec->awaiting_hide_event
no longer used
2015-03-02 14:27:29 -05:00
Mike Blumenkrantz e703b40073 improve wl grab resize calcs 2015-02-28 16:48:07 -05:00
Mike Blumenkrantz f62ab0a819 update+clamp wl surface client size to buffer size during commit
this is the same as the X render loop behavior, just in a different place
2015-02-28 15:46:16 -05:00
Mike Blumenkrantz 57c36f92a2 send different values to wl clients for configure when performing a resize action
the calculated values here seem to not be sufficiently accurate to manage a calculated resize.
instead, calc relative pointer coords and send them

 #barrel
2015-02-28 15:43:12 -05:00
Chris Michael 327e422aab set output->scale to e_scale, and when we wl_output_send_scale
actually send output->scale

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-28 11:36:42 -05:00
Bryce Harrington f92e241e8e wayland: Make sure we're initializing output scale sensibly
Summary:
By default the E_NEW() will create our output objects with a 0.0 scale,
which doesn't make any sense and if anything will lead to crashes.
Instead use a scale factor of 1.0.

When updating output details, if the scale setting is invalid then set
it to 1.0 as a sensible value.

Note this doesn't actually enable scaling, just helps make sure we're
not injecting invalid scale parameters from the start.

Reviewers: zmike, devilhorns, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2078
2015-02-27 19:45:25 -05:00
Bryce Harrington 9a4024a20a wayland: Refactor output initialization code
Summary:
The code to initialize outputs has duplicate stanzas for updating the
data members of the output structure.  This set of refactoring steps
shuffles things around to eliminate the redundant code.  I think this
also makes the code easier to follow too.

This also breaks out a new internal routine for looking up outputs by
id.  I suspect this will have general usefulness later.

Reviewers: devilhorns, cedric, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2077
2015-02-27 19:23:11 -05:00
Mike Blumenkrantz 5bac79422e remove wl client resize idler, send ec->w/h instead of ec->client.w/h on resize
this idler makes sense in X where there is a third party display server but not in wl
2015-02-27 15:56:14 -05:00
Mike Blumenkrantz 2e6c593295 noop when setting pointer object if re-setting same object 2015-02-27 15:07:24 -05:00
Chris Michael 8a76018025 remove missed use of E_COMP_WL_PIXMAP_CHECK macro
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-27 10:59:59 -05:00
Bryce Harrington c802239534 wayland: Document the public API
Summary: Add doxygen comments for public API members

Reviewers: zmike, cedric, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2067
2015-02-27 09:24:59 -05:00
Bryce Harrington 8441520030 wayland: Eliminate extraneous E_COMP_WL_PIXMAP_CHECK macro
Summary:
Many of the functions in the compositor do some preliminary checks, to
ensure objects are valid and the right type.  Most of the checks follow
a consistent pattern, for example:

    if (!(ec = data)) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (ec->iconic) return;

This style makes it pretty straightforward to review the pre-conditions
of the function.

The one exception is the check to see if an object is a wayland pixmap;
this is implemented as a C macro.

     E_COMP_WL_PIXMAP_CHECK;

The name of the macro is descriptive enough, but it conceals what is
actually being checked.  I think that it is clearer and fits better with
the style of the rest of the pre-condition checks for this check to just
be shown as regular C code:

     if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;

Reviewers: zmike, cedric, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2066
2015-02-27 09:21:55 -05:00
Bryce Harrington 82e155eac6 wayland: Fix missing check on E_NEW return
Summary:
All other E_NEW calls in this file check the return value, except this
one place.  In this function, other calls are being checked for NULL and
handled so this one should as well.  The other handlers in this function
follow the style of issuing an error message, freeing objects, and
returning false; we don't need to free anything so just do the error
message and return.

Reviewers: zmike, cedric, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2065
2015-02-27 09:18:27 -05:00
Mike Blumenkrantz 8b40a12899 update wl xdg states on maximize/fullscreen events 2015-02-26 22:32:14 -05:00
Mike Blumenkrantz 69c4bc64db don't send wl mouse button events when client's menu is active 2015-02-26 21:55:34 -05:00
Mike Blumenkrantz e908d9a838 unify wl comp mouse button callback checks 2015-02-26 21:54:17 -05:00
Bryce Harrington 126d658914 wayland: Whitespace cleanup
Summary: Cosmetic

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2061
2015-02-26 16:42:27 -05:00
Mike Blumenkrantz b06111b00e reject ignored clients from client mouse event functions 2015-02-26 16:17:10 -05:00
Chris Michael 35c3eb7dcf fix compile issue due to output change and fixup subsurface creation to match new "state" paradigm
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-26 15:33:40 -05:00
Chris Michael b6be9efe26 Implement buffer_reference to fix client resizing issue
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-26 15:33:40 -05:00
Chris Michael 88f44e1a1d adjust wayland compositor scale when we adjust e_scale
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-26 15:33:40 -05:00
Chris Michael 0ac3045827 add a surface_state structure to E_Comp_Wl_Client_Data
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-26 15:33:39 -05:00
Derek Foreman dd2058d8a6 Don't crash when an error pop-up occurs before the compositor is set up.
Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2059
2015-02-26 14:43:10 -05:00
Bryce Harrington 5bebba3036 wayland: Refactor out common mouse handling code
Summary:
These two functions are nearly identical so move much of the common code
into a helper function.

Reviewers: cedric, devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2053
2015-02-25 22:00:11 -05:00
Manuel Bachmann a5a27dee14 build: allow building in pure Wayland mode (no xcb, no ecore-x)
Summary:
We should be building Enlightenement with "--enable-wayland-only"
even if xcb, ecore-x... are not present. The Evas wayland-shm
engine will then be a prerequisite, though.

E_Alert being too much X11-oriented, let us disable it completely
before it is ported.

Also, do not require the X11 rendering engines at runtime.

Reviewers: stefan, devilhorns

Reviewed By: devilhorns

Subscribers: stefan_schmidt, stefan

Projects: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D1986
2015-02-25 09:33:40 +01:00
Carsten Haitzler 6097f06b26 e - menus - fix submenu popup direction when zones are not at 0 y 2015-02-25 15:55:08 +09:00
Carsten Haitzler 03c53655ce e - menus - fix autoscroll on zones not at 0 y... 2015-02-25 15:31:00 +09:00
Bryce Harrington 89dbb9bd27 cosmetic: Whitespace cleanup of wayland client files
Summary:
cosmetic: Cleanup whitespace for wayland compositor

There is excess trailing whitespace in several of the files for the
wayland implementation.  These patches attempt to apply the spacing
rules for Enlightenment as documented at:
https://phab.enlightenment.org/w/coding_convention/

The whitespace rules are applied using the following emacs tabbing
settings:

 (defun start-efl-c-mode ()
  "C mode with adjusted defaults for use with Enlightenment
  development."
  (interactive)
  (c-mode)
  (c-set-style "gnu")
  (setq tab-width 8)
  (setq indent-tabs-mode nil)
  (setq c-basic-offset 3)
  (setq defun-block-intro 3)
  (setq statement-block-intro 3)
  (setq case-label 1)
  (setq statement-case-intro 3)
 )

This patchset also eliminates all tabs in favor of whitespace, as per
the coding style rules.

Reviewers: zmike, cedric, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2048
2015-02-24 17:34:20 -05:00
Chris Michael e8d0ac4f2d append E_Comp_Wl_Output to compositor's output list during output_init
call

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-24 15:27:48 -05:00
Chris Michael e36d2f5235 don't remove E_Comp_Wl_Output on unbind as this Could lead to nasty
crashes if a second client tries to bind wl_output

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-24 15:17:07 -05:00
Derek Foreman 1da3aa24dd Fix wl_output tracking in wayland compositor
Summary:
We should keep a list of resources per output to propagate wl_output
changes to each client that bound an output.

The output list now contains all outputs, not just bound ones.

Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2047
2015-02-24 15:10:37 -05:00
Bryce Harrington 40998b8a6e Code cleanup and check for OOM condition with wl_array_add
Summary:
wayland: Check wl_array_add return for OOM condition
cosmetic: Make error return check syntax consistent with rest of code
wayland: Reuse use_adj to track child-forced adjust
wayland: Refactor to collapse if chain
wayland: Refactor _e_comp_wl_client_priority_adjust to collapse if chain
 + This uses early returns to unwrap a couple if clauses to make the code a bit less nesty.
wayland: Refactor if statements for consistency with rest of file

Reviewers: cedric, zmike, devilhorns

Subscribers: devilhorns, cedric

Differential Revision: https://phab.enlightenment.org/D2034
2015-02-24 14:47:56 -05:00
Chris Michael a8eb773752 Fix T2131 (crash when creating wl_outputs)
This fixes the crash and creates outputs based on e_randr
configuration (when in wayland-client mode).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-24 13:25:22 -05:00
Chris Michael be6c62eb34 add E_Comp_Wl_Output structure and function prototype to create outputs
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-24 13:24:56 -05:00
Carsten Haitzler c28e58284a efm - make dir listing far faster - no file magic content and dont sync
this speed sup dir listing in efm drastically. first the e fm back end
uses an io thread that just spools through everything fast and sends
it over the mainloop to then send by ipc to e.

and on the e side we no longer use the heavy file internal magic using
api calls that wander all over a file for magic numbers - this is
insanely slow and brings listing to a crawl.
2015-02-24 18:36:31 +09:00
Mike Blumenkrantz 7d5d2c83d1 don't clamp bgpreview vsize if bgpreview is a fullscreen overlay 2015-02-23 17:31:52 -05:00
Mike Blumenkrantz 1a011b0fd5 fix dialog sizing when icon setting fails 2015-02-23 16:48:09 -05:00
Carsten Haitzler 7faf6666e5 e - actions - smart suspend/hibernate - also dont do when on mains power 2015-02-23 12:11:50 +09:00
Carsten Haitzler e60889981e randr2 - handle missing clone src and walk back config only structs 2015-02-23 12:11:46 +09:00
Mike Blumenkrantz 9dee41f1a3 do not reapply focus on canvas object ungrab/close for pointer-focus enthusiasts 2015-02-20 09:55:20 -05:00
Chris Michael 8e6d512076 change output_bind function name
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-19 17:02:46 -05:00
Chris Michael 6458ac3f8e fix some formatting ugliness
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-19 17:02:04 -05:00
Chris Michael 2d4db291d2 fix compiler warning about pointer targets differ in signedness
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-19 17:00:24 -05:00
Derek Foreman 4276b3ac55 Provide wl_output interface to clients
Reviewers: devilhorns, zmike

Reviewed By: devilhorns, zmike

Subscribers: cedric

Maniphest Tasks: T2131

Differential Revision: https://phab.enlightenment.org/D2007
2015-02-19 14:49:01 -05:00
Mike Blumenkrantz 23c4d42e4c rename extremely frustratingly-named E_Screen_Limits enum and members
this came in a patch that I take full responsibility for not adequately reviewing at the time.
the names are confusing and counterintuitive, and it does not properly include the client namespace.
2015-02-18 18:34:29 -05:00
Mike Blumenkrantz 1f21efd911 clamp client size to screen when client limit policy does not allow offscreen
fix T1779
2015-02-18 18:26:16 -05:00
Mike Blumenkrantz baa9cfeac1 don't send unfocused signal to override clients
fix T2099
2015-02-18 16:35:10 -05:00
Mike Blumenkrantz 7b53d6b19c use direct path for setting icons in util theme set function when icon is a path
fix T1888
2015-02-18 16:14:09 -05:00
Tom Hacohen 86654c86f8 Allow building without ptrace
Summary: Building without ptrace (on OSes which do not support it, like OpenBSD) did not work, because the fallback code had small typos.

Reviewers: devilhorns

Projects: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D1990
2015-02-18 12:36:20 +00:00
Mike Blumenkrantz fbad4c7fd8 block linear desk flips that would wrap if desk flip wrapping is disabled
fix T1948
2015-02-17 18:54:39 -05:00
Mike Blumenkrantz 1a4be248fe don't revert X focus during nocomp 2015-02-17 18:42:47 -05:00
Mike Blumenkrantz 6e504751b1 revert some comp object debugging bits that snuck into another commit 2015-02-17 17:21:37 -05:00
Chris Michael 0094ba4bf7 enlightenment: Fix building for wayland-only
We don't have e_randr2 calls for wayland yet, so ifdef those out if we
are building for wayland only

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-17 10:46:19 -05:00
Vincent Torri f31ed5bcb1 add MIN define for non-linux systems 2015-02-15 17:54:10 -05:00
Carsten Haitzler c37a55d573 actions - add smart suspend + hibernate actions for laptop usage
this adds 2 actions that only suspend a laptop (or hibernate) if there
are no external screens enabled. if there is no lid screen eg like a
desktop, then it will still go on as usual.
2015-02-15 10:53:54 +09:00
Mike Blumenkrantz 1d069ab3b6 add ctrl+alt+backspace to kill wl-only e
#barrel
2015-02-13 16:40:14 -05:00
Mike Blumenkrantz 1301453fa4 only reject client mouse out for X clients
not sure this is still applicable since systray xembeds are gone
2015-02-13 16:24:24 -05:00
Mike Blumenkrantz 62328e0c90 remove wl override clients from focus stack
no more client cursor clients in winlist hoorayyyyy
2015-02-13 15:48:00 -05:00
Mike Blumenkrantz e2b02d07d5 add first YOLO: e_client_focus_stack_set()
to quote ecore docs:

DO NOT use this function unless you are the person God comes to ask for
advice when He has trouble managing the Universe.
2015-02-13 15:46:52 -05:00
Mike Blumenkrantz 0af86790b4 add YOLO define to throw a compile warning for Extremely Dangerous Functions
a deprecated warning isn't ideal, but at least maybe someone will look at why there's a warning
2015-02-13 15:46:04 -05:00
Mike Blumenkrantz 23aad426aa remove some futile attempts at variable setting in wl client new hook
none of these attrs are available at this point so the client attrs can't be set
2015-02-13 15:17:48 -05:00
Mike Blumenkrantz 00475b8be8 prevent client cursor clients from receiving focus 2015-02-13 15:11:43 -05:00
Mike Blumenkrantz a1af6fbdce remove unused var 2015-02-13 15:11:33 -05:00
Derek Foreman 4b98489019 Conditionally ignore wayland cursor set events
Wayland cursor set events should be ignored if the client sending them
doesn't own the surface the pointer is currently in.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-02-13 13:47:38 -05:00
Carsten Haitzler 054adb6351 e - randr - handle missing relative display and use priority for zone
this makes highest priority screen the lowest (0) zone. this also
handles missing screesn that you are relative "of". missing clones are
not working atm. also zone reconfigure moves windows now too
2015-02-13 19:24:31 +09:00
Mike Blumenkrantz 67bbd1fe03 manage client pointer client hidden states when changing pointer cursor objects
fixes sticky cursors
2015-02-12 20:07:35 -05:00
Mike Blumenkrantz 9a6cddf91f don't clear wl surface input tiler during commit
this broke input regions for successive frames
2015-02-12 19:30:21 -05:00
Mike Blumenkrantz fdeedef7fe add E_Client->mouse.in for determining mouse-in status 2015-02-12 16:18:46 -05:00
Mike Blumenkrantz e34548db01 remove unused E_Client->input_object
this is a relic from E18
2015-02-12 16:17:50 -05:00
Mike Blumenkrantz 5846e0febe unset wl client placed value on first commit to force placement
many clients still have not had a first commit prior to running new_client placement,
so this will force a second run of that algo to prevent placing as though a client's
size = 1x1
2015-02-11 17:58:27 -05:00
Mike Blumenkrantz aca462cb8c don't add wl evas callbacks multiple times
#sigh
2015-02-11 17:22:55 -05:00
Mike Blumenkrantz 6bf43fa081 don't use garbage values for new_client wl surface configures 2015-02-11 17:20:03 -05:00
Mike Blumenkrantz 9a82f7bcb0 reapply accurate ec->placed value for wl clients during surface commit configure
fixes client placement when client has not been placed prior to first commit
2015-02-11 17:14:28 -05:00
Mike Blumenkrantz e1e711ce53 use pixmap size for wl subsurface commit configure 2015-02-11 17:08:06 -05:00
Mike Blumenkrantz 491825c05f move map before configure for wl clients during commit
this ensures visibility is set correctly before attempting to set geometry
2015-02-11 17:02:01 -05:00
Mike Blumenkrantz 5ecc0ca0a1 use accurate xy coords for wl surface configures 2015-02-11 17:00:28 -05:00
Mike Blumenkrantz 77da958137 remove nonsensical wl client finding code
if the pixmap has no client set, no client exists for the pixmap
2015-02-11 16:23:07 -05:00
Mike Blumenkrantz 9006bb61e5 set wl client keyboard focus on evas focus and commit
ensure that focus is applied even if there is no new frame
2015-02-11 11:51:39 -05:00
Carsten Haitzler adf5b5dc84 e - remove earns from randr2
for wahetever reason i dont get warnings from gcc:

-Wno-shadow -Wno-unused-but-set-parameter -Wno-clobbered -W -Wall -Wextra

are the warning flags i get and i simplt dont get a tonne like using
uninitialized var. don't know why.
2015-02-11 21:45:39 +09:00
Carsten Haitzler da7bb6e9a1 shut up shadow warnings 2015-02-11 12:28:29 +09:00
Carsten Haitzler 956aac9341 e - fix build. build break! 2015-02-11 10:47:02 +09:00
Mike Blumenkrantz 4d80185e69 send wl keyboard enter during commit
in some cases this was happening before the kbd resource was available; this guarantees that it will be
2015-02-10 19:17:50 -05:00
Mike Blumenkrantz c4ba0f5242 setup evas callbacks for wl clients during commit
this was happening way too late and breaking some clients
2015-02-10 19:17:11 -05:00
Mike Blumenkrantz c9a839ad64 unset wl client cursor when no surface resource is passed
this is probably not correct, but #barrel
2015-02-10 19:15:53 -05:00
Mike Blumenkrantz e3efba7ff7 set take_focus more appropriately for wl clients 2015-02-10 19:15:22 -05:00
Mike Blumenkrantz fff95929c6 apply client focus glow based on opaque region 2015-02-10 18:08:39 -05:00
Mike Blumenkrantz d97c6b04bb redo pixmap image border to take xywh instead of lrtb
client size is not set by the time opacity is set so it's necessary to store the full rect
2015-02-10 18:07:41 -05:00
Mike Blumenkrantz 090261bc1b don't add rect for entire screen on wl region create 2015-02-10 17:30:05 -05:00
Mike Blumenkrantz 362a505567 set client image borders even when 0
opaque region can be reset to nonexistent
2015-02-10 16:40:12 -05:00
Chris Michael 1c5e71bffc fix e_pixmap compile for non-wayland usecase
pixmap->border is only defined if we have some wayland support. Not
used in X11.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-10 12:41:27 -05:00
Mike Blumenkrantz 7e422ed0c2 remove wl opaque tilers, just set border in opaque callback 2015-02-09 21:27:53 -05:00
Mike Blumenkrantz ce062750b6 set pixmap image borders for wayland clients 2015-02-09 21:16:40 -05:00
Mike Blumenkrantz b0ef692817 handle image borders during client rendering 2015-02-09 21:14:18 -05:00
Mike Blumenkrantz 06defb7f94 fix wl input region setting 2015-02-09 21:14:18 -05:00
Mike Blumenkrantz d54d6640e8 don't set client shape rects based on wl opaque regions 2015-02-09 21:14:18 -05:00
Mike Blumenkrantz 536342c085 add pixmap image border functions 2015-02-09 21:14:15 -05:00
Mike Blumenkrantz bce8470cef correctly set/update wl opaque regions 2015-02-09 20:44:01 -05:00
Mike Blumenkrantz 1bf6603baa force wl client cursor clients to hide when unset from pointer 2015-02-09 14:35:37 -05:00
Mike Blumenkrantz f39630fc8c use unixtime instead of loop time for wl frame callback done 2015-02-09 14:17:44 -05:00
Mike Blumenkrantz ee530798f0 replace all occurrences of cursor setting with calls to pointer util function 2015-02-09 12:24:48 -05:00
Mike Blumenkrantz 2a1525bdb0 add pointer util function for changing cursor object without deleting it 2015-02-09 12:24:48 -05:00
Carsten Haitzler 790183d74a e - randr - laptop lids - handle plug/unplug and well as lid open/close
this fixes some issues in the new randr2 code that made it not work
right with plug/unplug and lid close/open. now it does work right and
plugging/unplugging displays is seamless (if your driver does not give
plug/unplug events bind a key to update screen config acvtion and e
will figure it out when you hit the key).
2015-02-09 18:22:02 +09:00
Chris Michael 3dff7d4dad enlightenment: Fix 'type' may be used uninitialized message
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-07 11:18:45 -05:00
Carsten Haitzler 7f76e3b9f3 elm accel pref config - fix to use correct api to set accel pref 2015-02-07 13:23:34 +09:00
Carsten Haitzler 413ca8046e e - fix build when wayland not enabled 2015-02-07 12:30:19 +09:00
Mike Blumenkrantz 903b9beaed implement wl client cursor support...as clients
<zmike> super funny idea: for client cursors, what if we just implement them as an override client with no animations and then hide the canvas cursor while the client is visible?

this started as a joke and it worked mostly fine so I improved it and now it's shipping and whatdoidowithallthesebugs.jpg
2015-02-06 18:32:07 -05:00
Mike Blumenkrantz 8399ec5d6f configure/show/hide surfaces which lack shells automatically 2015-02-06 18:32:07 -05:00
Mike Blumenkrantz b720b7c179 use pixmap size for resizes in wl commit
the client size should be this anyway, but we just refreshed the pixmap above so this is guaranteed to be accurate
2015-02-06 18:32:07 -05:00
Mike Blumenkrantz 270bc92f81 add wl util function for calculating pixmap id 2015-02-06 18:32:07 -05:00
Carsten Haitzler 5d2426cdda e - client list update after adding to client list - fix netwm bug
this fixes T2029
2015-02-06 17:58:08 +09:00
Carsten Haitzler 6ef73fb3f0 adapt to new win center trap in 1.13 efl
also require 1.13 now as we want he win trap h/v info
2015-02-06 11:37:52 +09:00
Mike Blumenkrantz ea230eeaf5 remove pixmap resource delete cb
this was a stupid idea and I'm stupid for having such a stupid iea
2015-02-05 17:13:44 -05:00
Mike Blumenkrantz e7fcba8e8f clear wl pixmap cache on client free instead of leaking 2015-02-05 16:32:10 -05:00
Mike Blumenkrantz a19957d3eb move wl pixmap stuff to use pixmap functions in compositor instead of in pixmap 2015-02-05 16:32:10 -05:00
Carsten Haitzler c87ca3e892 maximization bug affecting libreoffice and others - fix
the problem is something changes window gravity... what i don't know,
but hey - just forcibly move window to 0,0 which is where we expect it
anyway when resizing.

@fix
2015-02-05 14:41:12 +09:00
Carsten Haitzler fa4a0ef7cc xinerama note for multiscreen handling 2015-02-05 12:00:36 +09:00
Carsten Haitzler 91969500de e - randr2 - handle lid close/open as screen unplug/plug
when your laptop lid opens/closes even if we dont get a randr event
with a disconnect, the screen as logically been unplugged (you can't
see it anymore) so we should treat it as if the screen is not
connected. this fixes that.
2015-02-05 12:00:36 +09:00
Chris Michael 931409c687 only send key events to focused clients
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:59:19 -05:00
Mike Blumenkrantz 7f2b83c8d9 remove unnecessary comp work in wl pixmap functionality
these are all basically no-ops anyway
2015-02-03 19:44:06 -05:00
Chris Michael 00b609ac12 cleanup xkb state modifiers and only update state_mask if necessary
NB: *These 2 commits fix Mike's modifier issue

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-03 15:37:11 -05:00
Chris Michael 0690b8debe change keyboard input listeners to Not depend on a client but rather
use ecore_event_handlers for key events.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-03 15:37:11 -05:00
Chris Michael 96dd7324f8 add a mod_changed field to compositor data so we can know when
modifiers change

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-03 15:37:11 -05:00
Chris Michael 3be57f67ba quiet compiler warnings when building for wayland-only
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-03 10:58:13 -05:00
Chris Michael c66f43593d de-e_comp_get()-ify e_utils
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-03 10:35:08 -05:00
Mike Blumenkrantz 256378577c Revert "ref/free client pixmaps during hide animations"
This reverts commit bbb04ecb32.

also fixed by deferred resource releasing
2015-02-02 17:40:11 -05:00
Mike Blumenkrantz bc59464f99 make wl clients use post render canvas cb to clear buffers 2015-02-02 16:45:18 -05:00
Mike Blumenkrantz 66e4c59764 hide wl clients on surface delete
surface callbacks may not trigger xdg/shell unmap callbacks before this is called, so this ensures a hide animation
2015-02-02 13:39:32 -05:00