Skip to content

Commit

Permalink
Fix bottom when deserializing XRRNotifyEvent in getEvent
Browse files Browse the repository at this point in the history
This would crash any program that does

    xrrSelectInput dpy root rrCrtcChangeNotifyMask

and later calls getEvent on the received event.
  • Loading branch information
liskin committed Mar 31, 2021
1 parent 9a2cfc6 commit d2b2d59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## unknown

* Fixed type of `xrrUpdateConfiguration`
* Fixed bottom when deserializing XRRNotifyEvent in `getEvent`

## 1.9.2 (2020-08-25)

Expand Down
2 changes: 1 addition & 1 deletion Graphics/X11/Xlib/Extras.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ getEvent p = do
type_ == rrEventBase + rrNotify -> do
window <- #{peek XRRNotifyEvent, window } p
subtype <- #{peek XRRNotifyEvent, subtype } p
let subtype_ = fromIntegral subtype_
let subtype_ = fromIntegral subtype
case () of
_ | subtype_ == rrNotifyCrtcChange -> do
crtc <- #{peek XRRCrtcChangeNotifyEvent, crtc } p
Expand Down

0 comments on commit d2b2d59

Please sign in to comment.