forked from pool/xorg-x11-server
de140e0677
Copy from X11:XOrg/xorg-x11-server based on submit request 19080 from user sndirsch OBS-URL: https://build.opensuse.org/request/show/19080 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=138
56 lines
1.9 KiB
Diff
56 lines
1.9 KiB
Diff
Index: xorg-server-1.6.3.901/hw/xfree86/modes/xf86RandR12.c
|
|
===================================================================
|
|
--- xorg-server-1.6.3.901.orig/hw/xfree86/modes/xf86RandR12.c
|
|
+++ xorg-server-1.6.3.901/hw/xfree86/modes/xf86RandR12.c
|
|
@@ -55,6 +55,13 @@ typedef struct _xf86RandR12Info {
|
|
int pointerY;
|
|
Rotation rotation; /* current mode */
|
|
Rotation supported_rotations; /* driver supported */
|
|
+
|
|
+ /* Used to wrap EnterVT so we can re-probe the outputs when a laptop unsuspends
|
|
+ * (actually, any time that we switch back into our VT).
|
|
+ *
|
|
+ * See https://bugs.freedesktop.org/show_bug.cgi?id=21554
|
|
+ */
|
|
+ xf86EnterVTProc *orig_EnterVT;
|
|
} XF86RandRInfoRec, *XF86RandRInfoPtr;
|
|
|
|
#ifdef RANDR_12_INTERFACE
|
|
@@ -1648,10 +1655,25 @@ xf86RandR13SetPanning (ScreenPtr
|
|
}
|
|
|
|
static Bool
|
|
+xf86RandR12EnterVT (int screen_index, int flags)
|
|
+{
|
|
+ ScreenPtr pScreen = screenInfo.screens[screen_index];
|
|
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
|
+
|
|
+ if (randrp->orig_EnterVT) {
|
|
+ if (!randrp->orig_EnterVT (screen_index, flags))
|
|
+ return FALSE;
|
|
+ }
|
|
+
|
|
+ return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
|
|
+}
|
|
+
|
|
+static Bool
|
|
xf86RandR12Init12 (ScreenPtr pScreen)
|
|
{
|
|
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
|
|
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
|
|
|
rp->rrGetInfo = xf86RandR12GetInfo12;
|
|
rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
|
|
@@ -1667,6 +1689,10 @@ xf86RandR12Init12 (ScreenPtr pScreen)
|
|
rp->rrModeDestroy = xf86RandR12ModeDestroy;
|
|
rp->rrSetConfig = NULL;
|
|
pScrn->PointerMoved = xf86RandR12PointerMoved;
|
|
+
|
|
+ randrp->orig_EnterVT = pScrn->EnterVT;
|
|
+ pScrn->EnterVT = xf86RandR12EnterVT;
|
|
+
|
|
if (!xf86RandR12CreateObjects12 (pScreen))
|
|
return FALSE;
|
|
|