diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-31 10:22:11 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-31 10:23:53 +0200 |
commit | 1ce5844ceba090e81485b1556391e36dcd9e1a5a (patch) | |
tree | ebf0ac6226ee45dc5cf2798620385eb4e3e5fa41 /main/xfce4-settings/enable-crt-if-disabled-after-power-cycle.patch | |
parent | ac34512a2156a5b9625b93cbff1f958dfd0f4b78 (diff) | |
download | aports-1ce5844ceba090e81485b1556391e36dcd9e1a5a.tar.bz2 aports-1ce5844ceba090e81485b1556391e36dcd9e1a5a.tar.xz |
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
Diffstat (limited to 'main/xfce4-settings/enable-crt-if-disabled-after-power-cycle.patch')
-rw-r--r-- | main/xfce4-settings/enable-crt-if-disabled-after-power-cycle.patch | 52 |
1 files changed, 52 insertions, 0 deletions
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, |