Commit Graph

398 Commits

Author SHA1 Message Date
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
Mike Blumenkrantz f0cc657e4c break out x11 client visibility setting into util functions 2015-11-07 13:05:18 -05:00
Mike Blumenkrantz 29a1fe0265 always unalias x11 client parent window <-> pixmap relation during delete
deleted state is not relevant, this should always be removed during deletion
to prevent further referencing of a deleted client

fix T2803
2015-10-26 13:02:34 -04:00
Mike Blumenkrantz 06f794bfe6 clear x11 client pixmap when returning from iconic
ensure pixmap remains usable during the entire hide process
2015-10-15 15:32:38 -04:00
Mike Blumenkrantz f6245e5535 reject deleted clients from x11 sync alarm event callback
E_Client->comp_data is null after a client has been deleted, so
attempting to handle events which require the dereferencing of this
pointer after a client has been deleted will result in a crash

these events should be rejected after delete regardless, since at this
time the compositor has stopped handling events for the client

ref f42c6aa187
2015-10-15 13:13:18 -04:00
Carsten Haitzler f42c6aa187 e - comps sync - ec client was null - i think, so protect against crash
i got a crash here and the bt was broken and i couldnt check if
_e_comp_x_client_data_get() returned null, but it's the only thing
that would make sense, so protect against this to avoid a crash. as
this was a one-off, i can't find out more,

@fix
2015-10-15 19:29:14 +09:00
Mike Blumenkrantz 984d664eef trap shaped x11 clients and prevent compositor blocking with high rect count
in the case where a shaped window with many rects exists, there is a high
probability of the damage rect count being huge, leading to massive blocking for
each frame as the compositor attempts to fetch all of these rects from the xserver.

instead, the compositor can shortcut this by forcing a full-window damage any time
the rect count is sufficiently high, trading a blocking socket operation for some
amount of (potential) overdraw.

testing in affected scenarios has shown huge improvements: where previously the entire
compositor would lock up, things work as expected now

see https://bugzilla.mozilla.org/show_bug.cgi?id=1214746 for a sample case
2015-10-14 12:59:14 -04:00
Mike Blumenkrantz 00895ca014 do not return when x11 damage event returns no rects
ensure first_damage flag is set in all cases
2015-10-14 12:59:14 -04:00
Mike Blumenkrantz 98c44950b1 subtract x11 client damage region even when forcing full override damage
fix T2785
2015-10-13 22:38:50 -04:00
Mike Blumenkrantz f6be761226 force full damage for first frame of x11 override clients
it seems that damages for popup windows in some applications,
namely blink-based browsers, are reported incorrectly, resulting
in sometimes having a blank window
2015-10-13 17:09:00 -04:00
Mike Blumenkrantz ddc06559c7 apply _GTK_FRAME_EXTENTS for xwayland clients
not entirely sure this is worthwhile but may as well
2015-10-09 15:03:38 -04:00
Mike Blumenkrantz a68e375479 only use fast-path pixmap size updating after a resize for x11 clients
updating these values after other operations will result in the pixmap size
being set inaccurately, leading to rendering inconsistencies
2015-10-05 17:28:26 -04:00
Mike Blumenkrantz bd8987c4d9 free x11 damage region rects 2015-09-29 13:03:35 -04:00
Mike Blumenkrantz 0a7c9ad5b9 do not roundtrip for x11 client message DBG if it will not be visible
also free fetched atom name
2015-09-29 13:02:10 -04:00
Mike Blumenkrantz b843527a6c do not roundtrip for x11 client message DBG if it will not be visible
also free fetched atom name
2015-09-29 12:53:59 -04:00
Mike Blumenkrantz 51789af53c _GTK_FRAME_EXTENTS changes using a property, not a client message 2015-09-28 14:01:47 -04:00
Mike Blumenkrantz bb557cbf9f force pixmap clear when hiding an x11 window
failure to refetch this upon remapping the window will result in
a broken pixmap which cannot be rendered
2015-09-25 23:41:29 -04:00
Mike Blumenkrantz 0e3cc2f533 don't call e_client_unignore() when un-withdrawing an x11 window
these clients were not ignored on creation, so they've already triggered
all the relevant events
2015-09-25 22:37:16 -04:00
Mike Blumenkrantz 2c73a0b311 map/unmap x11 client windows when toggling iconic state
ICCCM 4.1.4
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 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 bfbdf5106a move focus setting on restart into desk restore function
the focused client on restart needs to be set after desk states
have been restored in order to avoid focusing the wrong client
2015-09-21 19:19:15 -04:00
Mike Blumenkrantz a04b3e4d94 only lower x11 layer windows for layers which have windows during init 2015-09-21 16:53:29 -04:00
Mike Blumenkrantz 1f3e730964 alias x11 pixmaps to parent windows during reparent
failure to allow pixmaps/clients to be retrived by parent window will
result in api users being greatly inconvenienced after a reparenting has
occurred
2015-09-17 16:54:00 -04:00
Carsten Haitzler cfdd8a47ef e comp - set rects to null to silence compiler warning
even though n is 0 and we don't use rects, compiler doesn't know, so
to avoid noise - set to null so we can focus on warnings of real errors.
2015-09-10 22:13:57 +09:00
Mike Blumenkrantz 92d1c36be7 fix x11 compositor to use damage events
it seems that since the first version of the enlightenment compositor
in e17, damage events in x11 have never been used correctly. using
the event struct members will only give the bounding box/area instead
of the damaged regions; the real regions must be explicitly fetched
from the server

this removes the need for a lot of hacks which were added over the years
to make override windows render correctly, and also probably reduces
rendering overhead slightly
2015-09-07 11:14:34 -04:00
Mike Blumenkrantz e426805993 track focus time for x11 canvas focus, unset client focus on x11 canvas focus-in
in the case that the canvas window has just had focus set on it, apply this focus
and ensure that no client retains focus

this resolves a race condition where focusing the compositor canvas <-> client
extremely quickly would result in a client trying to steal focus when it was
not actually focused

a notable (but trivial) side effect is that now when flipping desks at high speed while using
mouse-based focus policies, the user is almost guaranteed to end on a desk which
has open windows on it
2015-08-21 16:41:13 -04:00
Mike Blumenkrantz 74d9792e89 add full damage for x11 override clients on resize configure event
it seems that the reported damage events upon resizing an override window
are not accurate, and so we must force a full damage here while avoiding a
render queue in order to ensure that the full contents of the override will
be rendered in the next frame

fix T2045
2015-08-21 14:51:33 -04:00
Mike Blumenkrantz 7b7dbbc249 reject x11 NotifyVirtual and NotifyInferior mouse in events more accurately
these events are valid when moving from parent<->child window

fix T2674
2015-08-18 17:23:07 -04:00
Mike Blumenkrantz a364dbb0c8 force xwl client to retain original x11 client's placed flag during swap
fixes race condition where xwl clients would sometimes erroneously place
at 0,0
2015-08-13 17:10:54 -04:00
Mike Blumenkrantz 76fb106129 enable shape cutting for xwl clients during flip
fixes xwl<->xwl dnd
2015-08-13 16:20:39 -04:00
Mike Blumenkrantz 3f13b6889d replace existing usage of x/wl_comp_data with corresponding globals 2015-08-13 16:05:57 -04:00
Mike Blumenkrantz 32adc0e901 add e_comp_x and e_comp_wl globals
constantly typing e_comp->x/wl_comp_data-> is tiring
2015-08-13 16:01:08 -04:00
Mike Blumenkrantz a08a1434c1 move x11 ee resize callback to comp_canvas, simplify x11 randr event handler
this should ensure that all compositors accurately perform resize-related
canvas operations
2015-08-12 19:26:19 -04:00
Mike Blumenkrantz ba1077fb42 fix xwl pixmap unaliasing during client deletion
no more crashing, hooray!
2015-08-12 14:32:21 -04:00
Mike Blumenkrantz 262598a126 print DBG infos for unhandled x11 client messages 2015-08-07 13:48:21 -04:00
Mike Blumenkrantz 3c722ac7f2 alias xwl client pixmaps -> wl surface pixmaps
it's now possible to retrieve the xwl client using the xwl xwindow
2015-08-06 19:31:20 -04:00
Mike Blumenkrantz e37f5d8c28 set pass events on DND type windows
these are the actual drag windows from external apps and will be stuck
under the cursor, ideally not blocking/intercepting all motion events
2015-08-06 19:31:20 -04:00
Mike Blumenkrantz b7cc0e07b8 enable x11 dnd in wayland compositors
maximize footgun potential since this currently crashes immediately
2015-08-05 16:07:10 -04:00
Mike Blumenkrantz 2607ad2339 only return xwayland pixmap from e_comp_x_client_pixmap_get() for xwl clients 2015-08-04 19:39:09 -04:00
Mike Blumenkrantz 7848947ea0 Revert "remove unnecessary geometry setting during xwl client swap"
This reverts commit ae1fc10d06.

not unnecessary if the client has already been shown. fixes xwl menus
randomly showing up at 0,0
2015-07-29 15:40:02 -04:00
Mike Blumenkrantz cd0e11c8c3 fix new_client setting on xwl clients during swap 2015-07-29 15:39:39 -04:00
Mike Blumenkrantz f7ca0b5791 disable x11 mouse eventing in wayland compositor mode
these events are delegated directly by the compositor. anything that
is told to us by x11 may or may not be the case and we shouldn't care
either way
2015-07-28 15:59:19 -04:00
Mike Blumenkrantz 4543e26ca6 remove e_screensaver_force_update()
this was just used to set up x11 screensaver stuff, which has now been
relocated to the related comp_init function
2015-07-27 15:54:15 -04:00
Mike Blumenkrantz 7f638d98bf add functioning wayland screensaver support
block xscreensaver events, manage input<->activation eventing

fix T2525
2015-07-27 15:46:57 -04:00
Mike Blumenkrantz c2ecadae14 reject x11 NotifyVirtual and NotifyInferior mouse in events
these are triggered "in passing" when mouse in events occur and do
not necessarily indicate that the mouse has entered this specific window

failing to reject such events can cause mouse-based focus policies to
attempt to set focus onto windows which are not visible, resulting in
an infinite loop where no window is actually focused
2015-07-27 13:25:01 -04:00
Mike Blumenkrantz 0a8ee7b5ad allow x11 mouse wheel events to check ev->event_window for possible client match
in the event that these windows are different, event_window is the parent of window
which may or may not be explicitly tracked by an E_Client, so the wheel events here
should be sent to the parent as is done in mouse button events

fix T2604
2015-07-27 13:23:13 -04:00
Mike Blumenkrantz 0b66c2d841 set new_client flag on xwl clients during swap
this forces another run of client placement so that xwl clients do
not always appear at 0,0
2015-07-22 17:10:49 -04:00
Mike Blumenkrantz ae1fc10d06 remove unnecessary geometry setting during xwl client swap
this geometry will be applied during show
2015-07-22 17:10:11 -04:00
Mike Blumenkrantz a9db84f94e simulate modal windows for badly behaved x11 clients
it seems that some clients, eg. libreoffice, don't set the modal window
property on child dialogs. instead of fighting for focus, set up the child
as a modal on the parent and then avoid the whole issue

fix T2594
2015-07-21 18:24:39 -04:00
Mike Blumenkrantz b51e5fa0b2 ensure clients possess comp_data before dereferencing it during x11 stacking
ref T2566
2015-07-21 14:34:11 -04:00
Mike Blumenkrantz d2fce4ce27 do not add x11 compositor desklock hooks in non-x11 compositor 2015-07-21 14:25:41 -04:00
Mike Blumenkrantz bd776b157f add e_client_unignore() for triggering events when unignoring a client
mainly for use in wayland compositing since all surfaces are ignored
until they get a shell surface or a commit
2015-07-17 15:30:30 -04:00
Mike Blumenkrantz 73c03565b3 never use new clients for stacking part 2: the secret of the stacking
a client with this flag set here is unreliable to use as a stacking
reference since it has yet to be stacked and can be located anywhere
in the window stack.

fixes internal window stacking on startup
2015-07-15 16:22:02 -04:00
Mike Blumenkrantz 008a0658ec only trigger client mouse-in from x11 mouse move event if client+desk are visible
ref T2566
2015-07-15 14:27:19 -04:00
Mike Blumenkrantz 17e878eca3 simulate netwm sync for xwl clients
blocks execution of resizes until the surface commit arrives. reduces
the race condition between resize and render and eliminates frame drops
during slow resizes
2015-07-15 13:58:03 -04:00
Mike Blumenkrantz 161b67a53d Revert "delete render updates for xwayland clients upon triggering a client resize"
This reverts commit f3f29a0cf8.

upon further review, this was not at all helpful and breaks resizing eventually
2015-07-14 13:12:06 -04:00
Mike Blumenkrantz f3f29a0cf8 delete render updates for xwayland clients upon triggering a client resize
fixes frame dropping during resize
2015-07-10 16:59:47 -04:00
Mike Blumenkrantz bec06b8703 add function to fill in x11 cursor image on creation
xwayland compositing requires that we set up a root window cursor image
immediately since we'll be getting that cursor surface to display as soon
as the pointer goes out of an x11 client's window
2015-07-10 13:04:12 -04:00
Mike Blumenkrantz 5d9cefd9e2 always set x11 override client geometry on startup
this geometry isn't something we can change later, so apply it now.
also fixes an ACK when trying to show input_only clients early
2015-07-10 12:07:29 -04:00
Mike Blumenkrantz c9d5053998 disable netwm sync on x11 clients in wayland compositors
this has no effect
2015-07-09 19:32:51 -04:00
Mike Blumenkrantz 20d281d9d3 redo e_pointer to support xwayland cursors
this requires that both canvas cursors and window cursors be present for the same
E_Pointer object, even though only the canvas cursor is actually visible

 #kansas
2015-07-09 14:45:04 -04:00
Mike Blumenkrantz c4c18ed30b return to using standard client util fns for getting client wins in x11 2015-07-08 17:16:25 -04:00
Mike Blumenkrantz 9f51bffd1e make e_client_util_.?win_get() fns return xwayland windows when available
fixes setting x11 hints in xwayland clients
2015-07-08 14:48:19 -04:00
Mike Blumenkrantz af15bf11eb set xwayland clients in x11 compositor client hash using parent window on flip 2015-07-08 14:47:24 -04:00
Mike Blumenkrantz 17f0ce3713 move grabinput focus fix timer to x11 compositor and fix it to Work Better
see inline comments about x11 focus eventing for details

fix T2547
2015-07-06 15:46:02 -04:00
Mike Blumenkrantz 6323d0fb51 only apply xwl client deletion to xwl clients in x11 compositor 2015-07-02 16:49:19 -04:00
Mike Blumenkrantz 8b6b7b1f56 reorder xwayland client swap attribute setting 2015-07-02 14:58:10 -04:00
Mike Blumenkrantz e9060ce771 unset x11 focus grabs on clients only if there is an xwindow present
fix T2539
2015-07-02 14:57:42 -04:00
Mike Blumenkrantz db92edccf6 do not apply x11 focus grabs to internal elm clients
due to recent changes in ecore-input-evas, mouse events are propagated
differently; specifically, there are now "more" events than there previously were.
as a result, grabs on internal wins are no longer necessary, though they probably
never were necessary after the elm conversion

see 5cb6cdbc5e1a13ea0262e155983b494e6519abde in efl
2015-07-01 17:14:27 -04:00
Mike Blumenkrantz 9eb3abd45a reject x11 replay clicks when event window != client window 2015-07-01 17:01:54 -04:00
Mike Blumenkrantz fa684556d9 only ungrab x11 windows when appropriate focus options are set 2015-07-01 16:48:26 -04:00
Mike Blumenkrantz 99ddeb6d69 replace comp_x usage of internal xwindow detection function with new util fn 2015-07-01 16:41:26 -04:00
Mike Blumenkrantz 235980159f ensure x11 focus grabs are applied on client init when needed 2015-07-01 15:51:46 -04:00
Mike Blumenkrantz 393772a72f straggler ungrab of x11 parent window from previous commit 2015-07-01 15:32:25 -04:00
Mike Blumenkrantz 33ec963be2 redo all x11 client mouse grabbing for focus
I did an audit of this and it seemed that it no longer served the purpose
for which it was originally intended. specifically, this is for enforcing
click: raise/focus options, and so grabs must be in play on client windows
only when they are not focused to ensure that we get mouse events and can
then focus them. the grabs must then be removed once the window has focus
to avoid spurious mouse eventing
2015-07-01 15:26:28 -04:00
Mike Blumenkrantz c9a444c85d use client window for x11 button ungrabbing
ref afb62b4989
2015-06-30 18:46:33 -04:00
Mike Blumenkrantz b0bf0379dc copy more attributes from x11 -> wl on xwayland client swap
xwayland sets a wrong size on some (eg. menus) clients and wayland
cannot provide geometry or stacking information, so ensure that all
of this is copied over

also remove overrides from focus stack
2015-06-30 18:38:36 -04:00
Mike Blumenkrantz cca2363c7c clean up xwl data on client deletion
remove the extra comp_data, the pending client list entry, and the pixmap ref
2015-06-30 18:38:01 -04:00
Mike Blumenkrantz 6d030b1c32 don't create first draw timers for input-only x11 clients 2015-06-30 18:37:21 -04:00
Mike Blumenkrantz 668bb06dc0 don't attempt to change layer of override clients with parent set in x11
overrides will stack how they want, leave them alone
2015-06-30 18:36:23 -04:00
Mike Blumenkrantz 31d0fd0417 add debug info when x11 client messages are missed 2015-06-30 18:36:03 -04:00
Mike Blumenkrantz f1f4489822 free all ec->comp_data ptrs in _e_client_del
need this to live through multiple del hooks, so simplify all code by
freeing in one place
2015-06-30 18:33:00 -04:00
Mike Blumenkrantz 6de9c551de add special case for xwayland override clients in show event handler 2015-06-30 16:04:22 -04:00
Mike Blumenkrantz c58cc3c279 unset ec->ignored during xwayland client data swap 2015-06-30 15:38:13 -04:00
Mike Blumenkrantz 79ea175992 trigger client mouse-in on x11 mouse movement for non-action clients
this should fix the case of mouse-based focus policies trying to reapply
focus after another client has stolen it away without the pointer leaving
the window
2015-06-29 16:01:52 -04:00
Mike Blumenkrantz 14c038d730 check for possible parent window on x11 mouse button events
in the case of different window <-> event_window, window is a child window
of event_window, and thus checking event_window here is valid (and necessary)
2015-06-29 15:28:41 -04:00
Mike Blumenkrantz aa32ef87f9 stop rejecting possibly-valid x11 focus events
fixes case where window assumes focus without wm interaction
2015-06-29 15:26:08 -04:00
Carsten Haitzler afb62b4989 e passive window grabs - fix side-effect leave/enter events on clients
when you have click to focus we have a passive grab set up. somewhere
that window changed to the parent window instead of the client. this
leads to a side effect of a leave and enter event on clients for every
click. generally clients are ok with this, but some seem to have buggy
event handling. these enter/leave events are a side effect of the
passive grab even though we allow/replay the event.

this fixes that by placing passive grabs on the client window itself
instead of the parent.

@fix
2015-06-28 17:24:29 +09:00
Mike Blumenkrantz c30e0240e4 don't select mouse wheel events on x11 reparenting window
this fixes mouse eventing/focus on windows, though I'm not entirely sure why...
probably something with binding grabs
2015-06-26 12:37:02 -04:00
Mike Blumenkrantz b862ec63d0 add wrappers for window/pixmap/comp_data fetching in x11 compositor
these helper functions automatically account for "swapped" xwayland
clients and return the expected value from the wl client comp_data.
in this way, all of the current x11 compositor code can be reused with
minimal changes
2015-06-25 20:25:41 -04:00
Mike Blumenkrantz cd646e8ecd reject non-x11 clients from _e_comp_x_client_zone_geometry_set() 2015-06-25 20:25:40 -04:00
Mike Blumenkrantz 2b38147c43 add hooking for WL_SURFACE_ID atom on XWayland windows and composite them
in order to maximize the amount of reused code the following details the current
process for xwayland compositing:

* get map request from window
* force reparenting
* show window
* await WL_SURFACE_ID x11 message
* move x11 client data + pixmap onto corresponding wayland client
* business as usual with wayland compositing

this is pretty similar to the method of the reference code in weston,
except that there's no x11 compositor in weston
2015-06-25 20:25:36 -04:00
Mike Blumenkrantz 3585643302 reject non-X clients from _e_comp_x_object_add() 2015-06-25 20:12:03 -04:00
Mike Blumenkrantz d7c60da84f correct e_comp->new_client count for overrides in x compositor 2015-06-25 20:05:26 -04:00
Mike Blumenkrantz 2654b7e3e7 move X idle flusher to comp_x 2015-06-25 20:04:31 -04:00
Mike Blumenkrantz eec5cf6a67 remove E_Comp_Data typedef, use backend-specific typedefs unconditionally
this turned into a bit of a charlie-foxtrot due to constant pointer aliasing
in the wl compositor codebase

no functional changes
2015-06-25 20:04:31 -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
Carsten Haitzler 6b64e40122 e - e client, comp win etc. reffing fix ... part 2
this follows 56cabf59c6 then
4e5521b4d8 where i have been trying to
fix a crash with e client and comp win references etc. i have gone
over all referencing with a fine tooth comb and found all the nigglies
i can., no leaks now, no crashes, no valgrind complaints etc. so i
call this fixed now. as best i know this is new in e20, so not a
backport fix
2015-06-15 20:27:25 +09:00
Carsten Haitzler 4e5521b4d8 e comp - fix refcounting for e_comp and comp clients
the refcoutning for e_comp and e comp clients seemed to be a bit off -
i read over every ref and unref carefully and fix it. this leads to
the com-_data being null (properly now), so now check for that too.
2015-06-14 16:06:37 +09:00
Mike Blumenkrantz 9b420c8d69 force xwindow stacking to obey nocomp policy and stack below current nocomp
fix T2277
2015-05-18 13:20:35 -04:00
Mike Blumenkrantz 4afb4b8fe9 simplify comp_x screen setup
we only care about the first root now, no point getting all the roots
2015-04-23 08:27:45 -04:00
Mike Blumenkrantz a452baafca move comp_x screen setup code into e_randr
this was not x-specific, so move it for use in wl compositors
2015-04-22 21:20:57 -04:00
Mike Blumenkrantz a4ea6e7f23 add a small screen management interface to E_Comp, remove hardcoded x11 randr calls
this interface is extremely basic and should allow easy additions for other display
backends
2015-04-22 21:19:00 -04:00
Mike Blumenkrantz 8c6ec83e43 break out comp_x gl/sw canvas creation into external function 2015-04-22 21:18:53 -04:00
Mike Blumenkrantz 36ea1ba372 move comp_x randr init to screen init function 2015-04-22 21:18:53 -04:00
Mike Blumenkrantz e1181c4d03 create e_comp during e_comp_init, set comp_type automatically
this simplifies comp creation slightly
2015-04-22 21:18:53 -04:00
Mike Blumenkrantz c727545bb2 remove E_Comp->num
num is always 0
2015-03-20 14:59:19 -04:00
Mike Blumenkrantz 8ed4ee3b38 remove E_Comp->x/y
canvas coords start at 0,0...always
2015-03-19 16:59:59 -04:00
Mike Blumenkrantz 58447e9508 completely remove E_Manager
the final step in flattening all the canvas/screen apis
2015-03-19 16:53:32 -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 2faae1d5f1 remove most E_Comp usage from e_comp_x 2015-03-18 17:20:36 -04:00
Mike Blumenkrantz 138e84370d remove most E_Comp usage from e_comp 2015-03-18 17:14:54 -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 1fe1c94245 comp canvas functions no longer require an E_Comp param 2015-03-13 16:07:08 -04:00