Commit Graph

314 Commits

Author SHA1 Message Date
Carsten Haitzler b40fd20fbc e comp x - fix property fetch to use int ptr from the start
this clears up soem warnings and do the cast on providing the pointer
to ecore_x_window_prop_property_get() which since it has to allocate
the data will be fine for alignment anyway, so a void * cast will do.
2017-02-12 16:25:35 +09:00
Derek Foreman 4cf555f36e Replace all timer_reset with timer_loop_reset
Another sed bomb - didn't occur to me first time around to
check for this.  Cleans up more clock_gettime calls.
2017-02-06 15:59:25 -06: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 d1bb23954f break out code to set clients as transients for a parent 2017-01-13 11:33:36 -05:00
Chris Michael 92aa99b97a Use proper coordinate adjustment
This seems like just some copy/paste that was never corrected, however
when calculating coordinate adjustments we should be using the proper
values here. Previous code was using e_comp_canvas_x_root_adjust for
the Y value. This patch uses e_comp_canvas_y_root_adjust for Y
coordinates.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-12 10:44:23 -05: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 ef33638c42 create substruct for E_Comp to put canvas objects into
allow adding/removing objects in the future without breaking abi
2016-10-25 12:01:17 -04:00
Mike Blumenkrantz 0354f8a5b1 remove unused variable
ref b83cfb858c
2016-10-04 09:22:05 -04:00
Mike Blumenkrantz b83cfb858c remove x11 input window from desklock grab process
now the compositor canvas is grabbed, simplifying handling of grabs which
persist through the desklock activation
2016-09-28 10:40:38 -04:00
Mike Blumenkrantz 528cdd2614 remove more useless E_Comp struct members 2016-09-09 11:38:08 -04:00
Mike Blumenkrantz 82afc08c39 only check x11 configurerequest geometry changes when applicable
in some cases during a frame recalc this could lead to window positioning
being erroneously changed

fix T4097
2016-08-01 10:55:54 -04:00
Mike Blumenkrantz 08aaeffade handle e_comp_x init failure more effectively and perform cleanups
fixes autodetection for x11 wayland output without setting E_WL_FORCE
2016-07-12 12:51:00 -04:00
Mike Blumenkrantz 859b1b989f handle shaded state when receiving x11 configure requests
previously this would resize the window without unshading it, leading to
a confusing state for the window and the user
2016-05-31 12:31:50 -04:00
Mike Blumenkrantz 1fef7d04dc delete x11 mouse-in job when hiding the job's client
spurious x11 mouse events will be received when activating a mouse binding which
flips the active desk

fix T3716
2016-05-31 12:21:09 -04:00
Mike Blumenkrantz 55c83134c1 use parent windows for x11 binding grabs
ensure that internal windows do not receive mouse events before the compositor

fix T3347
2016-05-12 11:23:20 -04:00
Mike Blumenkrantz ada13539bf avoid infinitely looping when applying x11 window grouping
#ThatTimeKainXFoundABug
2016-05-11 18:29:38 -04:00
Mike Blumenkrantz f2ad686fc3 handle positioning of x11 overrides with csd accurately
when first applying the csd region to this type of window the coords must
be adjusted in order to account for the shadow

fix T2934, T2931
2016-05-10 16:04:57 -04:00
Mike Blumenkrantz 2a67b3a899 ensure damages do not get added for shapeless x11 clients
ref 32d4c2f2b9

ref T3157
2016-04-21 18:04:16 -04:00
Mike Blumenkrantz a97a50b306 don't force full damage on x11 override clients
reverts f6be761226

this didn't fix anything and can cause irregularities in rendering
2016-04-21 16:32:01 -04:00
Mike Blumenkrantz 019318b88f do not attempt to show x11 override windows
fix T3444, T1759, T2735
2016-04-21 15:28:55 -04:00
Mike Blumenkrantz 536a3a7ff6 make startup/restart app exec timing protocol-specific
this allows different display protocols to start their applications at
different times to ensure that any initialization has completed prior to
starting anything requiring a window

fix T3475
2016-04-18 15:27:47 -04:00
Mike Blumenkrantz 3cb11abb25 move x11 client icon caching to private functions in comp_x
ref 57ce6419e5
2016-04-01 14:16:21 -04:00
Carsten Haitzler 57ce6419e5 e icons: reduce mem usage (in x11) by a fair bit by de-duplicating
so i was profiling today .. leak hunting .. and i noticed. if you have
enough appss open - eg terminology, e uses a huge amount of memory...
for icons. terminology is 128x128 ...  thats 64k per icon. open up a
lot of terminology windows and we duplicate that 64k per every window
on the wm sside because we get the data. it would apply for any app
that sets a netwm icon. this can be come rather silly if you have like
100 terminals. it's worse with larger icons (eg 256x256 - 256k per
icon).

this puts in a simply list for shared icons and a lookup on fetch to
de-duplicate and share icon data. this should drop memory usage
nicely.

@improvement
2016-04-01 20:33:52 +09:00
Mike Blumenkrantz 9c3d8aa9ca optimize case where an x11 client is focused/unfocused in same loop iteration 2016-03-31 11:21:38 -04:00
Mike Blumenkrantz d229d26ef4 remove old compositor reset code 2016-03-30 17:48:03 -04:00
Mike Blumenkrantz d02679383f ignore x11 ConfigureRequest events when maximize_override is set 2016-03-28 13:37:40 -04:00
Mike Blumenkrantz e5cf1fb215 add workaround for xwayland client bug
sighhhhhhhhhhhhhhhhh
2016-03-12 15:43:39 -05:00
Mike Blumenkrantz 8d7e55f4dc remove direct references to ec->comp_data in x11 compositor
this fixes a number of xwayland client issues
2016-03-12 15:41:50 -05:00
Mike Blumenkrantz 114a604166 apply x11 focus/unfocus using jobs
if multiple x11 clients receive focus during the same mainloop iteration,
an almost unbreakable cycle of window focus chaining will occur, resulting in
both windows being focused simultaneously--or so it appears--which results in
no window being able to receive input. to avoid this, ensure that only one x11
client can receive focus in a given loop iteration
2016-03-07 14:47:26 -05:00
Mike Blumenkrantz 7e91bc721a apply x11 mouse in event for clients using a job
due to event bursts, it's possible for multiple x11 clients to receive
mouse in events on during the same main loop iteration. in this scenario,
only the last client has received an actionable mouse in, and applying this
event after the dispatch has completed ensures that multiple clients do not
all receive mouse in+out events during the same loop

this greatly improves mouse-based focus reliability in a number of cases
2016-03-07 14:45:32 -05:00
Mike Blumenkrantz e385bfa2d6 only use x11 mouse out event if client has received mouse in previously 2016-03-07 14:44:16 -05:00
Mike Blumenkrantz 0ba369330d reverse ordering for x11 client mouse in NotifyVirtual and NotifyInferior details
apparently I did this backwards.

ref 7b7dbbc249
2016-03-07 14:43:02 -05:00
Mike Blumenkrantz e1035aef81 Revert "e comp: fix crashes on exit/restart when e_comp is NULL"
This reverts commit 26a7ba3a58.

this can only occur if something forces an event flush during shutdown.
in this case, whatever is triggering the event flush is a bug, not the
dereferencing of a pointer which is guaranteed to exist for the normal
lifetime of the process
2016-02-25 15:05:24 -05:00
Mike Blumenkrantz 87d4e254f0 pre-remove pixmap from x11 clients during del hook
this breaks the compositor!

ref 0ca200513e
2016-02-19 18:02:54 -05:00
Mike Blumenkrantz 3f3ed7ae99 reshuffle x11 comp init to cleanup on failure cases
in the event of a wayland start, x11 comp init will fail, meaning that
cleanup must occur in order to avoid erroneous triggering of x11 handlers

 #TooSoon
2016-02-19 17:07:03 -05: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
Carsten Haitzler 26a7ba3a58 e comp: fix crashes on exit/restart when e_comp is NULL
when we are shutting down i seem to get into a state where e_comp is
null yet we are still processing events. this fixes that and checks.
2016-02-05 18:35:49 +09:00
Mike Blumenkrantz 85d7c121bd do not attempt to create x11 canvas during xwayland init
this kills the gl_drm engine
2016-01-22 17:06:42 -05:00
Carsten Haitzler e1369a24bd per-desk profiles - move to per screen and use elm derived profiles
this removes the per desktop profile config and replaces it with a
per-screen one that is tied to a specific display so it is far more
logical than per desktop. this allows e to set up different scaling
per screen for apps that use elementary for example via this derived
profile.

this of course is slightly problematic for e itself since it now uses
elm - as this will cause e to go kind-of-crazy with differing profiles
as it fights with itself and elm if 2 screens have different profiles.
this requires elm to be fixed to allow custom profiles per window.

this also currently won't switch profile of a window when you
reconfigure screens.

@feature

xx
2016-01-08 21:54:31 +09:00
Mike Blumenkrantz fd338ef39e ignore withdrawn state for x11 override clients during show
these windows are already visible
2015-12-18 13:59:25 -05:00
Mike Blumenkrantz 4c9527cf14 show non-new x11 clients immediately when changing Withdrawn -> Normal
ref T2950
2015-12-17 11:57:48 -05:00
Mike Blumenkrantz 2d09b8ecac only show x11 clients during MapNotify/Request if they have Normal state 2015-12-17 11:56:10 -05:00
Mike Blumenkrantz 2a60033182 do not reapply x11 icccm state during fetch
this is the value which has just been obtained, so don't create potential
race conditions by sending it back to the client
2015-12-11 15:07:48 -05:00
Mike Blumenkrantz 027b044297 use client geometry for calculations in x11 ConfigureRequest handler
the values requested by the client will be based on its geometry and not
the geometry of the frame. using the frame geometry here results in windows
moving ↘ based on the top/left frame sizes

fix T2912
2015-12-03 14:12:37 -05:00
Mike Blumenkrantz 70c6dc30d1 use separate handler for x11 fatal errors when using xwayland
a fatal error with xwayland is not a fatal error for the compositor,
so this should not result in a dead session
2015-11-24 15:34:42 -05:00
Mike Blumenkrantz f09e410285 improve x11 client focusing with mouse-based focus policies on mouse move
in the case that a mouse move event occurs, the compositor should validate
the event to ensure that the mouse cursor is actually over the window that
the event claims to be from

fix T2594
2015-11-12 17:17:38 -05:00
Mike Blumenkrantz 551657e02a check client comp data existence in x11 mirror visibility callbacks 2015-11-09 14:29:23 -05:00
Mike Blumenkrantz bf2e36236c toggle x11 client iconic/mapped state based on mirror visibility
in order to continue rendering an iconic client without breaking icccm,
it's necessary to map the client's window again and unset iconic state
whenever rendering is needed, then re-set states when rendering
stops

ref T2788
2015-11-07 13:10:02 -05:00
Mike Blumenkrantz cc137f6cd7 move client iconic hint setting into x11 hide function
e_hints should probably be merged into the x11 compositor entirely
at some point
2015-11-07 13:06:23 -05:00