CTWM
Loading...
Searching...
No Matches
Data Structures | Data Fields
TwmWindow Struct Reference

Info and control for every X Window we take over. More...

#include <twm_window_struct.h>

Collaboration diagram for TwmWindow:
[legend]

Data Structures

struct  _names
 Various sources of window/icon names. More...
 
struct  _ring
 Window ring connectivity. More...
 
struct  _savegeometry
 Saved window geometry. More...
 

Data Fields

struct TwmWindownext
 Next TwmWindow on the Screen.
 
struct TwmWindowprev
 Previous TwmWindow on the Screen.
 
OtpWinListotp
 OTP control info for stacking. Created in OtpAdd().
 
Window w
 The actual X Window handle.
 
int old_bw
 Original window border width before we took it over and made our own bordering.
 
Window frame
 The X window for the overall frame.
 
Window title_w
 The title bar Window.
 
Window hilite_wl
 Left hilite window in titlebar.
 
Window hilite_wr
 Right hilite window in titlebar.
 
Window lolite_wl
 Left lolite window in titlebar.
 
Window lolite_wr
 Right lolite window in titlebar.
 
Cursor curcurs
 Current resize cursor.
 
Pixmap gray
 Pixmap to which the border is set to when window isn't focused.
 
struct Iconicon
 The current icon.
 
name_listiconslist
 The current list of potential icons.
 
int frame_x
 X position on screen of frame.
 
int frame_y
 Y position on screen of frame.
 
unsigned int frame_width
 Width of frame.
 
unsigned int frame_height
 Height of frame.
 
int frame_bw
 2d border width.
 
int frame_bw3D
 3d border width.
 
int actual_frame_x
 Saved frame_x when squeezed.
 
int actual_frame_y
 Saved frame_y when squeezed.
 
unsigned int actual_frame_width
 Saved frame_width when squeezed.
 
unsigned int actual_frame_height
 Saved frame_height when squeezed.
 
int title_x
 X coord of window title relative to title_w.
 
int title_y
 Y coord of window title relative to title_w.
 
unsigned int title_height
 Height of the full title bar.
 
unsigned int title_width
 Width of the full title bar.
 
charname
 Current window name. Points into TwmWindow::names.
 
charicon_name
 Current icon name. Points into TwmWindow::names.
 
struct TwmWindow::_names names
 Various sources of window/icon names. "
 
int name_x
 Position of window title text, relative to title_w.
 
unsigned int name_width
 width of name text
 
int highlightxl
 Position of hilite_wl and lolite_wl.
 
int highlightxr
 Position of hilite_wr and lolite_wr.
 
int rightx
 Position of of right titlebar buttons.
 
XWindowAttributes attr
 Window attributes from XGetWindowAttributes()
 
XSizeHints hints
 Window size hints.
 
XWMHintswmhints
 Window manager hints.
 
Window group
 Window group, from WM hints.
 
XClassHint class
 Window class info. From XGetClassHint().
 
struct WListiconmanagerlist
 List of the icon managers the window is in.
 
ColorPair borderC
 ColorPair for focused window borders.
 
ColorPair border_tile
 ColorPair for non-focused window borders.
 
ColorPair title
 ColorPair for various other titlebar bits.
 
bool iconified
 Has the window ever been iconified?
 
bool isicon
 Is the window an icon now ?
 
bool icon_on
 Is the icon visible.
 
bool mapped
 Is the window mapped ?
 
bool squeezed
 Is the window squeezed ?
 
bool auto_raise
 Should we auto-raise this window ?
 
bool auto_lower
 Should we auto-lower this window ?
 
bool forced
 Has had an icon forced upon it.
 
bool icon_moved
 User explicitly moved the icon.
 
bool highlight
 Should highlight this window.
 
bool stackmode
 Honor stackmode requests.
 
bool iconify_by_unmapping
 Unmap window to iconify it.
 
bool isiconmgr
 This is an icon manager window.
 
bool iswspmgr
 This is a workspace manager window.
 
bool isoccupy
 This is an Occupy window.
 
bool istransient
 This is a transient window.
 
Window transientfor
 What window it's transient for.
 
bool titlehighlight
 Should I highlight the title bar?
 
struct IconMgriconmgrp
 Pointer to the icon manager structure, for windows that are icon managers.
 
int save_frame_x
 x position of frame (saved from zoom)
 
int save_frame_y
 y position of frame (saved from zoom)
 
unsigned int save_frame_width
 width of frame (saved from zoom)
 
unsigned int save_frame_height
 height of frame (saved from zoom)
 
int zoomed
 ZOOM_NONE || function causing zoom.
 
bool wShaped
 This window is Shape'd.
 
unsigned long protocols
 Which protocols this window handles.
 
Colormaps cmaps
 colormaps for this application
 
TBWindowtitlebuttons
 Button windows in the titlebar.
 
SqueezeInfosqueeze_info
 Control info for title squeezing.
 
bool squeeze_info_copied
 Should ->squeeze_info be free()'d?
 
struct TwmWindow::_ring ring
 Window ring connectivity. "
 
bool OpaqueMove
 Move opaquely.
 
bool OpaqueResize
 Resize opaquely.
 
bool UnmapByMovingFarAway
 
bool AutoSqueeze
 
bool StartSqueezed
 
bool AlwaysSqueezeToGravity
 
bool DontSetInactive
 
bool hasfocusvisible
 The window visibly has focus.
 
int occupation
 Workspaces the window is in (bitmap)
 
ImageHiliteImage
 Titlebar hilite backround.
 
ImageLoliteImage
 Titlebar lolite backround.
 
WindowRegionwr
 WindowRegion containing this window.
 
struct TwmWindow::_savegeometry savegeometry
 Saved window geometry. "
 
struct VirtualScreenvs
 Where the window is currently mapped (may be NULL)
 
struct VirtualScreenparent_vs
 Where the window is parented. Always set.
 
struct VirtualScreensavevs
 Where the window would be.
 
bool nameChanged
 Has TwmWindow::name ever changed? Used only in session saving.
 
bool widthEverChangedByUser
 Has TwmWindow::attr width ever changed? Used only in sessions.
 
bool heightEverChangedByUser
 Has TwmWindow::attr height ever changed? Used only in sessions.
 

Detailed Description

Info and control for every X Window we take over.

As a window manager, our job is to... y'know. Manage windows. Every other window on the screen we wrap and control (as well as a few of our internal windows) gets one of these structs put around it to hold the various config and state info we track about it. They get put into various linked lists for each screen and workspace, and references get stashed in X Contexts so we can find the window that events happen on.

Much of this is initially setup in AddWindow() when we find out about and take over a window.

Definition at line 34 of file twm_window_struct.h.

Field Documentation

◆ AlwaysSqueezeToGravity

bool TwmWindow::AlwaysSqueezeToGravity
See also
ScreenInfo.AlwaysSqueezeToGravity

Definition at line 234 of file twm_window_struct.h.

Referenced by AddWindow().

◆ attr

XWindowAttributes TwmWindow::attr

Window attributes from XGetWindowAttributes()

Definition at line 150 of file twm_window_struct.h.

Referenced by AddWindow(), HandleUnmapNotify(), ResizeOccupyWindow(), and ResizeWorkSpaceManager().

◆ auto_lower

bool TwmWindow::auto_lower

Should we auto-lower this window ?

Definition at line 178 of file twm_window_struct.h.

Referenced by AddWindow(), HandleDestroyNotify(), and HandleLeaveNotify().

◆ auto_raise

bool TwmWindow::auto_raise

Should we auto-raise this window ?

Definition at line 177 of file twm_window_struct.h.

Referenced by AddWindow(), HandleDestroyNotify(), and HandleEnterNotify().

◆ AutoSqueeze

bool TwmWindow::AutoSqueeze
See also
ScreenInfo.AutoSqueeze

Definition at line 232 of file twm_window_struct.h.

Referenced by AddWindow(), HandleFocusIn(), and HandleFocusOut().

◆ border_tile

ColorPair TwmWindow::border_tile

ColorPair for non-focused window borders.

Definition at line 164 of file twm_window_struct.h.

Referenced by apply_window_name().

◆ borderC

ColorPair TwmWindow::borderC

ColorPair for focused window borders.

Definition at line 163 of file twm_window_struct.h.

Referenced by apply_window_name().

◆ class

XClassHint TwmWindow::class

◆ cmaps

Colormaps TwmWindow::cmaps

colormaps for this application

Definition at line 210 of file twm_window_struct.h.

Referenced by AddWindow(), and HandleDestroyNotify().

◆ DontSetInactive

bool TwmWindow::DontSetInactive
See also
ScreenInfo.DontSetInactive

Definition at line 235 of file twm_window_struct.h.

Referenced by AddWindow().

◆ forced

bool TwmWindow::forced

Has had an icon forced upon it.

Definition at line 179 of file twm_window_struct.h.

Referenced by HandlePropertyNotify().

◆ group

Window TwmWindow::group

Window group, from WM hints.

Definition at line 157 of file twm_window_struct.h.

Referenced by AddWindow(), CanChangeOccupation(), isGroupLeader(), isGroupLeaderOf(), munge_wmhints(), and SetupOccupation().

◆ hasfocusvisible

bool TwmWindow::hasfocusvisible

The window visibly has focus.

Definition at line 237 of file twm_window_struct.h.

◆ heightEverChangedByUser

bool TwmWindow::heightEverChangedByUser

Has TwmWindow::attr height ever changed? Used only in sessions.

Definition at line 274 of file twm_window_struct.h.

Referenced by AddWindow().

◆ highlight

bool TwmWindow::highlight

Should highlight this window.

Definition at line 181 of file twm_window_struct.h.

Referenced by AddWindow().

◆ hints

XSizeHints TwmWindow::hints

Window size hints.

From WM_NORMAL_HINTS property.

See also
GetWindowSizeHints()

Definition at line 153 of file twm_window_struct.h.

Referenced by AddWindow().

◆ icon

struct Icon* TwmWindow::icon

◆ icon_moved

bool TwmWindow::icon_moved

User explicitly moved the icon.

Definition at line 180 of file twm_window_struct.h.

◆ icon_name

char* TwmWindow::icon_name

Current icon name. Points into TwmWindow::names.

Definition at line 108 of file twm_window_struct.h.

Referenced by RedoIcon(), RedoIconName(), set_window_icon_name(), WMapRedrawName(), and WMgrHandleButtonEvent().

◆ icon_on

bool TwmWindow::icon_on

Is the icon visible.

Definition at line 174 of file twm_window_struct.h.

Referenced by AddWindow(), HandleMapNotify(), RedoIcon(), and RedoIconName().

◆ iconified

bool TwmWindow::iconified

Has the window ever been iconified?

Todo
This is almost write-only, and the one reader seems bogus in light of what it does. Investigate further and possibly remove.

Definition at line 171 of file twm_window_struct.h.

Referenced by AddWindow(), and isOnScreen().

◆ iconify_by_unmapping

bool TwmWindow::iconify_by_unmapping

Unmap window to iconify it.

Definition at line 183 of file twm_window_struct.h.

Referenced by AddWindow().

◆ iconmanagerlist

struct WList* TwmWindow::iconmanagerlist

◆ iconmgrp

struct IconMgr* TwmWindow::iconmgrp

Pointer to the icon manager structure, for windows that are icon managers.

Currently also set for some other window types to various things, but is only ever used for icon manager windows (isiconmgr = true).

Definition at line 199 of file twm_window_struct.h.

Referenced by AddWindow(), and PackIconManagers().

◆ iconslist

name_list* TwmWindow::iconslist

The current list of potential icons.

Definition at line 76 of file twm_window_struct.h.

Referenced by RedoIcon().

◆ isicon

bool TwmWindow::isicon

◆ isiconmgr

bool TwmWindow::isiconmgr

◆ isoccupy

bool TwmWindow::isoccupy

This is an Occupy window.

Definition at line 186 of file twm_window_struct.h.

Referenced by AddWindow().

◆ istransient

bool TwmWindow::istransient

This is a transient window.

Definition at line 188 of file twm_window_struct.h.

Referenced by AddNewOwl(), AddWindow(), CanChangeOccupation(), HandleMapRequest(), OtpAdd(), SetupOccupation(), and WMgrHandleButtonEvent().

◆ iswspmgr

bool TwmWindow::iswspmgr

◆ mapped

bool TwmWindow::mapped

◆ name

char* TwmWindow::name

◆ nameChanged

bool TwmWindow::nameChanged

Has TwmWindow::name ever changed? Used only in session saving.

Definition at line 270 of file twm_window_struct.h.

Referenced by AddWindow(), and apply_window_name().

◆ names

struct TwmWindow::_names TwmWindow::names

Various sources of window/icon names. "

These are the values from the various window properties we look at to get the results. The TwmWindow::name and TwmWindow::icon_name point to the currently active element in here. "

Referenced by AddWindow(), apply_window_name(), EwmhHandlePropertyNotify(), HandleDestroyNotify(), HandlePropertyNotify(), set_window_icon_name(), and set_window_name().

◆ next

struct TwmWindow* TwmWindow::next

◆ occupation

int TwmWindow::occupation

◆ old_bw

int TwmWindow::old_bw

Original window border width before we took it over and made our own bordering.

This comes from the XWindowAttributes we get from XGetWindowAttributes().

Definition at line 47 of file twm_window_struct.h.

Referenced by AddWindow(), HandleConfigureRequest(), and HandleUnmapNotify().

◆ OpaqueMove

bool TwmWindow::OpaqueMove

Move opaquely.

See also
ScreenInfo.DoOpaqueMove

Definition at line 229 of file twm_window_struct.h.

Referenced by AddWindow(), and WMgrHandleButtonEvent().

◆ OpaqueResize

bool TwmWindow::OpaqueResize

Resize opaquely.

See also
ScreenInfo.DoOpaqueResize

Definition at line 230 of file twm_window_struct.h.

Referenced by AddWindow().

◆ otp

OtpWinList* TwmWindow::otp

◆ parent_vs

struct VirtualScreen* TwmWindow::parent_vs

Where the window is parented. Always set.

Definition at line 263 of file twm_window_struct.h.

Referenced by AddWindow(), Occupy(), OtpCheckConsistencyVS(), SetupOccupation(), and synth_btnevent_for_moveresize().

◆ prev

struct TwmWindow* TwmWindow::prev

Previous TwmWindow on the Screen.

Definition at line 36 of file twm_window_struct.h.

Referenced by HandleDestroyNotify().

◆ protocols

unsigned long TwmWindow::protocols

Which protocols this window handles.

From WM_PROTOCOLS property via XGetWMProtocols()

Definition at line 209 of file twm_window_struct.h.

Referenced by HandleEnterNotify(), and HandleLeaveNotify().

◆ ring

struct TwmWindow::_ring TwmWindow::ring

◆ save_frame_height

unsigned int TwmWindow::save_frame_height

height of frame (saved from zoom)

Definition at line 204 of file twm_window_struct.h.

◆ save_frame_width

unsigned int TwmWindow::save_frame_width

width of frame (saved from zoom)

Definition at line 203 of file twm_window_struct.h.

◆ save_frame_x

int TwmWindow::save_frame_x

x position of frame (saved from zoom)

Definition at line 201 of file twm_window_struct.h.

◆ save_frame_y

int TwmWindow::save_frame_y

y position of frame (saved from zoom)

Definition at line 202 of file twm_window_struct.h.

◆ savegeometry

struct TwmWindow::_savegeometry TwmWindow::savegeometry

Saved window geometry. "

Used in f.savegeometry and f.restoregeometry. "

Referenced by AddWindow().

◆ savevs

struct VirtualScreen* TwmWindow::savevs

Where the window would be.

Used only by f.showbackground.

See also
ShowBackground()

Definition at line 267 of file twm_window_struct.h.

Referenced by AddWindow().

◆ squeeze_info

SqueezeInfo* TwmWindow::squeeze_info

Control info for title squeezing.

Definition at line 213 of file twm_window_struct.h.

Referenced by AddWindow(), and HandleDestroyNotify().

◆ squeeze_info_copied

bool TwmWindow::squeeze_info_copied

Should ->squeeze_info be free()'d?

Definition at line 214 of file twm_window_struct.h.

Referenced by AddWindow(), and HandleDestroyNotify().

◆ squeezed

bool TwmWindow::squeezed

Is the window squeezed ?

Definition at line 176 of file twm_window_struct.h.

Referenced by AddWindow(), EwmhSet_NET_WM_STATE(), HandleFocusIn(), HandleFocusOut(), and HandleMapRequest().

◆ stackmode

bool TwmWindow::stackmode

Honor stackmode requests.

See also
ScreenInfo.StackMode

Definition at line 182 of file twm_window_struct.h.

Referenced by AddWindow(), and HandleConfigureRequest().

◆ StartSqueezed

bool TwmWindow::StartSqueezed
See also
ScreenInfo.StartSqueezed

Definition at line 233 of file twm_window_struct.h.

Referenced by AddWindow(), ctwm_main(), and HandleMapRequest().

◆ title

ColorPair TwmWindow::title

ColorPair for various other titlebar bits.

Definition at line 165 of file twm_window_struct.h.

Referenced by apply_window_name(), and WMapAddWindowToWorkspace().

◆ titlehighlight

bool TwmWindow::titlehighlight

Should I highlight the title bar?

Definition at line 193 of file twm_window_struct.h.

Referenced by AddWindow().

◆ transientfor

Window TwmWindow::transientfor

What window it's transient for.

From XGetTransientForHint() and XM_TRANSIENT_FOR property.

Definition at line 191 of file twm_window_struct.h.

Referenced by AddWindow(), and SetupOccupation().

◆ UnmapByMovingFarAway

bool TwmWindow::UnmapByMovingFarAway
See also
ScreenInfo.UnmapByMovingFarAway

Definition at line 231 of file twm_window_struct.h.

Referenced by AddWindow(), and HandleMapRequest().

◆ vs

struct VirtualScreen* TwmWindow::vs

◆ w

Window TwmWindow::w

◆ widthEverChangedByUser

bool TwmWindow::widthEverChangedByUser

Has TwmWindow::attr width ever changed? Used only in sessions.

Definition at line 272 of file twm_window_struct.h.

Referenced by AddWindow().

◆ wmhints

XWMHints* TwmWindow::wmhints

◆ wr

WindowRegion* TwmWindow::wr

WindowRegion containing this window.

Todo
Write-only? Reap?

Definition at line 245 of file twm_window_struct.h.

◆ wShaped

bool TwmWindow::wShaped

This window is Shape'd.

Definition at line 206 of file twm_window_struct.h.

Referenced by HandleShapeNotify().

◆ zoomed

int TwmWindow::zoomed

ZOOM_NONE || function causing zoom.

Definition at line 205 of file twm_window_struct.h.

Referenced by AddWindow(), EwmhClientMessage_NET_WM_STATEchange(), and EwmhSet_NET_WM_STATE().


The documentation for this struct was generated from the following file: