Commit Graph

454 Commits

Author SHA1 Message Date
Mike Blumenkrantz c7c4470ae0 force client render on mirror show for clients which have not yet been rendered
this is the same mechanism in e_comp_object_dirty() which applies now if a
mirror is created for a previously-dirty client

fix T5937
2017-08-25 14:47:10 -04:00
Mike Blumenkrantz a188c4751c Revert "handle updates_full when adding comp object update regions"
This reverts commit fac907e0c5.

this was already handled and I'm dumb.
2017-08-25 14:47:10 -04:00
Mike Blumenkrantz 096f1084a5 always use client geometry for comp object centering functions
this should always be more accurate than the object geometry, which may
or may not have been applied at any given time
2017-08-21 10:16:35 -04:00
Mike Blumenkrantz 6ee841ecd5 use xwindow check to determine whether to check icccm accept/take focus attrs 2017-08-18 15:52:50 -04:00
Mike Blumenkrantz 65fe42fdef avoid object hide animations during shutdown 2017-08-11 18:48:49 -04:00
Mike Blumenkrantz a9f6017209 Revert "reset comp object update regions when a render occurs"
This reverts commit e6ab84ffd5.

fix T5817
2017-08-03 11:39:02 -04:00
Mike Blumenkrantz 5702f0975e reset comp object update regions when a render occurs
allow saving the current update regions in case evas decides not to render
this object
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz fac907e0c5 handle updates_full when adding comp object update regions
this flag means that the entire surface should be redrawn

ref T5370
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz ae748e6487 return updates_full state from e_comp_object_damage_exists() 2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 3bda41f895 reject invalid comp object resizes
interceptors are called before any of the normal evas object geometry
validations, so ensure that invalid sizes are not applied
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 4a766e9e2f Revert "e comp - stop trying to set size again and again to the same"
This reverts commit 6e882d2e4f.

this is identical to cd3490f35c which was
also reverted.
2017-07-24 08:12:51 -04:00
Carsten Haitzler 6e882d2e4f e comp - stop trying to set size again and again to the same
i found e spinning at 100% just with 1 windows in wayland... open 2
terminology wins and move mouse form one to the other... 100% cpu. e
was moving seemingly a cursor client window? to the same coord again
and again as it was hidden...

this fixes that. no more spinning cpu
2017-07-23 00:19:51 +09:00
Mike Blumenkrantz e184ffd49f do not use elm api to unset centered flag during resize
this triggers a full eval which resizes the window and breaks the compositor
2017-07-21 14:43:37 -04:00
Mike Blumenkrantz 4b4b003245 toggle NOGRAB on client input rects during move operations 2017-07-17 08:14:24 -04:00
Mike Blumenkrantz a1d62d01e8 handle multiple input regions for csd clients 2017-07-17 08:14:24 -04:00
Mike Blumenkrantz 0912906ea1 Revert "handle multiple input regions for csd clients"
This reverts commit 950bee7ce4.

accidentally pushed wrong ref, multiple incomplete broken commits were
merged

:(

fix T5739
2017-07-17 08:14:24 -04:00
Mike Blumenkrantz 219b25aff4 Revert "toggle NOGRAB on client input rects during move operations"
This reverts commit 8af555cae0.
2017-07-17 08:14:24 -04:00
Mike Blumenkrantz 8af555cae0 toggle NOGRAB on client input rects during move operations 2017-07-14 18:40:50 -04:00
Mike Blumenkrantz 950bee7ce4 handle multiple input regions for csd clients 2017-07-14 18:40:50 -04:00
Mike Blumenkrantz b008dce0a0 add "focus" mode for render debug 2017-07-07 16:26:28 -04:00
Derek Foreman c0751ef3eb Make wayland clients render when only visible from mirrors
Under some circumstances we can defer frame callbacks forever for clients
that are only visible on desk mirrors.

I'm not certain those circumstances should actually occur (Ref T5678) but
at least for now this is a trivial and harmless workaround.

Fix T5654
2017-07-06 15:40:59 -05:00
Mike Blumenkrantz 789eccf12f try redirecting failed clients again during resize
it seems like this is a good place to try, and this seems to resolve
some render updating issues on restart, such as with maximized chrome
windows

ref T5599
2017-06-30 10:25:18 -04:00
Mike Blumenkrantz b183e001a1 make e_comp_object_frame_allowed() return false for ignored clients 2017-06-30 10:25:17 -04:00
Mike Blumenkrantz 4f77573e6c perform move after resize during comp object show
in the case where an object is being shown before it has been moved or
resized, a move operation will trigger a series of callbacks which force the
compositor to attempt an illegal operation (recursive show before resize)

fix T5521
2017-06-30 10:25:17 -04:00
Mike Blumenkrantz 0a67a96df3 Revert "block client mouse move calls from comp object during move/resize"
This reverts commit 4464c681fd.

on the right track but not 100%...
2017-06-24 12:10:43 -04:00
Mike Blumenkrantz 4464c681fd block client mouse move calls from comp object during move/resize
this is now handled by the event grabber. many callbacks on this
object are due to clip changes instead of genuine mouse movements,
meaning that processing events can lead to further resizes during a
render cycle
2017-06-24 11:57:15 -04:00
Carsten Haitzler 3e3b48478b Revert "e comp object - stop being cricical where pixmap and win size dont match"
This reverts commit e288852393.

Mike likes e to crash. :)
2017-06-22 09:23:14 +09:00
Carsten Haitzler e288852393 e comp object - stop being cricical where pixmap and win size dont match
now i resize some windows and am in a white box of death each time...
this is really unfriendly... so downgrade to an err ad this is a
recoverable error.
2017-06-21 11:31:24 +09:00
Mike Blumenkrantz bc175b0d7b send version edje signal to ssd theme
allow enabling new theme features based on version
2017-06-16 15:00:12 -04:00
Mike Blumenkrantz 9f5a07d788 hook client object unref callback to cleanup comp object internals
ensure cleanup occurs before client object is freed
2017-06-16 15:00:12 -04:00
Mike Blumenkrantz 7d39be8c4a send nograb signal to ssd theme on creation
disable pointer grabs on ssd borders

edge bindings can now be triggered during window drags

fix T5552
2017-06-09 20:18:14 -04:00
Mike Blumenkrantz c6a0abc763 force client pixmap refresh immediately during resize if nocomp is active
in the case where this path was reached during x11 nocomp, the client's pixmap
refresh would be deferred until the end of nocomp, even when the refresh would
otherwise end the nocomp. instead, force the refresh immediately.

fix T4887
2017-05-24 10:10:07 -04:00
Mike Blumenkrantz effbb81722 remove check for desklock in comp object autoclose handler 2017-05-12 12:08:37 -04:00
Mike Blumenkrantz de0b9edee0 better handling for iconify during comp object show/hide
in the case where effects are disabled, no animation is started for iconify
operations, so this should fall through to the normal hide/show paths

ref T5444
2017-05-01 13:26:11 -04:00
Mike Blumenkrantz 7172239c0c make RENDER_DEBUG activate with E_RENDER_DEBUG env var
this is useful for debugging and the option to recompile is not always
available
2017-04-14 11:48:43 -04:00
Mike Blumenkrantz 1a8207ce70 support clients as positioner objects in e_comp_object_util_center_on() 2017-04-07 16:08:37 -04:00
Mike Blumenkrantz ef3260a799 only center internal windows once
these shouldn't re-center on every resize
2017-03-24 13:17:24 -04:00
Mike Blumenkrantz e1ed56c327 account for late object setup when adding ssd mouse in/out callbacks
internal windows have a different setup order in which the frame is created
before any of the other internal objects in a comp object
2017-03-17 18:47:09 -04:00
Mike Blumenkrantz 7f142f31f5 use even more accurate wl callbacks for detecting ssd mouse in/out events
ensure that any wl client with ssd hits the ssd mouse eventing path
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz 89ea040222 only re-set comp object position during show if client has been placed
avoid accidentally placing an unplaced client
2017-03-17 13:16:59 -04:00
Mike Blumenkrantz fece2ab5bf return during comp object pixels function if client was deleted during render 2017-03-10 15:55:06 -05:00
Mike Blumenkrantz f2c1976e9a do not force comp objects to render for their proxies if real_hid is set
this flag indicates that the object cannot be rendered
2017-03-10 15:55:06 -05:00
Mike Blumenkrantz e3a5ab1457 Revert "e - wl mode - stop consuming 100 percent cpu"
This reverts commit cd3490f35c.

this breaks many windows by preventing deferred resizing from occurring.
a window which is unable to resize at the time of this call must be queued
for a deferred resize, otherwise it may never resize at all and thus will
never be rendered

test case: screenshot dialog
2017-03-03 10:49:33 -05:00
Mike Blumenkrantz e618e00297 better protect comp object internals from dereferencing freed clients
animating comp objects persist after the lifetime of their client, so
ensure that functions which are likely to be called after the client's free
will not attempt to access client struct members
2017-03-03 10:49:33 -05:00
Mike Blumenkrantz 54dfcea3e0 comment out inlist member of E_Comp_Object struct
this was unused
2017-03-03 10:49:33 -05:00
Mike Blumenkrantz e56f689fad show already-visible comp util objects when changing frame type
ensure internal clipper state matches object visibility state
2017-02-24 14:15:38 -05:00
Carsten Haitzler d8e639a9ea e comp object - fix warning where a void cast is as goos as the old one
we did cast to Evas_Native_Surface * but this just causes warnings due
to the input ptr being char * from memcup. as this will be aligned due
to allocation, we're ok, so use a void * cast instead
2017-02-12 16:25:35 +09:00
Mike Blumenkrantz 476305563c always set E_Client->placed when successfully moving a comp object
enforce this for all cases
2017-02-10 17:24:13 -05:00
Carsten Haitzler cd3490f35c e - wl mode - stop consuming 100 percent cpu
so on 1 intel laptop and my rpi i'm seeing 100% cpu usage in wayland
mode. it seems something is resizing to 0x0 and then causing a size
change which causes a property change which causes... another request
to 0x0 and repeat. dont set tyhe size changed flags if size actually
didnt change and this fixes that.
2017-01-15 14:16:31 +09:00
Mike Blumenkrantz fe2c390861 use geometry from comp object input rect when determining if coords intersect
the rect geometry may be clipped, so use whatever the current geom is
2017-01-13 11:35:20 -05:00
Mike Blumenkrantz 0fbef3b74e use persistent clipping for comp object input rects
it's technically legal to set an input region larger than a surface,
then later expand the surface and expect that the input region will
also expand
2017-01-13 11:35:20 -05:00
Carsten Haitzler 3903d44666 e - BLOODY BUILD AGAIN - DAMN FLOAT WARNINGS...
i swear ... all of this shit over a warning that CAUSED more bugs than
it eveer fixed? sersiously...

ARGH!
2017-01-07 14:05:17 +09:00
Mike Blumenkrantz 85589ab2b8 resolve compositor float-equal warnings
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-06 12:57:33 -05:00
Carsten Haitzler cc21b2a046 e comp object - fix valid warning of shadowed var (ambiguous) 2016-12-28 20:16:35 +09:00
Carsten Haitzler 7c27959446 e comp object - fix shadow var warning (valid) for ec 2016-12-28 20:16:35 +09:00
Carsten Haitzler 5c38609e0e client handling - add support for window stacks needed for views/manager
this adds core basic handling for window stacks where windows behave
correctly as a single unified stack something like what naviframe does
but out-of-window so you can including multiple processes. only on x11
right now as it's being supported/worked on.

as we dont plan to kepe naviframe in future, this is the way to go.
naviframe "pages" will be windows in a stack. the wm should do the
nice thing. in e this will be very nice. for now elsewhere we use
transient_for so a wm would treat this like a bunch of dialogs with a
single parent window. i guess in a desktop thats probably what you
might expect. e will be a little more "finesse" filled.

need to make ibar, tasks,m win menu and winlist (alt-tab) respect this
and only show the top member of a stack.

need to send messages to clients when they are "top" or "middle" or
"bottom" or "alone" in the stack or something so decorations can change.

should add soem new border signals in theme (for both SSD and CSD) to
make this look nice. will need some config additions for that and
ability for e comp to do the right thing

but this is a solid start
2016-12-16 16:17:10 +09:00
Mike Blumenkrantz a73ad1b190 plug iterator leak in e_comp_object_render()
==13307== 96 bytes in 1 blocks are definitely lost in loss record 6,598 of 11,698
==13307==    at 0x4C2DA60: calloc (vg_replace_malloc.c:711)
==13307==    by 0xCECA287: eina_tiler_iterator_new (eina_tiler.c:1299)
==13307==    by 0x46D13D: e_comp_object_render (e_comp_object.c:3966)
==13307==    by 0x46DB42: e_comp_object_dirty (e_comp_object.c:3923)
==13307==    by 0x46017D: _e_comp_client_update (e_comp.c:343)
==13307==    by 0x46017D: _e_comp_cb_update (e_comp.c:400)
==13307==    by 0xB34D4BA: _ecore_job_event_handler (ecore_job.c:98)
==13307==    by 0xB34909C: _ecore_call_handler_cb (ecore_private.h:317)
==13307==    by 0xB34909C: _ecore_event_call (ecore_events.c:518)
==13307==    by 0xB350527: _ecore_main_loop_iterate_internal (ecore_main.c:2359)
==13307==    by 0xB3508A6: ecore_main_loop_begin (ecore_main.c:1287)
==13307==    by 0x43C88A: main (e_main.c:1093)
2016-12-14 11:44:58 -05:00
Mike Blumenkrantz 8f39054965 handle pass_event clients in e_comp_object_coords_inside_input_area
fix T4966
2016-12-05 11:05:24 -05:00
Mike Blumenkrantz a3a239c1d0 use correct coords for determining input region calcs on comp objects 2016-11-30 12:34:30 -05:00
Mike Blumenkrantz 232c73fe83 add e_comp_object_coords_inside_input_area() 2016-11-22 11:31:22 -05:00
Stefan Schmidt cb51487c3d e_comp_object: remove unused variable 2016-10-31 11:37:16 +01:00
Mike Blumenkrantz 420b54a151 optimize out re-applying of borderless client theme 2016-10-28 10:36:21 -04:00
Michaël Bouchaud (yoz) 718ef898d7 e_client: add a volume control to the window theme
This commit brings 2 objects to the group "e/widgets/border/default/border", an
icon and a slider. If you click the icon the volume is muted.
The slider set the volume level.

Theme part added "e.swallow.volume_icon" and "e.swallow.volume"

@features
2016-10-27 22:34:13 +02:00
Mike Blumenkrantz bb53d4606f do not consume key events in comp autoclose key callback if desklock is active
fix T4655
2016-09-27 10:59:52 -04:00
Marcel Hollerbach f5e4403164 tiling: place popup on the current active zone
Otherwise the popup will be where you are not looking at.

This patch adds a new function to e_comp_object where you can pass the
zone where you want to place the e_comp_object on.

ref T4499
2016-09-06 16:31:13 +02:00
Carsten Haitzler 82c6bdf031 e comp - set alpha after setting native surface to avoid random crash
i noticed a crash on texture update with a previous garbage image data
ptr set before becoming a native suttface and so setting alpha would
cause a texture upload from a garbage pointer, so set native surface
then set alpha on or off so the data ptr is no longer used.

@fix
2016-08-03 17:27:23 +09:00
Derek Foreman 124e59df6f Add a pixel get callback for mirrors
Mirrors can be rendered independently of what they're mirroring,
which (at least under wayland) can result in a situation where the
mirror is rendered before the parent sets up their image pointers
properly.

We give mirrors their own callback to prevent that from causing a
crash.
2016-06-28 15:44:00 -05:00
Derek Foreman a04ee8e253 Revert "Always clear the mirror image data pointer"
This reverts commit 326d638ba2.

This, for some reason, resulted in client surfaces being blacked out,
despite only ever changing mirror surfaces.
2016-06-28 15:43:54 -05:00
Marcel Hollerbach afeb588632 e_comp: silence warning, this time really
as said on the ML
2016-06-25 16:00:30 +02:00
Marcel Hollerbach a80bc13336 e_comp: silence warning
after talking to zmike, this is by intend.
2016-06-25 15:29:45 +02:00
Mike Blumenkrantz 191e5180b5 Revert "set NOGRAB pointer mode on comp object event objects"
This reverts commit 03a4ecbdb0.

this should be correct, and yet it crashes xwayland and breaks dnd
2016-06-23 18:06:22 -04:00
Mike Blumenkrantz 03a4ecbdb0 set NOGRAB pointer mode on comp object event objects
fixes dragging off surfaces in wayland
2016-06-23 17:16:03 -04:00
Mike Blumenkrantz da7e7d19fb freeze events on comp object input rects during deletion
prevents some event propagation which would cause flickering
2016-06-22 12:28:48 -04:00
Derek Foreman 326d638ba2 Always clear the mirror image data pointer
Under wayland evas will sometimes use the old one, I have no idea why.
Fixes a crash bug when mousing out of menus in a GTK app under wayland.

fix T3576
2016-06-21 17:53:16 -05:00
Mike Blumenkrantz aa1768a9d9 enforce mouse grabs and block client/compositor event propagation while active
fixes cases where mouse events could filter to objects and cause unwanted effects,
such as evry hiding randomly under wayland
2016-06-18 10:56:14 -04:00
Mike Blumenkrantz 771f71e6a9 add separate mouse in/out handlers for internal wins
internal wayland windows are windows with ssd, meaning they can only receive
pointer events on the contents of the window and not the entire window including
decoration regions

ref T3819
2016-06-13 12:00:09 -04:00
Derek Foreman 573df39c17 Allow pixmap argb state to override window state for wayland clients
Wayland argb state depends entirely on the attached buffer, so we
should use that for determining object argb state on wayland.

ref 6d397e313b
ref 60da58d8ad
2016-06-06 14:06:00 -05:00
Mike Blumenkrantz c58a3919e9 update client remember on opacity change
fix T3681
2016-05-24 11:52:31 -04:00
Derek Foreman f6d99980ba Remove GL presence test from native surface set on dirty objects
This test has been pushed into e_comp_object_native_surface_set() and
will be done as appropriate.

Upcoming wayland DMAbuf buffers need native surfaces even if GL isn't
present.
2016-05-18 12:05:34 -05:00
Derek Foreman 50a3f84191 Move the test for resetting no native surface to after caps checks
This is supposed to be functionally equivalent, but is a little tricky to
prove.

The benefit of this is a simplification to the callers, which no longer
have to consider gl capabilities in the call, as that is now tested for
internally.
2016-05-18 12:05:33 -05:00
Derek Foreman 57f0150b73 Break native surface test criteria into explicit wayland and X cases
Until now it's been reasonable to consider these together as the
criteria have been similar.  With the upcoming introduction of wayland
DMAbuf buffers, they diverge.

We don't need to test for GL in the wayland case because we don't
advertise GL capabilities to clients when we don't support it, so they
can't create GL buffers unless we can display them.
2016-05-18 12:05:33 -05:00
Carsten Haitzler 59e2eb40f8 warnings - silence some theoreitcal wranings in build
a bunch of "potentially uninitialized variable" warnings fixed.
2016-05-15 23:14:15 +09:00
Mike Blumenkrantz 60da58d8ad only check pixmap argb state for non-X11 clients
non-argb windows can have argb pixmaps.

ref 6d397e313b
2016-05-11 18:34:49 -04:00
Mike Blumenkrantz 4a47f74b3a enforce setting alpha on comp objects only after image data has been set
setting alpha can trigger a render sync, crashing if the old data is no
longer valid
2016-05-11 15:40:10 -04:00
Mike Blumenkrantz 6d397e313b also check pixmap argb state when setting comp object alpha
more accurate for wayland
2016-05-11 15:40:09 -04:00
Mike Blumenkrantz f37590209d disable focus effects for windows with csd
fix T3408
2016-05-10 12:35:06 -04:00
Mike Blumenkrantz 05451aeb36 treat POPUP_MENU window type as an override window for comp theme matching
ensures that the menu theme gets picked for wayland popups; probably needs
a more comprehensive solution for xdgs v6
2016-04-22 15:28:54 -04:00
Mike Blumenkrantz b94023c412 set NULL image data in _e_comp_object_pixels_get() on failure
ensure that nothing is rendered here
2016-04-22 12:45:26 -04:00
Mike Blumenkrantz 6f83ec7329 do not show unsized comp objects during theme apply 2016-04-22 12:45:04 -04:00
Mike Blumenkrantz d584c9a095 ensure resize is still deferred for changes.shape clients during failed resize
ref c212bb4e21
2016-04-22 12:13:11 -04:00
Mike Blumenkrantz 84cf7743b6 set NULL image pixel data during x11 render when no damages exist
fixes a weird corner case where shapeless clients try to sneak a fast one
by and you gotta be like http://i.imgur.com/irwmnCT.webm

ref T3157
2016-04-21 18:21:26 -04:00
Mike Blumenkrantz 881ccfc768 slightly simplify image data setting in e_comp_object_render() 2016-04-21 18:09:18 -04:00
Mike Blumenkrantz 77e8ab0926 remove unnecessary conditional in e_comp_object_render() 2016-04-21 18:06:58 -04:00
Mike Blumenkrantz c212bb4e21 don't defer resizes+queue render updates for shapeless or pending shaped clients
this basically guarantees a misrender
2016-04-21 18:01:42 -04:00
Mike Blumenkrantz 4cbf81b1e8 add E_Client->saved.frame to handle mismatched csd states
if csd exists in only one of (before || after) a maximize/fullscreen,
this provides info so that the right size can be used when restoring
geometry

...again
2016-04-11 14:28:31 -04:00
Mike Blumenkrantz 14721bc116 do not unconditionally update position+size when changing wl client csd geometry
this breaks...everything
2016-04-06 16:40:42 -04:00
Mike Blumenkrantz c529764660 do not reset previously-set ec->placed state when attempting early client moves 2016-03-31 14:03:56 -04:00
Mike Blumenkrantz ee16177660 selectively reject comp object signal emissions based on action_client state
in the case where a mouse binding is active and a signal binding is triggered
by the same mouse-up event which also ends the mouse binding, the deferred
nature of edje emissions will result in the signal being received by the
corresponding callback some time after the mouse-up event has been handled by
the client and the mouse binding has ended

to accurately handle these cases, signal bindings triggered in the same event
loop in which a mouse binding has ended after a mouse-up must be rejected in
order to enforce the compositor's mouse grab

fix T3347
2016-03-30 10:42:11 -04:00
Mike Blumenkrantz 4237832b3c unset opaque region during comp object render if none exists
fixes case where opaque region has been unset after previously being set
2016-03-22 11:52:56 -04:00
Mike Blumenkrantz 80595756b7 add e_comp_object_agent_add()
an agent object can be used when a client should be represented on the
canvas solely by its window geometry and not including any csd

this creates and manages a mutable object which maintains the same geom
as ec->x/y/w/h and can be operated upon to modify those values
2016-03-17 13:40:17 -04:00