From 1ce5844ceba090e81485b1556391e36dcd9e1a5a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 31 May 2016 10:22:11 +0200 Subject: main/xfce4-settings: fix bug that make screen not power on https://bugzilla.xfce.org/show_bug.cgi?id=12430 https://bugzilla.xfce.org/show_bug.cgi?id=11107 --- main/xfce4-settings/APKBUILD | 12 +++-- .../enable-crt-if-disabled-after-power-cycle.patch | 52 ++++++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 main/xfce4-settings/enable-crt-if-disabled-after-power-cycle.patch (limited to 'main') diff --git a/main/xfce4-settings/APKBUILD b/main/xfce4-settings/APKBUILD index ffed0ea4a4..4ed0f802c9 100644 --- a/main/xfce4-settings/APKBUILD +++ b/main/xfce4-settings/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgname=xfce4-settings pkgver=4.12.0 -pkgrel=1 +pkgrel=2 pkgdesc="Settings manager for xfce" url="http://www.xfce.org/" arch="all" @@ -12,6 +12,7 @@ makedepends="libxfce4ui-dev exo-dev libxi-dev libxrandr-dev libxklavier-dev libnotify-dev libxcursor-dev garcon-dev upower-dev" source="http://archive.xfce.org/src/xfce/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2 alpine-defaults.patch + enable-crt-if-disabled-after-power-cycle.patch " _builddir="$srcdir"/$pkgname-$pkgver @@ -47,8 +48,11 @@ package() { } md5sums="3eb9ff3862d773287f56f142ab7ec361 xfce4-settings-4.12.0.tar.bz2 -f7c29607f7222d7de1674e8db6e5d9b7 alpine-defaults.patch" +f7c29607f7222d7de1674e8db6e5d9b7 alpine-defaults.patch +79cab3ffacd74b4dddb5834984e4a810 enable-crt-if-disabled-after-power-cycle.patch" sha256sums="04becef105c19d0266cfe8dbf42619e7233c3b9fa99b43dbfc9c6a5959501f81 xfce4-settings-4.12.0.tar.bz2 -c5cb08cf21e7213fec4d48f8624da4b3c32647960c7ea5857a17c9274e8b60ae alpine-defaults.patch" +c5cb08cf21e7213fec4d48f8624da4b3c32647960c7ea5857a17c9274e8b60ae alpine-defaults.patch +d0d055c1a050ecc80df8eec381ebfe17eb11ad4b6a2690bd65d109f8a75e0432 enable-crt-if-disabled-after-power-cycle.patch" sha512sums="4a61c16f1f03de98c9968a00b50595e2934aaf28b80613c59403d33a293a7f8ef9ebb6fad98b0eeb97a6590b9100e91f73dd6363133d5d8bd06714f1126d8856 xfce4-settings-4.12.0.tar.bz2 -e0efdee2eaf833ae1ff8c428e3b2925191bdd3dad8a747705295d7c8bf170725906f4a96b3b332ba9ef958c4b5899448de6461b97503e997747e91d800138f8b alpine-defaults.patch" +e0efdee2eaf833ae1ff8c428e3b2925191bdd3dad8a747705295d7c8bf170725906f4a96b3b332ba9ef958c4b5899448de6461b97503e997747e91d800138f8b alpine-defaults.patch +088c28b0fd598ed7169b50d1bcf820aef07cc683688897f3243cca987bb4fe3f64c88286da750bed0e3424b49a3311d28f61d9a379a87d985ce79db7cfb3bb15 enable-crt-if-disabled-after-power-cycle.patch" diff --git a/main/xfce4-settings/enable-crt-if-disabled-after-power-cycle.patch b/main/xfce4-settings/enable-crt-if-disabled-after-power-cycle.patch new file mode 100644 index 0000000000..f6547111d7 --- /dev/null +++ b/main/xfce4-settings/enable-crt-if-disabled-after-power-cycle.patch @@ -0,0 +1,52 @@ +https://bugzilla.xfce.org/show_bug.cgi?id=11107 + +diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c +index 095e323..af70256 100644 +--- a/xfsettingsd/displays.c ++++ b/xfsettingsd/displays.c +@@ -415,6 +415,7 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent, + XfceRROutput *output, *o; + XEvent *e = xevent; + gint event_num; ++ gint j; + guint n, m, nactive = 0; + gboolean found = FALSE, changed = FALSE; + +@@ -496,9 +497,37 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent, + { + xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "New output connected: %s", + output->info->name); ++ /* need to enable crtc for output ? */ ++ if (output->info->crtc == None) ++ { ++ xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "enabling crtc for %s", output->info->name); ++ crtc = xfce_displays_helper_find_usable_crtc (helper, output); ++ if (crtc) ++ { ++ crtc->mode = output->preferred_mode; ++ crtc->rotation = RR_Rotate_0; ++ crtc->x = crtc->y = 0; ++ /* set width and height */ ++ for (j = 0; j < helper->resources->nmode; ++j) ++ { ++ if (helper->resources->modes[j].id == output->preferred_mode) ++ { ++ crtc->width = helper->resources->modes[j].width; ++ crtc->height = helper->resources->modes[j].height; ++ break; ++ } ++ } ++ xfce_displays_helper_set_outputs (crtc, output); ++ crtc->changed = TRUE; ++ } ++ } ++ + changed = TRUE; + } + } ++ if (changed) ++ xfce_displays_helper_apply_all (helper); ++ + /* Start the minimal dialog according to the user preferences */ + if (changed && xfconf_channel_get_bool (helper->channel, NOTIFY_PROP, FALSE)) + xfce_spawn_command_line_on_screen (NULL, "xfce4-display-settings -m", FALSE, -- cgit v1.2.3