Commit Graph

350 Commits

Author SHA1 Message Date
Mike Blumenkrantz ef6197b119 do not force client focus setting after calling e_desk_last_focused_focus()
in some cases focus setting must be deferred, and forcing focus in these cases
will create focus bugs

ref 9ae24a3a4a
2017-09-01 13:40:12 -04:00
Carsten Haitzler 9ae24a3a4a e client focus - fix focus if moving focused window to new desk - long
fix client focus the very very very long way vs
418319fc94
2017-09-01 19:29:03 +09:00
Mike Blumenkrantz 57176bf29d do not rescale override x11 clients during hint fetching 2017-08-25 14:47:10 -04:00
Mike Blumenkrantz c31cb51499 replace <br> with <ps/> for all text 2017-08-21 10:16:35 -04:00
Carsten Haitzler 73e3ed1bb0 e x11 focus fixup - dont do the fixup if input grabbed
this actually fixes everything fully and has focus working nicely now
with the fixup
2017-08-20 01:02:03 +09:00
Mike Blumenkrantz 09a8888f76 batch x11 maximize state change requests
if an app wants to set both horizontal and vertical, set both at the same
time to improve performance and accuracy
2017-08-18 15:52:50 -04:00
Mike Blumenkrantz 5998f175b5 temporarily cache x11 configure requests which reposition hidden windows
when an app tries to position itself before being shown, attempt to store this
and apply it in order to effectively handle cases where an app attempts to show
on a specific screen, e.g., presentation apps which show a console on one monitor
and the presentation on a different monitor

fix T1571
2017-08-18 15:52:50 -04:00
Mike Blumenkrantz 121e7fab4b replace existing resize pointer mode for x11 client-initiated resizes
ensure there is no mismatch between pointer modes when pushing/popping modes

fix T4893
2017-08-18 15:52:50 -04:00
Mike Blumenkrantz b6759a8c27 do not apply x11 pointer focus if key/mouse grabs exist
fix T5871
2017-08-16 10:42:14 -04:00
Mike Blumenkrantz b2c5c20cde manually get client under pointer for checking x11 pointer focus
e_client_under_pointer_get() ignores overrides.

ref 3ee5a0378d

fix T5878, T5871

IF ONLY THERE WERE SOME METHOD FOR TESTING COMMITS BEFORE THEY WERE PUSHED
2017-08-14 07:30:04 -04:00
Carsten Haitzler 3ee5a0378d e - do workaround with in events due to flags to get ptr focus right
so we egnore some mouse in evets due to their flags (crossing events
thansk to grab changes or other stuff) that we want to ignore for
other reasons like when a popup menu happens and so on... so if we get
a mouse in... 0.1 sec later double check where the pointer is with a
poll then fix focus. this should patch over a long standing annoyance
here in x11.

@fix
2017-08-06 18:34:42 +09:00
Mike Blumenkrantz c804650482 rescale x11 clients after fetching hints
ensure that clients initially respect useful geometry after size hints
have been fetched
2017-08-04 16:05:16 -04:00
Mike Blumenkrantz 29617bf80b move Ecore_X_Stack_Type member from client to x11 comp_data
no functional changes
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz 23613b3ded set client opacity any time netwm hint has changed in fetch
fix T5370
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 096c6b4090 continue to fetch netwm opacity hint if it changed since the last fetch
some apps (e.g., wine) do not trigger any event when changing this property,
and they use the property in order to simulate window fade in/out

ref T5370
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 596e48d066 use ecore_x_netwm_opacity_get() for x11 opacity checking
this makes the check for opacity more accurate since it returns a bool
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 5ddb8779e2 focus x11 root window on init when starting with xwayland
comp canvas does not have a valid xwindow and is unfocusable
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 263ee54545 rename bg_blank_object -> resize_object for a more accurate name 2017-07-21 14:43:37 -04:00
Carsten Haitzler c58bf393e0 mouse hiding - only grab pointer not pointer and keyboard - simple
dont need kbd grabbed at all. just pointer.
2017-07-12 10:45:50 +09:00
Mike Blumenkrantz 76484915e2 always perform initial input ungrab when waking screen
in the case where the desklock timer was longer than the blank timer,
this would permanently break input

input is still broken for the duration of the screen blank animation and
any time the screen is blanked
2017-07-11 15:04:22 -04:00
Mike Blumenkrantz 05a8df3d1a do not perform input grabbing during (un)blank if pointer will not animate
if the pointer will not animate, input will never ungrab

this commit still breaks input. do not use.
2017-07-11 15:03:55 -04:00
Mike Blumenkrantz 031d64c2ec Revert "Revert "move x11 suspend window grabbing to comp_x, ungrab on resume""
This reverts commit e90f63b25b.

move back to comp_x, put back grab on resume.

input is still broken with this commit, do not use.
2017-07-11 15:03:55 -04:00
Carsten Haitzler e90f63b25b Revert "move x11 suspend window grabbing to comp_x, ungrab on resume"
This reverts commit 7bc179da5a.

this now totally broke the glitch fix and it now animates in reverse
on suspend and does nothng on resume... testing might be a good idea
beforehand...
2017-07-11 09:00:05 +09:00
Mike Blumenkrantz 7bc179da5a move x11 suspend window grabbing to comp_x, ungrab on resume
ref d0c5fb465b
2017-07-10 09:49:34 -04:00
Carsten Haitzler d0c5fb465b support connected standby (non-s3 sleep/freeze) that new lpatops sport
this requires we have to force dpms on to reduce power. to avoid
glitches with the pointer staying around in x we need to support
suspending it too so it hides cleanly like the screen dims or undims.
also use the new powersave freeze mode to do this.

note that i've tested this on s3 supporting laptops and non-s3 and it
"works for me". it may require more testing and work. there is more to
power saving than just this as well but for now that's out of scope as
you have to mess with linux device autosuspend timeouts and a bunch
more (wowlan ... blahblah).

i need to find the source of the intermittent wakeups too in e. there
is a long lived timeout (8-ish seconds?) but more specifically e keeps
waking up from fd's and then reading /sys stuff about battery - some
event is causing us to do this... maybe to suspend this or make
battery checking very rare when in freeze mode (or screen off) etc.

so this fixes some glitches as well as supports a new way of sleeping
"alive" when hardware literally doesnt support normal s3 sleep... so
kind of a fix with a feature.
2017-07-10 10:18:50 +09:00
Mike Blumenkrantz fea11b1621 don't run x11 focus (un)set callbacks for override clients
this is unnecessary in x11 and broken in xwayland
2017-06-30 10:25:18 -04:00
Mike Blumenkrantz 836845a615 use xwayland check for clients when checking whether to reset focus to root
checking base pixmap returns false for xwayland clients
2017-06-30 10:25:18 -04:00
Mike Blumenkrantz d81818b309 do not show iconic x11 clients on on icccm hint change
this is supposed to handle the case of state changing from withdrawn
to normal, but attempting to show an iconic client in this case results
in dead windows on screen

fix T5444
2017-05-01 13:26:11 -04:00
Mike Blumenkrantz e1093c87ea set initial x11 window geometry for windows which do not have wm hints
fixes case where a non-override window has no hints and must be shown on
startup
2017-04-21 16:16:37 -04:00
Mike Blumenkrantz 174b0d040b add cache for dead x11 manager windows
in the case where an app unmaps and maps its window very quickly, this
allows detection of the maprequest event which will occur with the just-deleted
manager window so that the window can be correctly managed again

fix T5348
2017-04-07 16:08:38 -04:00
Mike Blumenkrantz e2be96901e do not attempt to set window hidden hints on non-internal x11 windows
this causes a BadWindow error
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz 58b66048f1 block x11 focus eventing under xwayland
ensure that focus changes come from the compositor and not from clients
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz 05ef0b0280 call e_randr2_shutdown in comp shutdown
this should always be called, not just in comp_x
2017-03-10 15:55:06 -05:00
Mike Blumenkrantz a064899511 move x11 iconic window init from e_hints -> comp_x initial fetch
this reflects the order in which the client passes through these functions
and fixes handling of iconic clients on startup
2017-03-10 15:55:06 -05:00
Mike Blumenkrantz f253351f0a force iconic state for iconic x11 clients during shutdown
this may or may not have been set previously if client mirrors are present,
but it should definitely be set during shutdown since there are no mirrors
2017-03-10 15:55:06 -05:00
Mike Blumenkrantz 8f896b7862 show x11 parent windows during reparent only if not withdrawn
iconic windows are still shown
2017-03-10 15:55:06 -05:00
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