Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing event mask fields to WindowAttributes #77

Merged
merged 1 commit into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

* Added `setClassHint` (#76)

* Added a few missing event mask fields to `WindowAttributes` (#77)

## 1.9.2 (2020-08-25)

* Make sure that X11 search paths determined by autoconf are actually passed
Expand Down
9 changes: 9 additions & 0 deletions Graphics/X11/Xlib/Extras.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,9 @@ data WindowAttributes = WindowAttributes
, wa_colormap :: Colormap
, wa_map_installed :: Bool
, wa_map_state :: CInt
, wa_all_event_masks :: EventMask
, wa_your_event_mask :: EventMask
, wa_do_not_propagate_mask :: EventMask
, wa_override_redirect :: Bool
}

Expand All @@ -981,6 +984,9 @@ instance Storable WindowAttributes where
`ap` (#{peek XWindowAttributes, colormap } p)
`ap` (#{peek XWindowAttributes, map_installed } p)
`ap` (#{peek XWindowAttributes, map_state } p)
`ap` (#{peek XWindowAttributes, all_event_masks } p)
`ap` (#{peek XWindowAttributes, your_event_mask } p)
`ap` (#{peek XWindowAttributes, do_not_propagate_mask } p)
`ap` (#{peek XWindowAttributes, override_redirect} p)
poke p wa = do
#{poke XWindowAttributes, x } p $ wa_x wa
Expand All @@ -991,6 +997,9 @@ instance Storable WindowAttributes where
#{poke XWindowAttributes, colormap } p $ wa_colormap wa
#{poke XWindowAttributes, map_installed } p $ wa_map_installed wa
#{poke XWindowAttributes, map_state } p $ wa_map_state wa
#{poke XWindowAttributes, all_event_masks } p $ wa_all_event_masks wa
#{poke XWindowAttributes, your_event_mask } p $ wa_your_event_mask wa
#{poke XWindowAttributes, do_not_propagate_mask } p $ wa_do_not_propagate_mask wa
#{poke XWindowAttributes, override_redirect} p $ wa_override_redirect wa

foreign import ccall unsafe "XlibExtras.h XGetWindowAttributes"
Expand Down