Commit Graph

256 Commits

Author SHA1 Message Date
Mike Blumenkrantz e7cfd06675 avoid performing client rescales during shutdown 2017-11-07 10:40:00 -05:00
Mike Blumenkrantz 00daafac10 flag zone/edge mouse binding activation with ON_HOLD
ensure multiple bindings aren't triggered by the same event
2017-09-14 14:59:14 -04:00
Mike Blumenkrantz f892b360fe optimize setting zone useful geometry as dirty
if this would result in a no-op then don't emit event or trigger client
rescaling
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz d66ee1a729 mark zone useful geometry as dirty when applying move/resize 2017-08-04 16:05:15 -04:00
Mike Blumenkrantz 519cf154fa deduplicate zone move/resize code 2017-08-04 16:05:15 -04:00
Mike Blumenkrantz e5f60c6aee rescale clients on useful geometry dirty 2017-08-04 16:05:15 -04:00
Mike Blumenkrantz 7a3876ffc9 add and use new event for zone useful geometry changing
many times it's useful to have an event for actual zone geometry change
vs useful geomtry change, so split this out and use the right handler where appropriate
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz fe95a5841f do not immediately rescale windows when changing zone geometry
this is already handled later in e_comp_canvas_update()
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz ea57b06863 check for desk/zone mismatch in e_zone_desk_useful_geometry_get() 2017-08-04 16:05:15 -04:00
Mike Blumenkrantz b0a7c98faf do not trigger events/bindings on zone object events with timestamp==0
these are internal event feeds and should not trigger additional actions
2017-06-09 20:18:14 -04:00
Carsten Haitzler 9c984ea9cf e ptr cast via void fix to reduce warnings
so we cast a lot of ptrs to other types as that is then the actual
type of the object. all these objects are allocated by malloc nad
friends so this is ok. but gcc on arm is not happy and warns. maybe it
assume this ptr could be to an element in an array of structs of this
type and so on thus will have specific alignment enforced by compiler
but our casting may disturb it? anyway. cast via void first fixes it.
we can focus on other real warnings and errors instead.
2017-02-12 16:25:35 +09:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Mike Blumenkrantz 6ab8c48892 use eina_streq for string comparison in e_zone_for_id_get()
zone->randr2_id is not guaranteed to be non-null

crash--
2016-10-29 11:00:49 -04:00
Mike Blumenkrantz 21422fd256 trigger zone geometry events when updating zone/desk obstacles 2016-10-21 10:02:24 -04:00
Mike Blumenkrantz 3e186b1509 reject successive zone_geometry_dirty() calls
no point in thrashing the compositor if events are already pending
2016-10-21 10:01:50 -04:00
Mike Blumenkrantz 7dc0930c8a add new flag for zone edge objects to allow shape cutting while repeating events
fixes case where edge binding would (possibly) trigger but then not allow input
to any canvas objects at the screen edge
2016-10-17 11:18:46 -04:00
Derek Foreman fc37423c2e Add new API for finding a zone by its id string 2016-06-21 12:33:49 -05:00
Eduardo Lima (Etrunko) 8acbf5d013 Fix warnings about uninitialized use of variables
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>
2016-04-25 19:40:42 -03:00
Mike Blumenkrantz 5e3fb38f86 optimize compositor canvas updating when zone geometry is marked dirty
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
2016-03-23 15:43:34 -04:00
Mike Blumenkrantz e8b8fe8310 add flag for zone obstacles to indicate verticality
I added a lower quality and less precise workaround for this before
since I didn't have enough test cases to think of something which would
be suffiently good to handle all cases.

as a result, initial calculations for obstacles would incorrectly detect
horizontally-oriented obstacles as being vertical, causing inconsistencies
in window placement. this would become even more severe if the obstacle
never resized itself, erroneously modifying window placement to position
around obstacles which did not exist

having a hint on the obstacle to indicate a direction is sufficient for
most cases, specifically zone useful geometry calcs, where obstacles are
expanded to cover the entire screen on which they reside and must expand
accurately based on the orientation of the obstacle

ref 10c43efc83
2016-02-08 14:52:55 -05:00
Mike Blumenkrantz 10c43efc83 fill zone obstacles on x/y axis during useful geometry recalc
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...
2016-01-25 13:45:47 -05:00
Mike Blumenkrantz ea2ec5a2f3 use desk obstacles for calculating desk-specific zone useful geometry
typo--
2016-01-25 13:41:13 -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
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
Carsten Haitzler bb3701702a e zone - handle null e_comp if comp is already shut down
this came from backlight shutdown that got current zone... and getting
zone relied on e_comp being valid.

@fix
2015-12-07 19:52:40 +09:00
Carsten Haitzler b018ac1abc e screens/zones/randr - store randr2 id in xinerama and zones for lookup
so e has a bit of a problem. we mostly deal with zones, BUt these
zones come from our old xinerama code (this likely should just die
some time) and THIS code gets fed info from e's randr code. we
re-fill/modify as randr finds new screens or things get reconfigured.
thus zones adapt. the problem is now all our zone code really has a
hard time reverse mapping the zone back to where it came from -eg the
randr screen data. you literally can't do a whole bunch of things like
know if that zone was an internal laptop lid or an external screen, or
if it was rotated or even what the dpi is... as you ave no deasy way
to map it back other than by guessing geometry matches.

this fixes that by storing the randr screen id (which should be
unique) fromt he original src randr screen in the xinerama screen and
then in the zone. with this you can do a quick lookup in the e randr
data should you ever need to find the info. this should pave the way
for some other fixes/improvements, but without this they cannot be done.

@fix
2015-11-11 21:22:30 +09:00
Mike Blumenkrantz 3ba247dafd set 'starting' flag for desk show in e_zone_desk_count_set()
as a result of earlier changes which prevented recursive desk flips,
e_desk_show() now rejects some desk show calls which are invalid such as
a show where the "current" desk does not have the visible flag set. this
behavior is overridden in the case of startup, which is functionally the
same effect as changing the desk count

fix T2717
2015-09-11 12:57:15 -04:00
Yomi 0dc33a5aeb Fix misspellings in E's files.
Summary: Fix misspellings and spaces in E's files.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2676
2015-06-16 16:10:21 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz b632afa546 more accurately determine whether a mouse grab is active in some parts of e 2015-04-27 14:32:19 -04:00
Mike Blumenkrantz 471dcb24cb __UNUSED__ -> EINA_UNUSED
this has been bugging me forever. __UNUSED__ is no longer a valid macro here.
2015-03-18 18:09:09 -04:00
Mike Blumenkrantz ba7c1ac49c remove E_Zone->comp member 2015-03-13 17:44:24 -04:00
Mike Blumenkrantz 34d906fa42 e_zone functions no longer require E_Comp param 2015-03-13 17:28:49 -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 fbad4c7fd8 block linear desk flips that would wrap if desk flip wrapping is disabled
fix T1948
2015-02-17 18:54:39 -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
Chris Michael dea5981c2f de-e_comp_get()-ify e_zone
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 14:35:19 -05:00
Carsten Haitzler 5d74b399e0 e zone - add stow/unstow apis 2015-01-09 11:50:51 +09:00
Mike Blumenkrantz 922af2c52f remove e_comp_list(), deprecate all related functions for pending removal
there is only one E_Comp which can now be accessed by the e_comp global.

if you're editing a file with some uses of these deprecated functions, replace their usages with appropriate references to this variable

pass -Wno-deprecated-declarations to ignore these warnings during build
2015-01-05 15:39:15 -05:00
Mike Blumenkrantz a44b172607 minor tweaks to prevent harmless invalid reads during restarts with windows open 2014-11-20 15:26:22 -05:00
Mike Blumenkrantz 99589eb5af remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues:

* keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
2014-11-20 15:26:21 -05:00
Mike Blumenkrantz ccad647457 fix scoping on list free to not crash 2014-07-29 07:40:45 -04:00
Mike Blumenkrantz 2b90d983a3 redo zone geometry calc to take a desk, add e_zone_desk_useful_geometry_get()
ref T1302
2014-07-28 09:05:25 -04:00
Mike Blumenkrantz 6e8631b013 redo zone edge flip blocker to require mouse out of current edge before reactivating 2014-06-25 16:05:26 -04:00
Mike Blumenkrantz 9f310291a7 don't change backlight on zone shutdown 2014-03-14 12:00:23 -04:00
Mike Blumenkrantz b7f4686d00 e_object zone warning-- 2014-02-25 14:44:05 -05:00
Mike Blumenkrantz 4d07ec2c00 remove black_ecore_evas
this was used in illume, which is now dead.
2014-01-14 20:28:57 -05:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00
Mike Blumenkrantz aa6a2d173d giant comp rejiggering commit because anything smaller would have broken something:
* remove xwin for container canvas: now drawn directly on the compositor canvas

* added SHAPE_DEBUG define for bored developers

* bindings now use new e struct for mouse/wheel events

* container+zone now get mouse events from smart callbacks instead of x events

* rename comp api namespace

* change comp underlay theme to have a swallow for the wallpaper

* add names to all zone/container/comp objects to make debugging much easier

* some minor related updates to go along with this

SVN revision: 83752
2013-02-07 13:20:07 +00:00
Mike Blumenkrantz 41759238cd a much requested feature: drag-only edge bindings
ticket #281


SVN revision: 83628
2013-02-05 13:13:33 +00:00