Commit Graph

59 Commits

Author SHA1 Message Date
Carsten Haitzler e8ca66527a e wl - fix randr fully to not even init if managed
@fix
2020-11-10 11:37:09 +00:00
Carsten Haitzler a9a877feca wl x11 - if managed stop randr from doing its thing as it conflicts
randr goes and resizes the e window to mach screen setup - wrong if
managed., so if managed call the new stop which shuts down randr

@fix
2020-11-10 11:17:59 +00:00
Carsten Haitzler b4264801d0 randr - more debug to tell us decision reasons to change setup or not 2020-08-27 11:57:27 +01:00
Carsten Haitzler ddc9ff7280 randr - add response timeout config value 2020-06-20 01:50:03 +01:00
Carsten Haitzler b55fa736ed randr - add option to ignore disconnects on specific screens...
work around kvm's that like to disconenct screens... be able to force
an ignore on disconnects on specific screens.
2020-06-15 22:27:34 +01:00
Carsten Haitzler 18c522fb24 Revert "e randr - x - only apply/modify randr if xurrent config not the same"
This reverts commit cf0a43b844.

This seems to cause some issues on restore at startup.
2020-06-13 22:56:40 +01:00
Carsten Haitzler cf0a43b844 e randr - x - only apply/modify randr if xurrent config not the same
so if already the same - leave it as-is.
2020-06-07 00:57:13 +01:00
Elyes HAOUAS 153f479d3f tree-wide: fix typos all over the place
Fix some typos

Differential Revision: https://phab.enlightenment.org/D11778
2020-05-14 12:04:51 +02:00
Carsten Haitzler 2b452e5db1 e - avoid segv's when zero screens are configured
at least backlight won't be applied now...
2020-04-22 20:46:59 +01:00
Carsten Haitzler 5ec8fee280 e_randr2 - fix screen change detection to look at right prev screen 2020-01-15 11:33:55 +00:00
Carsten Haitzler 5ad9734c9a randr - dont save instantly inline - comp may not be up. defer in job
save in a job later ... not instantly. as ave may involve an error
which may involve a dialog coming up which if compis not up yet...
boom.

@fix
2020-01-04 16:10:48 +00:00
Carsten Haitzler f8bda510a7 e randr - fix plug/unplug of external screen
it seems some logic to stop internal screen fake plug/unplugs from
interfering were hurting external screen plug/unplug. fix makes that
work again.
2019-09-28 18:44:08 +01:00
Carsten Haitzler 1cbd5ee024 e wl randr and screen setup - fix rotation mapping
a few problems i found on my rpi's...

1. rpi's retun that they do NO rotations (not even the normal 0 degree
default), so assume 0 degrees if none listed. this makes screen setup
even try and configure things on these kinds of drivers/devices
2. there was a mistmatch of 0, 90, 180, 270 srtyle rotation ints vs
the enum stype ecore drm2 uses. this fixes that so it uses ecore_drm2
considtently as ecore_drm2 expects. this stops output becomeing odd.
3. also seemingly we forgot to set the max mouse region based on res.
re-enable that commented out function.

now i can change res on my rpi3 and rpi4 in wl mode and it works right...
hooray!
2019-07-14 22:20:49 +01:00
Carsten Haitzler 752360e0c0 e randr - fix crash when no zones found 2018-07-18 02:19:12 +09:00
Carsten Haitzler 5a1e9a995c e laptop lid fixes to bring back behavior and trim down glitches
so i spent a few days lopening and closing the lids of a few laptops,
plugging and unplugging external screens in, plugging and unplugging
ac power and doing lots of combinations of these. this led to a whole
slew of interrealted issues that were pretty hard to detangle into
just single issues, so this is all one blob.

this fixes:

1. if a lid close gets a monitor unplug from x or e's randr wants to
unplug then this lead to slow unsuspend or lid open times as e was
reconfirguring the screens entireluy on lid open. dont do that. just
keep things as is, unless we have an external display, then reconfigure.

2. we had 2 systems monitoring for a wake. a poller and a systemd
event. this was redundant and lead to interesting things in the debug
output, so clean that up and on systemd systsems use the systemd wake
events

3. some systems dont shut down their screens on lid close, so they
stay open until screensaver timeouts kick in. bad. so also force the
screen to go off on lid close (if the lid screen is the only one we
have).

4. x seems to have a bug where if you force dpms off etc. to turn the
screen on, it still thinks it's of and wont dpms off again after that
until you eother give some input to have the wake event make the dpms
system in x think its now time to go on, or you toggle dpms on and
off, so i found toggling tricks x into thinking the right thing.

this makes some debugging also be consistent with printfs.

all in all i have a pretty well supported laptop doing swimmingly with
e and a not so well designed (acpi dsdt - missing many events like
acpi battery ones, ac power change acpi events, missing logic to power
off a closed screen in firmware or hardware and leaving it to sw...
not this laptop has a tocuh panel and extra fun points awarded since
the touch panel doesnt shut off on lid close... AND it reprots touch
events when it closes  as it touches the keys/case... hooray! that has
another work-around local to my system, as efl has no mechanism to do
this).

@fix
2018-05-18 21:45:20 +09:00
Mike Blumenkrantz b492e87851 use correct string for randr screen fuzzy matching
using the full edid string results in infinite recursion
2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 75a12a9461 check for matching '/' in screen edid before fuzzy matching in randr init
if no / exists then this function is pointless
2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 43d837d681 don't pretend randr mode can be null when it can't
CID 1379945
2017-08-25 14:47:10 -04:00
Carsten Haitzler 03aeb1d463 fix fallthrough warnings 2017-08-04 12:35:27 +09:00
Mike Blumenkrantz 6928ca8ce4 pass screen id when opening config dialog with ASK hotplug policy 2017-07-21 14:43:36 -04:00
Mike Blumenkrantz 48a7181089 add a configurable default policy (default: extend) for screen hotplugging
make an effort to "just work" instead of the classic enlightenment ux of being
as annoying as possible

ref T5707
2017-07-21 14:42:29 -04:00
Mike Blumenkrantz e65c64ff63 use 1 second for screen config apply delay
I want my life back from all this time spent waiting...
2017-07-20 17:18:33 -04:00
Carsten Haitzler 7ab621925f e randr2 - fix freeing of stringshare by making it a stringshare
cs->id was strduped but freed as a stringshare... so actually add it
as a stringshare.
2017-03-31 17:45:57 +09:00
Mike Blumenkrantz 32c55ebc51 handle null E_Comp->screen during randr2 shutdown
some output modules have no screen iface (e.g., buffer, wl_wl, wl_x11)
and so this will always be null
2017-03-10 15:55:19 -05: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
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
Carsten Haitzler e183ffa748 e randr2 - provide lookup funcs for screen and dpi 2016-01-08 18:04:53 +09:00
Carsten Haitzler 1fa0c79662 e randr - fix leak of modes list in randr code
this fixes a leak of the modes list in randr

@fix
2015-12-07 20:01:03 +09:00
Carsten Haitzler 58d5c6d3f6 e randr - slicken up fade to use sinusoidal interpolation
@feature
2015-12-07 20:00:14 +09:00
Carsten Haitzler f63f651800 e randr2 - remove auto-clone and now make randr dialog come up instead
some odd things happen with auto-clone, so give the user manual
intervention automatically with the randr conf dilaog coming up on an
unconfigured screen being detected.

@fix
2015-12-07 19:58:58 +09:00
Carsten Haitzler b018ac1abc e screens/zones/randr - store randr2 id in xinerama and zones for lookup
so e has a bit of a problem. we mostly deal with zones, BUt these
zones come from our old xinerama code (this likely should just die
some time) and THIS code gets fed info from e's randr code. we
re-fill/modify as randr finds new screens or things get reconfigured.
thus zones adapt. the problem is now all our zone code really has a
hard time reverse mapping the zone back to where it came from -eg the
randr screen data. you literally can't do a whole bunch of things like
know if that zone was an internal laptop lid or an external screen, or
if it was rotated or even what the dpi is... as you ave no deasy way
to map it back other than by guessing geometry matches.

this fixes that by storing the randr screen id (which should be
unique) fromt he original src randr screen in the xinerama screen and
then in the zone. with this you can do a quick lookup in the e randr
data should you ever need to find the info. this should pave the way
for some other fixes/improvements, but without this they cannot be done.

@fix
2015-11-11 21:22:30 +09:00
Mike Blumenkrantz 4b40ad10e5 always apply all randr changes after a screen event
fixes case where plugging an external monitor would cause the screen
to expand onto that display without the display being effectively usable
until after a restart
2015-10-01 13:17:27 -04:00
Mike Blumenkrantz 725890f105 emit randr change event on randr init
wayland compositors have been failing to create any outputs for some
time as a result of not getting any randr events on init
2015-08-12 20:17:25 -04:00
Mike Blumenkrantz 7986b084f8 enforce compositor canvas resizing/updating when emitting randr events
all compositors will want this to occur, so make it automatic
2015-08-12 19:27:53 -04:00
Carsten Haitzler 019b6641a3 e - randr - handle lid close screen turnoff correctly again
this USED to work until i made things like auto-clone work without
config and so on and that broke turning off closed lid screens. it
also works when i suspend while lid is closed and resume (i can only
test with lid open as i need to open lid to unsuspend).
2015-08-09 00:22:16 +09:00
Carsten Haitzler ee16a11455 e - randr allow you to turn off screens and keep them off if config says so 2015-07-19 22:41:48 +09:00
Carsten Haitzler 964fabe6e2 e randr2 - auto clone and use common res when doing so - make it work
tested this and made it work. should fix T2100
2015-07-12 18:12:00 +09:00
Carsten Haitzler d17851f714 fix leak in randr2 when matching clone modes 2015-06-08 20:53:13 +09:00
Carsten Haitzler 1a19a72a61 e - randr2 - filter to the "best" common mode match on clone config
this should fix T2100
2015-05-21 13:03:04 +09:00
Yomi aa56794304 Fix misspelling in e_randr2.c
Summary: Fix misspelling in e_randr2.c

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2476
2015-05-07 18:41:11 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz 97a1642222 fix typo when setting event state in e_randr2_screen_refresh_queue()
a non-event should not unset this variable
2015-04-23 08:33:20 -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 e383b5b55a always register E_EVENT_RANDR_CHANGE
failing to register this will cause event handlers for it to fail
on creation
2015-04-22 21:18:53 -04:00
Mike Blumenkrantz 881e0ab805 move all x11-related randr code into e_comp_x_randr.c 2015-04-22 16:16:05 -04:00
Mike Blumenkrantz 7104e637ef _config_screen_find() -> e_randr2_config_screen_find() 2015-04-22 16:07:58 -04:00
Mike Blumenkrantz b4e65519d1 move acpi lid status tracking from e_randr to e_acpi 2015-04-22 16:05:16 -04:00
Mike Blumenkrantz 853d04592e move e_randr internal screen changing timer -> e_randr2_screen_refresh_queue() 2015-04-22 16:04:36 -04:00