Skip to content

X.L.SimplestFloat contains an unsafe getWindowAttributes #909

Open
@geekosaur

Description

@geekosaur
getSize :: Rectangle -> Window -> X (Window,Rectangle)
getSize (Rectangle rx ry _ _) w = do
  d  <- asks display
  bw <- asks (borderWidth . config)
  wa <- io $ getWindowAttributes d w
  let x  =  max rx $ fi $ wa_x wa
      y  =  max ry $ fi $ wa_y wa
      wh = fi (wa_width  wa) + (bw * 2)
      ht = fi (wa_height wa) + (bw * 2)
  return (w, Rectangle x y wh ht)

I guess nobody actually uses this layout, or we'd have heard about layouts suddenly becoming Full because they'd thrown exceptions by now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions