diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index 9676fb747..38793c9cc 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -261,7 +261,7 @@ out: if (ret == Success) { dpn.type = DevicePresenceNotify; dpn.time = currentTime.milliseconds; - dpn.devchange = 1; + dpn.devchange = 5; /* DeviceControlChanged */ dpn.deviceid = dev->id; dpn.control = stuff->control; SendEventToAllWindows(dev, DevicePresenceNotifyMask, diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index dd0e6598e..e2d6295b9 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -494,7 +494,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) { ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - ScreenPtr pScreen = pScrn->pScreen; + /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */ + ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; PictTransform crtc_to_fb, fb_to_crtc; PictureTransformIdentity (&crtc_to_fb);