Commit Graph

472 Commits

Author SHA1 Message Date
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
Mike Blumenkrantz bd0f2595b3 do not update client coords on csd geom update if it would change the zone
in the case where a client is at 0,0 relative to a zone, changing the coords
in this case will result in the client moving out of the zone by the size of the
csd
2016-03-17 13:40:17 -04:00
Mike Blumenkrantz 959366076c always update saved coords for maximized/fullscreen clients on csd geom update
this was causing clients to position themselves wrongly in some cases after
removing the related states
2016-03-17 13:40:17 -04:00
Mike Blumenkrantz 04e3c383c4 unset solid drawing of opaque regions during comp object animations
this makes animations with transparency not look like giant black rectangles
2016-03-14 14:46:37 -04:00
Mike Blumenkrantz 885d24eeab unify client post_updates management code into single function 2016-03-14 14:27:15 -04:00
Mike Blumenkrantz abffe6b6d2 calling dirty() on a comp object for a deleted client should not print an error 2016-03-12 15:37:10 -05:00
Mike Blumenkrantz 88518d8103 don't add render updates for deleted clients on failed resize 2016-03-11 18:16:21 -05:00
Mike Blumenkrantz b742baff5b reject attempts to focus deleted comp objects 2016-03-10 15:18:19 -05:00
Mike Blumenkrantz 66fbb48cc6 check returned pixmap size before attempting to create updates tiler
CID 1349419
2016-03-10 11:57:11 -05:00
Mike Blumenkrantz c95f3347ae flatten return of strcmp to bool value
CIDs 1352821, 1352822
2016-03-10 11:08:48 -05:00
Mike Blumenkrantz 2017eda0bc don't add render update during ignored damage on deleted clients
ref 1507f815a5
2016-03-09 15:27:59 -05:00
Mike Blumenkrantz b710f6f3b3 block re-unsetting of native surface for comp objects
due to recent evas internals changes, this breaks software compositing
2016-03-08 14:53:00 -05:00
Derek Foreman b4bcb1dc23 Don't use e_pixmap_image_data_argb_convert for wayland images
All we really need for wayland is to set alpha properly, so we can
save the conversion/copy when doing XRGB.
2016-03-08 12:46:32 -05:00
Derek Foreman 2e0e74f087 Stop copying all wayland buffers
The new buffer management shouldn't require this anymore.
2016-03-08 12:46:32 -05:00
Derek Foreman e4490c4bf6 Re-enable window close animations for wayland
These should work properly with the new buffer management code.
2016-03-08 12:46:32 -05:00
Derek Foreman a35c7637a2 Track whether objects are on the post_updates list or not
Will use this to prevent accidentally adding objects to the list twice
2016-03-08 12:46:32 -05:00
Derek Foreman ac47fd61ca Render deleted objects as long as they still have a pixmap
In wayland we can be presented with a new frame before being deleted.  If
we've never displayed that frame we should (since we released all pointers
to the old frame when we got the new one)
2016-03-08 12:46:32 -05:00
Mike Blumenkrantz b4559055a7 reject x11 client mouse-in events on comp object based on frame geometry
mousing over a window for an x11 client should always yield x11 mouse events
in cases where mouse eventing is required; any events occurring on the comp
object in other cases inside the xwindow region are able to be ignored
2016-03-07 14:40:27 -05:00
Mike Blumenkrantz ed7a0246f9 don't directly use image data when creating a comp object mirror
in the case where pixmap image data does not yet exist, the returned
pointer will be garbage data from the internal buffer
2016-03-04 13:06:41 -05:00
Mike Blumenkrantz 1507f815a5 do not add render updates during damage of deleted clients 2016-02-29 13:33:52 -05:00
Mike Blumenkrantz 8c2396cd9b setup comp util object zoomap before setting its child
this avoids some minor canvas thrashing since the zoomap will try
to reapply existing geometries to the child instead of setting 0 and
triggering infinite callbacks
2016-02-26 15:02:15 -05:00
Mike Blumenkrantz 9fa7f41e35 add zoomaps unconditionally for all comp util objects
these objects are more likely to be animated regardless of type, so adding
a zoomap will greatly improve the animation visual
2016-02-26 11:46:49 -05:00
Mike Blumenkrantz 41e95cc3f4 enable comp object image data refresh if a dirty call is made with no damages
this indicates that a buffer has changed, but there is no new data to draw
2016-02-22 17:48:35 -05:00
Mike Blumenkrantz 89df60a6cd add comp object util callback for closing on Escape key
this is the most common usage for autoclose callbacks, so having it
available as api saves a lot of typing for the codebase
2016-02-21 11:50:23 -05:00
Mike Blumenkrantz a9b4754776 do not clamp comp object input regions to 0,0
this breaks input for clients using csd which are aligned at x|y axis
2016-02-16 15:36:56 -05:00
Mike Blumenkrantz 7d3319e6ee do not perform special case position adjustment for re_manage clients
this case is solely for handling clients which are created with nonzero
position, eg. an x11 window trying to display itself centered upon initial
creation. re_manage indicates a window which is re-managed after a restart of
enlightenment, so these windows clearly do not fall into that case

fixes an issue where windows would move up+left by the size of their frame during
restart

ref 95e133282e
2016-02-08 14:52:55 -05:00
Mike Blumenkrantz 493f6f595b Revert "e - restart window positioning - fix it"
This reverts commit d0229b3652.

see following patches
2016-02-08 14:51:21 -05:00
Carsten Haitzler d0229b3652 e - restart window positioning - fix it
so every time i restart e i have my windows all messed up. it's
INSANELY annoying and time consuming every single time having to move
a dozen or more windows back to where they should be just because i
restarted e. i've narrowed it down to 2 places. 1 which is trying to
handle "out of screen" windows and during startup it seems things are
not quite stable yet as the randr code figures things out until the
event storm settles down.

when this is then fixed - another bit of code just shuffles windows up
all the time by a titlebar whcih is also supremely annoying. this is
the code that adopes a new frame for a window.

so the nasty hack to avoid piles of pain right now is for the first 5
seconds of e's life - don't do this stuff. at least you can now use e
and not be annoyed to hell and back every restart.

yes a nicer fix may be better - but that's going to take a lot more
time and patience and until then - this will do.
2016-02-06 11:31:01 +09:00
Carsten Haitzler e75af1536d Revert "e bg: remove debug printf"
This reverts commit 77c2a2a3d1.

oops - i forgot i had all this other debugging there
2016-02-06 10:29:04 +09:00
Carsten Haitzler 77c2a2a3d1 e bg: remove debug printf 2016-02-06 10:27:09 +09:00
Mike Blumenkrantz b9c45c6159 check whether to reapply all callbacks for comp util objects when changing type
in the case where the existence of a zoomap in the comp frame edje has changed
during the course of changing the type, these callbacks must be updated with new
data params in order to ensure accurate operations during callbacks
2016-02-04 16:24:44 -05:00
Mike Blumenkrantz 6a4488faea set child of zoomap as new content for comp util objects when changing type
the zoomap is deleted here anyway, so all this does is crash

ref 980135fc38
2016-02-01 17:23:02 -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 887ccb4f83 allow NULL object in e_comp_object_util_autoclose()
this can be used to unset the current autoclose object in the case
where the object is known to evade normal autoclose detection
mechanisms
2016-01-14 15:13:57 -05:00
Mike Blumenkrantz 19b87070f5 do full cleanup when overriding existing comp autoclose object
failing to trigger delete on existing autoclose object would result
in the object never closing and being "leaked"
2016-01-14 10:31:03 -05:00
Mike Blumenkrantz b6214b9846 check all corners of an object in e_comp_object_util_zone_get()
if the top left corner is offscreen, checking other corners is still
valid for returning a useful zone
2016-01-07 17:27:36 -05:00
Mike Blumenkrantz 96f1caeddb add back comp object data from typo in previous commit... 2016-01-07 17:20:05 -05:00
Mike Blumenkrantz 980135fc38 break out comp util object type setting into separate function
there was previously no way to change the type of one of these objects,
meaning that if an object with a dropshadow should no longer have a dropshadow,
it must be re-created
2016-01-07 17:12:30 -05:00
Mike Blumenkrantz 95e133282e add special case for frame adjustment during first recalc of new clients
in the case where a new client already has coordinates from creation event,
the frame was never adjusted which resulted in the window being positioned
incorrectly

ref T1106
2015-12-31 12:56:06 -05:00
Mike Blumenkrantz c2b3b159f3 un-defer comp util object hiding if second hide occurs during animation
this should match expected behavior of normal comp objects
2015-12-29 13:24:29 -05:00
Mike Blumenkrantz 0ed63ede7c avoid setting incorrect geometry during new_client frame calc
in the case where a client has no geometry set, attempting to update
the client's geometry during frame recalc will guarantee that wrong
geometry is set, resulting in a bad first frame
2015-11-24 17:28:08 -05:00
Mike Blumenkrantz 5e6831187a always create compositor mirror objects, ignore pixmap image state
checking pixmap image state in this case resulted in mirrors failing to
be created in some cases when there was no reason to fail

ref T2846
2015-11-19 15:17:19 -05:00
Mike Blumenkrantz 11c632ab44 further improve csd calculations for x11 clients
there was previously a frame in which maximized x11 csd clients would
reposition themselves offscreen before rendering

this is now fixed by adjusting the client geometries either upon
unsetting the csd or re-setting it, allowing the client to retain its
expected positioning without jitters
2015-11-16 16:25:34 -05:00
Mike Blumenkrantz b753b1bab4 Revert "force a software render in all cases when finalizing x11 client iconify"
This reverts commit 1a87463083.

no longer necessary
2015-11-07 13:12:14 -05:00
Mike Blumenkrantz 18fba8e5d7 add e_comp_object_mirror_visibility_check()
can be used to check whether visible mirrors exist for a comp object
2015-11-07 13:09:23 -05:00
Mike Blumenkrantz 50e4a30126 add counter and smart callbacks for comp object visible mirrors
ref T2788
2015-11-07 13:08:12 -05:00
Mike Blumenkrantz 35d0279d4f use e_comp->gl flag to set native surface state
e_comp_gl_get() is for determining if gl exists, not if it's being used
2015-11-02 16:25:02 -05:00
Mike Blumenkrantz e7d534ad80 fix comp object native surface config checking for non-x11 compositors 2015-11-02 16:25:02 -05:00
Mike Blumenkrantz b45e16ee23 add native surface (gl) clients to post render list
forgot to add this when I was redoing it for sw

ref 4d30674ab8
2015-11-02 16:24:53 -05:00
Mike Blumenkrantz 21017889b2 adjust non-x11 client's saved frame geometry when changing csd
this seems to be a more comprehensive solution for retaining previous
window sizes after toggling various csd-affecting window states in wayland
2015-10-29 14:35:02 -04:00
Mike Blumenkrantz 98f418afa9 only apply frame geometry deltas for CSD if the CSD region exists
ref e931e86161
2015-10-22 19:25:07 -04:00
Mike Blumenkrantz 6692cefaf5 set client input rects more accurately, accounting for SSD 2015-10-22 19:24:11 -04:00
Mike Blumenkrantz 6f455ac9c3 enforce cw->obj pass_events state more accurately
changing the edje file of cw->shobj can change the pass_events state
of its child object, cw->obj
2015-10-22 19:22:48 -04:00
Mike Blumenkrantz 633c72f6af clip client input rect to client geometry, not window geometry
when using csd, the window geometry will be smaller than the surface,
resulting in an unusually small input region
2015-10-22 18:44:51 -04:00
Mike Blumenkrantz e931e86161 update csd using deltas of previous values
when applying new csd to a window which already has csd, the previous
csd must be removed in order to apply any new csd offsets in order to
avoid unwanted moving/resizing
2015-10-20 12:20:24 -04:00
Mike Blumenkrantz 1a87463083 force a software render in all cases when finalizing x11 client iconify
since ICCCM requires that clients be unmapped while iconified, it's necessary
for the compositor to perform one last render prior to the unmap in order to
ensure that mirror objects will still appear as expected. this render must use
the pixmap buffer data in order to avoid timing issues due to async/deferred
rendering, and it is only necessary for the case of clients rendering with a
native surface

fix T2788
2015-10-15 15:39:07 -04:00
Mike Blumenkrantz 85cf1305be throw an ACK when trying to set comp frame geometry if frame exists 2015-10-05 15:55:44 -04:00
Mike Blumenkrantz 4d30674ab8 move client post-update adding into render function
in some cases, it's possible for a client which expects to render on
the next frame to actually render on the frame after. in these cases,
the compositor must not clear the pixmap image until after the render
has occurred in order to avoid inaccuracies. for this reason, the best
place to flag a client for post-render work is at the time of the client's
render

ref T2762
ref D3120
2015-10-02 13:57:29 -04:00
Mike Blumenkrantz 38a8de6a1d unify comp render returns for argb and non-argb clients 2015-10-02 13:57:29 -04:00
Mike Blumenkrantz 588a9766e4 fix comp render return value for failed draws of non-argb clients 2015-10-02 13:57:29 -04:00
Mike Blumenkrantz 269b5fcc0e fix return value of comp render for wayland clients 2015-10-02 13:57:29 -04:00
Mike Blumenkrantz 81b61634c4 add RENDER_DEBUG for forced renders when setting dirty flag 2015-10-02 13:57:29 -04:00
Mike Blumenkrantz f94764feec reject client resize attempts for clients with dirty pixmaps
these clients will resize/render correctly only after the next
render loop, so defer until then to avoid #RenderFail

fix T2754
2015-09-29 12:29:41 -04:00
Mike Blumenkrantz b9c4911374 s/EAPI/E_API/ ...again 2015-09-28 15:51:51 -04:00
Mike Blumenkrantz 6732398856 use client window coords for resize-moving without a frame_object
improves placement of csd windows

ref T2750
2015-09-28 15:39:15 -04:00
Mike Blumenkrantz 5f2f1cb67b do not set client window coordinates during a move until after resizing check
fixes case where values would be erroneously updated when they should instead
have been rejected

ref T2750
2015-09-28 15:36:58 -04:00
Mike Blumenkrantz 7e5eb0a96d allow client resizes on axes currently unrestricted by maximize state
if this isn't explicitly blocked by config options then allowing resizes
on the unmaximized axes is necessary in order to avoid accidentally
queuing a full unmaximize
2015-09-28 14:39:42 -04:00
Mike Blumenkrantz d641c9d963 force adjustment of client geometry when changing csd frame size
fix T2750
2015-09-28 14:02:02 -04:00
Mike Blumenkrantz ed9cd0ea61 reject identical calls to e_comp_object_frame_geometry_set() 2015-09-28 14:01:02 -04:00
Mike Blumenkrantz 80a9240e7a initialize pixmap size vars in comp resize interceptor
these are never uninitialized when they are used, but this
is not obvious to the reader

CID 1324956, 1324956
2015-09-25 21:57:25 -04:00
Mike Blumenkrantz 1c36bb8333 fix handling of x11 ICCCM WithdrawnState
according to ICCCM 4.1.4:
Only the client can effect a transition into or out of the Withdrawn state

withdrawn windows cannot be shown under any circumstances. the best that can
be done is to try mapping the window and hope it decides to appear.

to prevent any inadvertent showing of the window before it leaves the
withdrawn state, we play games with the E_Client->ignored flag in order
to skip client evals until we get notified that maybe we want to stop
skipping those evals

ref T2745
2015-09-25 21:56:14 -04:00
Mike Blumenkrantz 6252ac29da add csd case for compositor frame adjust messages
not 100% perfect, but close enough
2015-09-24 16:33:56 -04:00
Mike Blumenkrantz 7967f9983d move compositor frame adjust messages to pixels_get callback
native surfaces don't call e_comp_object_render()
2015-09-24 16:33:56 -04:00
Mike Blumenkrantz 5efb157c0c set comp object client_inset.calc based on frame_object existence 2015-09-24 16:33:56 -04:00
Mike Blumenkrantz 39a39a41c8 add util function for determining if a client is allowed to have a frame
returns false if mwm borderless is set or if csd exists
2015-09-24 16:33:56 -04:00
Mike Blumenkrantz b8322b2b0e fully support _GTK_FRAME_EXTENTS
gtk apps set an atom which provides information about the area
where non-window content (eg. shadows) may be drawn; this area
must not be used in placement calculations.

the easiest method for implementing this functionality was to add
a case to the compositor geometry interceptors which effectively
flip the client struct geometry values such that the E_Client->client
is outside of the more commonly used E_Client->x/y/w/h

fix T2744
2015-09-24 16:33:56 -04:00
Mike Blumenkrantz 4173bd9977 calculate comp object visibility regardless of pending damages
in the case of clients on non-visible vdesks, this improves the reliability
of mirrored rendering
2015-09-22 13:14:51 -04:00
Mike Blumenkrantz 8399ab4ff9 do not emit client iconify signal when reapplying compositor theme
this has no effect other than breaking the animation counter for the
client and preventing it from being deleted
2015-09-22 13:07:15 -04:00
Mike Blumenkrantz 7d2a55f7e9 add function to blank out a client's rendered image
when working with Extremely Serious effects, it may be the case that
a user is rendering at such an advanced level that any attempt by
enlightenment to perform rendering will be like a child trying to
reproduce a masterpiece of art while using fingerpaints

https://www.youtube.com/watch?v=tY6qag5KFx0&hd=1
2015-09-17 19:08:27 -04:00
Mike Blumenkrantz e669eb9998 set comp object mirror alpha flag more accurately on creation 2015-09-17 16:54:00 -04:00
Mike Blumenkrantz 554eb76140 add smart callback for comp object damage calls
related to the previous commit, this will allow api users to determine
when a client needs to re-render with the least amount of overhead
2015-09-17 16:54:00 -04:00
Mike Blumenkrantz e01009e1b5 add function for overriding the native surface of a client's comp object
it's a pretty trivial thing to hand-composite a client, so this will
allow someone to do something like render out a gaussian blur to an fbo
using a client's texture and then render the fbo onto the compositor
canvas with minimal overhead
2015-09-17 16:54:00 -04:00