Commit Graph

398 Commits

Author SHA1 Message Date
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
Mike Blumenkrantz 91edd1ce2f E_CLIENT_*FOREACH() macros no longer take a E_Comp param 2015-03-13 15:45:07 -04:00
Mike Blumenkrantz 091142b032 remove E_Client->comp 2015-03-13 15:41:21 -04:00
Mike Blumenkrantz 961a56ea10 use stderr messages when failing to init X compositor
can't show error dialogs when we're about to exit, may as well print something useful

fix T2182
2015-03-06 15:00:52 -05:00
Mike Blumenkrantz c6f0597774 remove ec->awaiting_hide_event
no longer used
2015-03-02 14:27:29 -05:00
Mike Blumenkrantz 23c4d42e4c rename extremely frustratingly-named E_Screen_Limits enum and members
this came in a patch that I take full responsibility for not adequately reviewing at the time.
the names are confusing and counterintuitive, and it does not properly include the client namespace.
2015-02-18 18:34:29 -05:00
Mike Blumenkrantz 1a4be248fe don't revert X focus during nocomp 2015-02-17 18:42:47 -05:00
Carsten Haitzler 054adb6351 e - randr - handle missing relative display and use priority for zone
this makes highest priority screen the lowest (0) zone. this also
handles missing screesn that you are relative "of". missing clones are
not working atm. also zone reconfigure moves windows now too
2015-02-13 19:24:31 +09:00
Mike Blumenkrantz e34548db01 remove unused E_Client->input_object
this is a relic from E18
2015-02-12 16:17:50 -05:00
Carsten Haitzler 790183d74a e - randr - laptop lids - handle plug/unplug and well as lid open/close
this fixes some issues in the new randr2 code that made it not work
right with plug/unplug and lid close/open. now it does work right and
plugging/unplugging displays is seamless (if your driver does not give
plug/unplug events bind a key to update screen config acvtion and e
will figure it out when you hit the key).
2015-02-09 18:22:02 +09:00
Carsten Haitzler 7f76e3b9f3 elm accel pref config - fix to use correct api to set accel pref 2015-02-07 13:23:34 +09:00
Carsten Haitzler 5d2426cdda e - client list update after adding to client list - fix netwm bug
this fixes T2029
2015-02-06 17:58:08 +09:00
Carsten Haitzler c87ca3e892 maximization bug affecting libreoffice and others - fix
the problem is something changes window gravity... what i don't know,
but hey - just forcibly move window to 0,0 which is where we expect it
anyway when resizing.

@fix
2015-02-05 14:41:12 +09:00
Carsten Haitzler fa4a0ef7cc xinerama note for multiscreen handling 2015-02-05 12:00:36 +09:00
Carsten Haitzler 33d4531f1d e - rewrite randr code entirely. core and dialog. dialog is basic atm
the dialog for now is simple and lets you just raw edit the properties
per screen in a dialog. nothing fancy. not user firendly. but it works.

the randr core has been totally rewritten and tested against a range
of drivers and setups before even getting a commit. it works solidly
and configures screens reliably now. drivers tested:

nvidia
intel
radeon

some drivers still are unreliable in terms of delivering plug/unplug
events for outputs (both intel and radeon are flakey - nvidia is solid
and reliable). so to fix this there is now a screen redo action you
can bind to a hotkey or something and have e re-evaluate current
screen setup and apply ny pending config if needed.

also to make reconfiguring prettier the screen is faded to black
first, then configured, then faded back in. some drivers work
flawlessly with this, others still flicker some garbage.

i admit - i haven't tested nouveau, but my general take on this is the
randr code is now in far better shape than where it was (minus pretty
and easy dialog). the dialog can be done next, but i'd like to get the
core in now for more testing.

@fix
2015-01-25 22:50:23 +09:00
Mike Blumenkrantz 7e3558383d set comp X window hint to normal
ee is broken in that it will never update the withdrawn property for a canvas unless you 1) explicitly set this 2) have an override window
2015-01-11 12:20:46 -05:00
Mike Blumenkrantz 781bfd7537 check focus after X nocomp end
fix T1768
2015-01-08 18:23:05 -05:00
Mike Blumenkrantz 922af2c52f remove e_comp_list(), deprecate all related functions for pending removal
there is only one E_Comp which can now be accessed by the e_comp global.

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

pass -Wno-deprecated-declarations to ignore these warnings during build
2015-01-05 15:39:15 -05:00
Mike Blumenkrantz 2d580a2f87 enforce no multihead in X compositor
this hasn't worked since E17, may was well stop trying
2015-01-05 15:36:11 -05:00
Mike Blumenkrantz 701e2d914a add support for new netwm csd X atoms
nothing uses these yet so there's no way to test them.

fix T1963
2015-01-03 00:42:42 -05:00
Mike Blumenkrantz 5bf04eed8f don't set gravity on client windows during X move/resize
fix T1940
2015-01-02 23:56:11 -05:00
Mike Blumenkrantz 610c439abd redo shaped client checks to use shape flags instead of rect pointer, fix shapeless clients
according to the shape extension protocol, the number of rectangles returned should be checked to determine a client's shape. if 0 is returned, the client has no shape, meaning that it either should not be drawn or should have no input region. this improves behavior with various client window types such as tooltips

ref T1820
2014-12-07 20:17:33 -05:00
Mike Blumenkrantz 38f30c83af fix X crash when trying to apply desktop window profile to client without desk 2014-12-07 20:17:33 -05:00
Mike Blumenkrantz ce8a4a2b78 remove ec->changes.internal_props
this should be set directly on the win using evas/elm apis
2014-11-20 15:26:22 -05:00
Mike Blumenkrantz 99589eb5af remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues:

* keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
2014-11-20 15:26:21 -05:00
Mike Blumenkrantz a9495340f6 fix internal window border changing 2014-11-03 14:10:17 -05:00
Mike Blumenkrantz 681b1f4312 manually break out of nocomp
in the event that there was only one window open and it was closed, this would permanently break the compositor

fix T1665
2014-09-16 10:39:34 -04:00
Mike Blumenkrantz ec1cd25cfe rename E19* defines/texts to just E so they don't need to keep being updated 2014-09-09 12:30:50 -04:00
Mike Blumenkrantz 6318fd042b add short path to ensure ConfigureNotify event after request
fix T1485
2014-09-05 15:01:52 -04:00
Mike Blumenkrantz 44545b53a9 don't break nocomp for client activate requests 2014-09-01 10:30:53 -04:00
Mike Blumenkrantz e949fcc077 only use pixmap size shortcut on non-internal clients
this gets broken pretty easily since we resize all over the place
2014-09-01 10:30:53 -04:00
Mike Blumenkrantz 7b8ad92604 set X pixmap size on client init 2014-08-28 13:30:07 -04:00
Chris Michael 28b512d5a7 fix X compositor to use e_pointer_window_new
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 11:01:46 -04:00
Mike Blumenkrantz 3b649534c9 Fix building Enlightenment for X11-only, Wayland-Only, and X11 with Wayland clients.
Signed-off-by: Chris Michael <cp.michael@samsung.com>

Additional authors: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:38 -04:00
Chris Michael 20e17c97ac create the compositor e_pointer on the ecore_evas
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:37 -04:00
Chris Michael 1d1d82ea12 fix botched 'git merge' from desktop_window_profile patch
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael 79599394da update various files for compositor structure changes
- X compositor
  - shell module
  - drm module
  - x11 module
2014-08-26 10:10:35 -04:00
Chris Michael a6ed5677b2 update X compositor code for structure rename
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael 5ea94188f5 remove EINA_UNUSED for parameter that is actually used
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Mike Blumenkrantz e0125a483a fix internal transient clients 2014-08-26 00:27:08 -04:00
Mike Blumenkrantz 462d79e147 redo/simplify PRESENT usage in compositor to no longer use PRESENT
keith said no
2014-08-22 09:56:11 -04:00
Carsten Haitzler 0bb9acc75d comp - with sw comp tell apps to also use sw - disable accel requests
this addresses a vbox gl asccel issue where gl client apps can cause
al of vbox to crash and users find it unexpected that e is set to
software compositing but apps go and use opengl, so it's more
consistent for users
2014-08-06 12:04:27 +09:00
Mike Blumenkrantz 119dfb1bd8 unset phony exe on client deletion if exe still exists
fix T1460
2014-07-30 11:20:08 -04:00
Mike Blumenkrantz 949a0eeb15 move comp_x pixmap dirty setting to post_resize idler
this fixes a rare race condition which can only be triggered by the tiling module

fix T993
2014-07-30 00:52:20 -04:00
Chris Michael 728f383f0b remove call to e_comp_object_frame_geometry_get when handling x/y
configure masks.

NB: We never used the left/top frame geometry after fetching it

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-23 16:49:45 -04:00
Gwanglim Lee 571a696ab8 fix visibility issues related to desktop window profile
Summary:
1. fix window profile change request with wrong x window id
2. refactoring desktop window profile codes to handle e_client_desk_set correctly

Test Plan:
1. enlightenment: Settings Panel -> Screen -> Virtual Desktops -> Check "Use desktop window profile" -> Apply
2. open an efl app on 1st desktop (0-0)
3. set a window remember on efl app window
4. go to 2nd desktop (1-0)
5. open an efl app again. it should be positioned on the previous desktop (0-0)

Reviewers: zmike, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D926
2014-06-09 13:30:04 -04:00
Mike Blumenkrantz a4f74adddf block client resize requests for fullscreen clients 2014-06-08 12:27:54 -04:00
Mike Blumenkrantz 483023051e completely redo window profiles
when this feature was added, its behavior was naively set to ignore repeated desk changes. it also was not adequately tested, resulting in a frustratingly large number of bugs.

with these changes, window profiles should no longer be the cause of client visibility being broken as caused by a failure to change desk.

fix TChutney
2014-05-29 16:57:54 -04:00
Mike Blumenkrantz 7440513af0 set stack object name for client-backed stacking objects 2014-05-29 12:19:10 -04:00
Carsten Haitzler 2e72c9fc93 fix infinite property change loop
this fixes T1259
2014-05-19 17:11:02 +09:00
Mike Blumenkrantz 16ad939ecb reorder comp_x init 2014-05-11 12:58:29 -04:00
Seunghun Lee dfd6ebd986 update client initial attributes on geometry configurerequests
split from D808
2014-05-11 12:39:54 -04:00
Mike Blumenkrantz 59afd894e4 lower DESKTOP->NORMAL layer markers on startup to fix override layering 2014-05-10 17:18:09 -04:00
Mike Blumenkrantz 9f99812d1d ignore configure events on layer marker windows 2014-05-10 17:18:08 -04:00
Mike Blumenkrantz 044edb7925 only use e_exec's vdesk if client does not use its remember's vdesk 2014-05-07 21:36:25 -04:00
Gwanglim Lee a5bd16603f e_comp_x: fix black area of override redirect win
Summary:
Black area of override redirect window could send damage notify which has unwanted xy position.
(a) Skip x configure notify with 3,55 316x162 of override redirect win
(b) Handle x show notify: create a new client and x damage for override redirect win
(c) Handle x damage notify with 3,55 316x162

To resolve it, E discards unwanted xy position of first damage for override redirect window.
This fixes remained problem of T1180 and T1188.

Test Plan:
1. Run e with sw engine mode
2. Run pcmanfm
3. Select menu in pcmanfm
4. Check whether menu window has black area

Reviewers: raster, zmike, devilhorns

CC: cedric

Differential Revision: https://phab.enlightenment.org/D800
2014-04-26 13:17:13 -04:00
Carsten Haitzler bdc3d5b5e3 formatting 2014-04-18 09:39:16 +09:00
Wonguk Jeong fb437cd1b0 comp_x_screensaver: screensaver off bug fix
Summary:
Can not turn off screensaver due to condition check bug.

@fixes

Test Plan: enlightenment -> do nothing -> screen saver on -> mouse/key input -> check whether screen saver is turned off or not

Reviewers: raster, cedric, zmike

Reviewed By: raster

CC: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D766
2014-04-18 09:35:45 +09:00
Carsten Haitzler cf90b84a42 fix screensaver/blanking issue where a ss on/off events come in together 2014-04-17 13:55:39 +09:00
Mike Blumenkrantz 114b411da1 never use new clients for stacking
fix Tcedric
2014-03-27 21:27:51 -04:00
Mike Blumenkrantz e49b3beff1 ensure minimum X parent window size of 1x1
fix T1098
2014-03-27 16:47:19 -04:00
Mike Blumenkrantz 3f10e7557f ignore X layer window mouse events
fix T1130
2014-03-27 16:47:19 -04:00
Mike Blumenkrantz c04d754ac5 enabling drm output module should NOT require X-less build.
these defines all need to be changed from HAVE_WAYLAND_ONLY to something like WITH_X or we're going to have lots of problems with xwayland later on
2014-03-18 16:14:04 -04:00
Mike Blumenkrantz a2025ddaad ignore size change configurerequests during maximize if not also changing position
correcty fixes gtk window (un)maximize
2014-03-17 12:56:21 -04:00
Mike Blumenkrantz 865dc17221 null check client on X stack request
CID 1155287
2014-03-13 12:05:13 -04:00
Mike Blumenkrantz ae81d76a3c ignore ignored clients for X mouse events
fix T1058
2014-03-06 09:35:00 -05:00
Mike Blumenkrantz 9ad04eb877 redo client urgency again with separate flag for actual urgent state
preserve icccm flag for accurate detection
2014-03-05 10:08:09 -05:00
Mike Blumenkrantz 54999472de force full rerender on present pixmap size change
a new X extension should make this unnecessary in the future for pixmap resizes, but for now it seems to be a necessary evil

fix T993
2014-02-28 10:48:54 -05:00
Mike Blumenkrantz ef26b0fb1e set client-redirected on overrides 2014-02-26 11:46:31 -05:00
Daniel Kolesa 79f3313931 e_comp_x: reverted 7c20b54 (was fixed in the meantime and i didn't notice) 2014-02-25 20:30:45 +00:00
Daniel Kolesa 7c20b5407a e_comp_x: check for zone before actually using it 2014-02-25 20:16:15 +00:00
Mike Blumenkrantz eca0549238 only set atoms for zone geometry for non-ignored clients
another T787 crash
2014-02-25 14:38:08 -05:00
Mike Blumenkrantz aec20f1420 force full render on present events during startup 2014-02-21 16:44:12 -05:00
Mike Blumenkrantz e7127a93ff don't set input shape differently on shaped_input clients
T931
2014-02-10 09:45:53 -05:00
Mike Blumenkrantz b97d043b25 assume that if we can't find a requested stacking client (X) it's going to be at the top of the stack
T908
2014-02-06 21:46:12 -05:00
Mike Blumenkrantz 78334b615e more stringshare improvements for window profile, apply window profile if no desk set (impossible?) 2014-02-06 12:59:28 -05:00
Mike Blumenkrantz 569c90e87f e_client_util_is_stacking() -> e_client_is_stacking()
regrettably, this can't be in e_client.x because it needs E_Comp struct members and header order does not allow for this :(
2014-02-05 10:58:57 -05:00
Mike Blumenkrantz 8d71213839 e_client_name_get() -> e_client_util_name_get()
this should be inlined
2014-02-05 10:55:50 -05:00
Mike Blumenkrantz eba912cf6a e_client_resizing_get() -> e_client_util_resizing_get()
functions in e_client.x should be namespaced with e_client_util to indicate that they are inline (and in e_client.x)
2014-02-05 10:51:36 -05:00
Mike Blumenkrantz f4de16df08 don't change zone after moving client
this happens automatically, and with more accuracy, later on
2014-02-03 13:57:45 -05:00
Mike Blumenkrantz 3c436b5c09 bugfix: initial client positioning with multiple monitors improved
this was added a while ago to fix positioning of windows that wanted to start centered but couldn't accurately calculate xinerama screen sizes, resulting in windows getting centered across the screen split. it ended up being a bit too aggressive, however.
2014-02-03 13:03:01 -05:00
Mike Blumenkrantz d293b368b8 bugfix: screen limits policy no longer breaks X client positioning
this has been broken since it was added, and I strongly regret allowing it to be added.
2014-02-03 12:52:35 -05:00
Mike Blumenkrantz d3468dd920 feature: ACTIVATE_EXCLUDE window active hint policy
this option causes window activation requests to only activate a window if it is on a currently visible virtual desktop, otherwise it will be set as urgent. I recall that things may have worked this way long ago...
2014-01-30 12:45:49 -05:00
Mike Blumenkrantz 752c220482 redo X first_damage logic
the main idea here is to not DRAW at the time of the first damage to avoid overdraw, but ignoring the fact that the region is ready to be drawn can be problematic when the drawing eventually occurs. best choice here is to keep the region but not the render update
2014-01-30 12:12:01 -05:00
Mike Blumenkrantz 340e02efb5 ignore non-internal override clients when stacking
this fixes the case where clients will briefly escape normal/expected stacking on startup if an override is visible
2014-01-30 12:12:01 -05:00
Mike Blumenkrantz 53e477a7d0 simplify layer marker stacking setup 2014-01-30 12:12:01 -05:00
Mike Blumenkrantz b6cbacc77e ignore re_manage clients for X object creation events 2014-01-30 12:12:01 -05:00
Mike Blumenkrantz 9d3f47f4f6 ignore deleted clients on comp object add event 2014-01-29 21:12:07 -05:00
Mike Blumenkrantz 7ef4340c3f revert 83397e1bde 2014-01-29 21:12:07 -05:00
Carsten Haitzler b7515a0958 null out damage on free in _e_comp_x_hook_client_del 2014-01-30 11:02:44 +09:00
Carsten Haitzler 83397e1bde fix segv where comp_data is null but still accessed
it seems i have an override-redirect window just off the bottom-right
of my screen - i think its the scim input panel status. what happens
is it is "managed" by comp but then deleted (_e_comp_x_hook_client_del
called), BUT _e_comp_x_object_add is called with a deferred event for
that client to add it again (likely this is a race) which finds he
client in a state of not having comp_data as the E_FREE in
_e_comp_x_hook_client_del() frees it and sets it to NULL. move the
comp_data free to the actual client free (which is the last time a
client is valid at all) solves this.
2014-01-30 08:55:28 +09:00
Mike Blumenkrantz 0ff2a408d3 force stacking for all new X clients during add event
this fixes a race condition when windows open simultaneously and then are stacked under each other: the previous result was that they would end up hanging out at the top of the window stack (above all windows) until another window was raised above them. now they stack as expected
2014-01-28 20:43:19 -05:00
Mike Blumenkrantz 576f0bab2d reject successive attempts to add evas callbacks in X compositor 2014-01-28 20:43:03 -05:00
Mike Blumenkrantz 49d6de3316 send X flush/dump to client window, not parent window 2014-01-28 15:38:40 -05:00
Mike Blumenkrantz 3dd0ea5189 break out client urgency setting into separate api function
this unclutters the client idler a little and also makes it easier to correctly set the urgency hint for clients
2014-01-27 21:35:39 -05:00
Mike Blumenkrantz 8aafbfe6ce X cursor color support doesn't depend on config values 2014-01-27 11:12:56 -05:00
Mike Blumenkrantz 9b2372a798 ignore X configure events where override is not set
this handler is only for dealing with overrides, so if this flag isn't set we're not interested
2014-01-27 10:58:41 -05:00
Mike Blumenkrantz fa33846fe4 force show of X layer markers on startup
this is cosmetic and only quiets some console errors on startup
2014-01-24 18:42:52 -05:00
Mike Blumenkrantz 99dca3c944 set first_damage flag on overrides
some overrides, in very rare cases, seem to only send a single damage. rendering at this point doesn't seem to hurt anything, so I'll give it a shot
2014-01-24 17:44:19 -05:00
Mike Blumenkrantz db31ccc5de unset new_client flag for override windows
this flag is used to block most cwm actions until after the client is past its first loop iteration. overrides, however, don't need to be blocked and will in fact break sometimes (fuck you gtk) as a result

it's worth noting that showing/hiding overrides extremely fast will still break the compositor a little in that I'm not going to render a single frame while constantly playing edje hide/show animations which are longer than the actual render. with animations disabled, however, rendering occurs as expected.

T831
2014-01-24 17:38:27 -05:00
Mike Blumenkrantz 6044fd8a78 force pixmap refresh for overrides, also automatically set pixmap size
override windows don't get PRESENT notifications, apparently, but this can be shortcut anyway by just setting the size from the configure event
2014-01-24 17:36:47 -05:00
Mike Blumenkrantz 57903b7aa3 only send ICCCM move/resize if it isn't already going to be sent 2014-01-24 16:20:21 -05:00
Mike Blumenkrantz c06eca070d send ICCCM move/resize for configure requests on X windows
somehow this got left out of the E19 handler, which broke apps that relied upon such notifications, most notably gnome-terminal
2014-01-24 16:01:01 -05:00
Mike Blumenkrantz a4c5629e7a check for comp data deletion and block X calls
these are all invalid if client's comp data has already been cleared, so just let the compositor manipulate stuff without touching protolol
2014-01-24 13:13:07 -05:00
Mike Blumenkrantz e54434e2db set X root pointer after determining color availability
E cursor now shows normally on startup
2014-01-23 16:16:58 -05:00
Mike Blumenkrantz ba82fb221d set only one client, the top client, as the focused client on restarts
with this, stacking and focus should be perfectly preserved across e restarts
2014-01-23 13:26:35 -05:00
Mike Blumenkrantz 00c4873d06 force X stacking for re-managed clients on startup
this ensures that X stacking is the same as canvas stacking
2014-01-23 13:26:00 -05:00
Mike Blumenkrantz 6a80d19cd7 restack windows after unreparenting on shutdown
this preserves stacking order across restarts
2014-01-23 13:25:25 -05:00
Mike Blumenkrantz c73aed330b only set take_focus for X clients after main loop has been reached 2014-01-23 13:24:46 -05:00
Mike Blumenkrantz aba8a6fe32 create clients for stacking windows immediately, don't check for them later 2014-01-23 12:01:31 -05:00
Mike Blumenkrantz 40a3950855 trivial use local window variable instead of helper function 2014-01-23 11:48:18 -05:00
Mike Blumenkrantz 525a342b2e suuuuuper don't restack layer markers 2014-01-23 11:42:22 -05:00
Mike Blumenkrantz b10f81de08 clean up shape input rect setting code 2014-01-23 10:34:17 -05:00
Mike Blumenkrantz 5707e8ceb8 I was right the first time...disable shape events on internal wins not input_only 2014-01-23 10:34:17 -05:00
Mike Blumenkrantz 292e8fd4b3 Revert "comp: fix self feeding event loop with shape input events on override wins"
This reverts commit 05a7087c84.
2014-01-23 09:02:33 -05:00
Mike Blumenkrantz 006c09621b revert 0f3e3ae5da, 14207e9770
shape modification on overrides

T847
2014-01-23 08:52:45 -05:00
Carsten Haitzler 05a7087c84 comp: fix self feeding event loop with shape input events on override wins
so comp would call ecore_x_composite_window_events_enable in
_e_comp_x_client_shape_input_rectangle_set()
_e_comp_x_hook_client_post_new_client() all the time.. because
ec->need_shape_merge was always set.. why was it always set.. because
ecore_x_composite_window_events_enable woudl set shape rectangles to
make the window visible to input events... so e would feed itsefl with
events all day long via x. this shortcuts that to check if event rects
are the SAME then don't set them as the ones that are stored.
2014-01-23 19:58:59 +09:00
Mike Blumenkrantz 0f3e3ae5da ignore only non-override non-reparented clients when disabling composite events 2014-01-22 22:34:55 -05:00
Mike Blumenkrantz 7f72d160af don't select shape events for input_only clients, do set for internal clients 2014-01-22 22:34:01 -05:00
Mike Blumenkrantz 5549c1b530 handle shaped overrides more accurately for theme and rendering
overrides don't get to do shape exports for rendering, so this needs to be done during the initial shape check
2014-01-22 22:14:33 -05:00
Mike Blumenkrantz c24d3c60aa break out X shape rect check loop into helper function 2014-01-22 22:14:33 -05:00
Mike Blumenkrantz ae4e98b856 only set shape export flag during shape update event for non-overrides 2014-01-22 22:14:33 -05:00
Mike Blumenkrantz 14207e9770 allow toggling composite window events for override windows 2014-01-22 22:14:33 -05:00
Mike Blumenkrantz 2d29661541 select shape events for override clients 2014-01-22 22:14:33 -05:00
Mike Blumenkrantz db7a1f6df3 force prerendering for internal clients
we can assume that these are always going to be ready for drawing immediately, and sometimes X fucks up the damages so it's best to go with the full frame from the beginning
2014-01-22 22:14:33 -05:00
Mike Blumenkrantz a8d3a0e57f emit backlight changed event for X backlight events 2014-01-21 17:26:21 -05:00
Mike Blumenkrantz 0f938c9b78 do Xrandr backlight updates in place upon recieving events instead of looping all outputs 2014-01-21 17:07:21 -05:00
Mike Blumenkrantz 215c0409e0 feature: handle xrandr backlight using a single, accurate handler
there's an event from ecore-x which tells us when this property has changed, which means we no longer have to be constantly checking to see if other apps have changed it
2014-01-21 16:48:09 -05:00
Mike Blumenkrantz 3ae9e394ec add back first_draw_delay timer for X clients
this is a safety timer to handle the case of "what happens if a new client only ever sends one damage during its startup"
2014-01-20 19:03:50 -05:00
Mike Blumenkrantz 69d3e02638 ignore first damage for X clients
when not dealing with a re_manage client (persisting from previous E instance), we're almost definitely going to get multiple full-window damages as a new client starts up. the first damage USUALLY results in a garbage render, so ignoring it makes the first frame become actual window content (good!) or a transparent rect until the client finishes drawing (not good!), which is at least an improvement over showing random pixels
2014-01-20 19:01:04 -05:00
Mike Blumenkrantz 32d4c2f2b9 fix X shape exporting when bounding box changes
this fixes rendering on shaped clients like yakuake and makes them render even more accurately than E18

PS. I hate shape extension.
2014-01-19 03:33:30 -05:00
Mike Blumenkrantz cbfee4f53e uncomment debug function 2014-01-19 00:45:41 -05:00
ChunEon Park 7474036140 enlightenment - removed warnings. 2014-01-18 19:37:02 +09:00
Mike Blumenkrantz eee5bfea9c force X client adjust on frame change 2014-01-17 17:42:12 -05:00
Mike Blumenkrantz fda2442fe5 enforce correct geometry for client->saved.{x,y}
this is for CLIENT geometry and does NOT include the zone x/y
2014-01-16 20:27:07 -05:00
Mike Blumenkrantz 1ad30b0705 show the compositor overlay window when nocomp mode ends 2014-01-16 12:09:51 -05:00
Mike Blumenkrantz a33fa26847 only set shape mask if client has been reparented 2014-01-15 14:03:50 -05:00
Mike Blumenkrantz 36e2b03376 X override clients are already placed 2014-01-15 13:51:54 -05:00
Mike Blumenkrantz 047bcd7818 fix netwm sync resizing to account for frame geometry
T778
2014-01-15 12:13:05 -05:00
Mike Blumenkrantz d095b392e9 set netwm sync alarm to right struct member
T778
2014-01-15 12:13:05 -05:00
Mike Blumenkrantz a084217ba9 don't hints on override clients
T772
2014-01-15 12:13:04 -05:00
Mike Blumenkrantz 390b8a5bf5 feature: selective redirection toggling
this toggles redirection on compatible (X) clients while still mostly preserving window frame functionality
2014-01-14 20:29:00 -05:00
Mike Blumenkrantz df0173d24c feature: support XPRESENT extension to reduce compositing overhead
xorg 1.15 introduces this extension which has a magical event to notify when a pixmap's size changes, which means that the size never needs to be manually fetched
2014-01-14 20:29:00 -05:00
discomfitor a31e8a70fb break out desklock into display server-able hooks
if we're running in a non-X environment, we can't very well expect that using X calls to hide/show windows for desklock is going to work as expected. now a compositor backend can add a pre or post desklock hook to hide/show its clients as necessary
2014-01-14 20:28:59 -05:00
discomfitor 3047ce85b8 not sure if keep... add retries for failure x clients
if a client's X attributes fail to be fetched on the first attempt, it's possible that we might succeed on a second attempt, which would prevent us from losing a client
2014-01-14 20:28:59 -05:00
Mike Blumenkrantz 5737103d67 wl pointers done-ish
pointers in E now come in two flavors, one for each protocol that we currently support. each is created from the owner compositor backend:

X pointers still work as usual

Wayland pointers are actually surfaces that we dump image data into periodically to render them as evas images

some small amounts of hack is necessary to make this work, namely blocking X pointers when a Wayland one is in use if we're running a multi-protocol compositor
2014-01-14 20:28:58 -05:00
Mike Blumenkrantz 12d7405a0f huge wl fixup (wayland clients actually working again)
* try to clear up build system for separating out ecore-x

* add #ifdefs for lots of ecore-x stuff

* break out some internal e wl functions for reuse in api

* store wl surface buffers as an inlist

* add protocol-specific client compositor data

** move lots of X client attributes here

* add pixmap type checks to a number of X-specific things, such as grabinput, to block them for non-X clients

* rearrange startup order to work with wayland

* move X screensaver code to e_comp_x

* flag modules still requiring X with -DNEED_X
2014-01-14 20:28:57 -05:00
Mike Blumenkrantz b7b24dc283 set name/class on comp selection win, ignore comp selection win 2014-01-14 20:28:57 -05:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

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

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

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

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

** e_pixmap api provides generic client finding and rendering api

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

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

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

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

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

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

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

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

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

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

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

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

comp files and descriptions:

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

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

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

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00