X11::XCB::Window(3pm)
β¨ NAME β¨
X11::XCB::Window β bestie, it's a whole entire X11 window π
β¨
Like, an object that is your window. She exists. She has geometry. She has opinions (the opinions are attributes). Let's get into it π«Ά
π¦ METHODS π¦
πΈ rect
Okay so this one is lowkey two different things depending on whether your window is on screen yet, and that's the whole plot twist:
- While the window is not mapped,
rectgives you back the planned geometry β like, the vibe you asked for, nothing has happened yet. - The second the window is mapped,
rectgives you its geometry including the window decorations π
Which means: after mapping, every single time you touch rect, the geometry gets figured out by actually querying X11 about it. And that's not free, bestie. That's at least 1 round-trip for non-reparenting window managers, and two or more round-trips for reparenting window managers. She's chatty. She's worth it. π
Also the return value depends on context, which is giving "it depends":
- In scalar context, you just get the window's geometry.
- In list context, you get the window's geometry and the geometry of the top window β that's the one containing this window but the first one under the root window in the hierarchy. iykyk.
π attributes
Returns the X11 attributes of this window. That's it, that's the tweet. π
π₯ map
Maps the window on the screen β aka makes it visible. She's arrived. Main character energy. Periodt. β¨
π unmap
The opposite of map. Makes your window invisible. She's taking a little break, no cameras please π
π destroy
Destroys the window completely. Not hiding. Not napping. Gone. π₯
β mapped
Returns whether the window is actually mapped. And no, there's no internal state here β it goes and gets the window attributes from X11 and checks for MAP_STATE_VIEWABLE. Trust issues? Correct ones. π
π§ create_child(options)
Creates a new X11::XCB::Window as a child window of the current window. Your window is now a parent. Growth. Maturity. Slay. πΈ
π add_hint($hint)
Adds the given $hint β one of "urgency" β to the window's set of hints. Go off, hint queen π
π delete_hint($hint)
Opposite of add_hint. We remove the hint. We move on. No cap. β¨
π¦ warp_pointer($x, $y)
Moves the pointer to the offsets ($x, $y) relative to the origin of the window it's called on. And if $x and $y are undef? It moves the pointer into the center of the window. Cute, convenient, iconic. π
π state
Returns the WM_STATE of this window β that's normal, withdrawn, or iconic. Pick your fighter. π
Reminder bestie: windows are real, geometry queries cost real round-trips, and rect after mapping is not free. Spend wisely π
That's the whole page, fr fr π brought to you by perl v5.42.3, dated 2026-08-22, straight out of the X11::XCB::Window(3pm) corner of the User Contributed Perl Documentation β¨ take care of your windows and they'll take care of you π«Άπ
π¦ where this page comes from
- ubuntu stonking: libx11-xcb-perl 0.25-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms