[Xfce4-commits] [xfce/xfce4-settings] 01/01: display: Leave the monitor where it was if possible (Bug #14096)
noreply at xfce.org
noreply at xfce.org
Wed Jan 3 17:40:52 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 2
in repository xfce/xfce4-settings.
commit e128126f5e32c1018854403bb846cb9d6a091bb0
Author: Florian Schüller <florian.schueller at gmail.com>
Date: Sun Dec 17 20:56:23 2017 +0100
display: Leave the monitor where it was if possible (Bug #14096)
If a monitor is known and re-attaching it would not lead to a gap don't
move it to (x=0, y=0)
---
xfsettingsd/displays.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index af70256..14998df 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -506,7 +506,9 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent,
{
crtc->mode = output->preferred_mode;
crtc->rotation = RR_Rotate_0;
- crtc->x = crtc->y = 0;
+ if ((crtc->x > gdk_screen_width() + 1) || (crtc->y > gdk_screen_height() + 1)) {
+ crtc->x = crtc->y = 0;
+ } /* else - leave values from last time we saw the monitor */
/* set width and height */
for (j = 0; j < helper->resources->nmode; ++j)
{
@@ -1401,7 +1403,9 @@ xfce_displays_helper_toggle_internal (gpointer *power,
return;
crtc->mode = lvds->preferred_mode;
crtc->rotation = RR_Rotate_0;
- crtc->x = crtc->y = 0;
+ if ((crtc->x > gdk_screen_width() + 1) || (crtc->y > gdk_screen_height() + 1)) {
+ crtc->x = crtc->y = 0;
+ } /* else - leave values from last time we saw the monitor */
/* set width and height */
for (m = 0; m < helper->resources->nmode; ++m)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list