CTWM
|
Info and control for every X Window we take over. More...
#include <twm_window_struct.h>
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 TwmWindow * | next |
Next TwmWindow on the Screen. | |
struct TwmWindow * | prev |
Previous TwmWindow on the Screen. | |
OtpWinList * | otp |
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 Icon * | icon |
The current icon. | |
name_list * | iconslist |
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. | |
char * | name |
Current window name. Points into TwmWindow::names. | |
char * | icon_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. | |
XWMHints * | wmhints |
Window manager hints. | |
Window | group |
Window group, from WM hints. | |
XClassHint | class |
Window class info. From XGetClassHint(). | |
struct WList * | iconmanagerlist |
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 IconMgr * | iconmgrp |
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 | |
TBWindow * | titlebuttons |
Button windows in the titlebar. | |
SqueezeInfo * | squeeze_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) | |
Image * | HiliteImage |
Titlebar hilite backround. | |
Image * | LoliteImage |
Titlebar lolite backround. | |
WindowRegion * | wr |
WindowRegion containing this window. | |
struct TwmWindow::_savegeometry | savegeometry |
Saved window geometry. " | |
struct VirtualScreen * | vs |
Where the window is currently mapped (may be NULL) | |
struct VirtualScreen * | parent_vs |
Where the window is parented. Always set. | |
struct VirtualScreen * | savevs |
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. | |
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.
bool TwmWindow::AlwaysSqueezeToGravity |
Definition at line 234 of file twm_window_struct.h.
Referenced by AddWindow().
XWindowAttributes TwmWindow::attr |
Window attributes from XGetWindowAttributes()
Definition at line 150 of file twm_window_struct.h.
Referenced by AddWindow(), HandleUnmapNotify(), ResizeOccupyWindow(), and ResizeWorkSpaceManager().
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().
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().
bool TwmWindow::AutoSqueeze |
Definition at line 232 of file twm_window_struct.h.
Referenced by AddWindow(), HandleFocusIn(), and HandleFocusOut().
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().
ColorPair TwmWindow::borderC |
ColorPair for focused window borders.
Definition at line 163 of file twm_window_struct.h.
Referenced by apply_window_name().
XClassHint TwmWindow::class |
Window class info. From XGetClassHint().
Definition at line 158 of file twm_window_struct.h.
Referenced by AddWindow(), apply_window_name(), ApplyPreferences(), HandleDestroyNotify(), HandleExpose(), HandleKeyPress(), HandleMapRequest(), RedoIcon(), RedoIconName(), SetupOccupation(), WMapAddWindowToWorkspace(), and WmgrRedoOccupation().
Colormaps TwmWindow::cmaps |
colormaps for this application
Definition at line 210 of file twm_window_struct.h.
Referenced by AddWindow(), and HandleDestroyNotify().
bool TwmWindow::DontSetInactive |
Definition at line 235 of file twm_window_struct.h.
Referenced by AddWindow().
bool TwmWindow::forced |
Has had an icon forced upon it.
Definition at line 179 of file twm_window_struct.h.
Referenced by HandlePropertyNotify().
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().
bool TwmWindow::hasfocusvisible |
The window visibly has focus.
Definition at line 237 of file twm_window_struct.h.
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().
bool TwmWindow::highlight |
Should highlight this window.
Definition at line 181 of file twm_window_struct.h.
Referenced by AddWindow().
XSizeHints TwmWindow::hints |
Window size hints.
From WM_NORMAL_HINTS property.
Definition at line 153 of file twm_window_struct.h.
Referenced by AddWindow().
The current icon.
Definition at line 75 of file twm_window_struct.h.
Referenced by EwmhHandle_NET_WM_ICONNotify(), f_showiconmgr_impl(), HandleButtonPress(), HandleButtonRelease(), HandleCirculateNotify(), HandleConfigureRequest(), HandleDestroyNotify(), HandleEnterNotify(), HandleExpose(), HandleKeyPress(), HandleLeaveNotify(), HandleMapNotify(), HandlePropertyNotify(), HandleUnmapNotify(), HideIconManager(), OtpAdd(), OtpChangePriority(), OtpCheckConsistencyVS(), OtpFreeIcon(), OtpLower(), OtpRaise(), OtpRaiseLower(), OtpReassignIcon(), OtpRecomputePrefs(), OtpRemove(), OtpSetPriority(), OtpSwitchPriority(), OtpTinyLower(), OtpTinyRaise(), OtpToggleSwitching(), RedoIcon(), RedoIconName(), ReparentWindow(), ReparentWindowAndIcon(), and RescueWindows().
bool TwmWindow::icon_moved |
User explicitly moved the icon.
Definition at line 180 of file twm_window_struct.h.
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().
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().
bool TwmWindow::iconified |
Has the window ever been iconified?
Definition at line 171 of file twm_window_struct.h.
Referenced by AddWindow(), and isOnScreen().
bool TwmWindow::iconify_by_unmapping |
Unmap window to iconify it.
Definition at line 183 of file twm_window_struct.h.
Referenced by AddWindow().
List of the icon managers the window is in.
Definition at line 161 of file twm_window_struct.h.
Referenced by EwmhSet_NET_CLIENT_LIST_STACKING(), HandleButtonPress(), HandleEnterNotify(), HandleExpose(), HandleKeyPress(), HandleLeaveNotify(), HandleMapRequest(), and RedoIconName().
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().
name_list* TwmWindow::iconslist |
The current list of potential icons.
Definition at line 76 of file twm_window_struct.h.
Referenced by RedoIcon().
bool TwmWindow::isicon |
Is the window an icon now ?
Definition at line 173 of file twm_window_struct.h.
Referenced by AddWindow(), f_showiconmgr_impl(), HandleClientMessage(), HandleMapNotify(), HandleMapRequest(), HandlePropertyNotify(), HandleUnmapNotify(), HideIconManager(), and RedoIconName().
bool TwmWindow::isiconmgr |
This is an icon manager window.
Definition at line 184 of file twm_window_struct.h.
Referenced by AddWindow(), CanChangeOccupation(), EwmhSet_NET_CLIENT_LIST_STACKING(), get_last_window(), HandleFocusChange(), HandleMapRequest(), SetupOccupation(), WMapSetupWindow(), and WMapWindowMayBeAdded().
bool TwmWindow::isoccupy |
This is an Occupy window.
Definition at line 186 of file twm_window_struct.h.
Referenced by AddWindow().
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().
bool TwmWindow::iswspmgr |
This is a workspace manager window.
Definition at line 185 of file twm_window_struct.h.
Referenced by AddWindow(), EwmhSet_NET_CLIENT_LIST_STACKING(), HandleButtonPress(), HandleKeyPress(), SetupOccupation(), WMapSetupWindow(), and WMapWindowMayBeAdded().
bool TwmWindow::mapped |
Is the window mapped ?
Definition at line 175 of file twm_window_struct.h.
Referenced by CanChangeOccupation(), ctwm_main(), EwmhClientMessage_NET_ACTIVE_WINDOW(), EwmhClientMessage_NET_WM_MOVERESIZE(), f_showiconmgr_impl(), HandleEnterNotify(), HandleLeaveNotify(), HandleMapNotify(), HandleMapRequest(), HandleUnmapNotify(), HideIconManager(), isOnScreen(), Occupy(), WMapAddWindowToWorkspace(), and WMgrHandleExposeEvent().
char* TwmWindow::name |
Current window name. Points into TwmWindow::names.
Definition at line 107 of file twm_window_struct.h.
Referenced by AddWindow(), apply_window_name(), ApplyPreferences(), HandleExpose(), HandleKeyPress(), HandleMapRequest(), OtpCheckConsistencyVS(), RedoIcon(), RedoIconName(), SaveYourselfPhase2CB(), set_window_icon_name(), set_window_name(), SetupOccupation(), WMapAddWindowToWorkspace(), and WmgrRedoOccupation().
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().
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 TwmWindow on the Screen.
Definition at line 35 of file twm_window_struct.h.
Referenced by HandleDestroyNotify(), HandleKeyPress(), OtpCheckConsistencyVS(), PackIconManagers(), and RescueWindows().
int TwmWindow::occupation |
Workspaces the window is in (bitmap)
Definition at line 239 of file twm_window_struct.h.
Referenced by AddToWorkSpace(), EwmhClientMessage_NET_WM_DESKTOP(), EwmhSet_NET_WM_DESKTOP_ws(), GetMaskFromResource(), HandleDestroyNotify(), MoveToNextWorkSpace(), MoveToPrevWorkSpace(), Occupy(), OtpCheckConsistencyVS(), RemoveFromWorkSpace(), SetupOccupation(), ToggleOccupation(), WMapWindowMayBeAdded(), WMgrHandleButtonEvent(), and WMgrRemoveFromCurrentWorkSpace().
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().
bool TwmWindow::OpaqueMove |
Move opaquely.
Definition at line 229 of file twm_window_struct.h.
Referenced by AddWindow(), and WMgrHandleButtonEvent().
bool TwmWindow::OpaqueResize |
Resize opaquely.
Definition at line 230 of file twm_window_struct.h.
Referenced by AddWindow().
OtpWinList* TwmWindow::otp |
OTP control info for stacking. Created in OtpAdd().
Definition at line 39 of file twm_window_struct.h.
Referenced by OtpAdd(), OtpChangePriority(), OtpCheckConsistencyVS(), OtpClearAflag(), OtpEffectiveDisplayPriority(), OtpEffectivePriority(), OtpFocusWindow(), OtpFocusWindowBE(), OtpForcePlacement(), OtpIsFocusDependent(), OtpLower(), OtpNextWinDown(), OtpNextWinUp(), OtpRaise(), OtpRaiseLower(), OtpRecomputePrefs(), OtpRemove(), OtpRestackWindow(), OtpSetAflag(), OtpSetAflagMask(), OtpSetPriority(), OtpStashAflagsFirstTime(), OtpSwitchPriority(), OtpTinyLower(), OtpTinyRaise(), OtpToggleSwitching(), OtpUnfocusWindow(), ReparentWindow(), and ReparentWindowAndIcon().
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().
Previous TwmWindow on the Screen.
Definition at line 36 of file twm_window_struct.h.
Referenced by HandleDestroyNotify().
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().
struct TwmWindow::_ring TwmWindow::ring |
Window ring connectivity. "
"
Referenced by AddWindow(), AddWindowToRing(), AddWindowToRingUnchecked(), HandleLeaveNotify(), UnlinkWindowFromRing(), and WarpAlongRing().
height of frame (saved from zoom)
Definition at line 204 of file twm_window_struct.h.
width of frame (saved from zoom)
Definition at line 203 of file twm_window_struct.h.
int TwmWindow::save_frame_x |
x position of frame (saved from zoom)
Definition at line 201 of file twm_window_struct.h.
int TwmWindow::save_frame_y |
y position of frame (saved from zoom)
Definition at line 202 of file twm_window_struct.h.
struct TwmWindow::_savegeometry TwmWindow::savegeometry |
struct VirtualScreen* TwmWindow::savevs |
Where the window would be.
Used only by f.showbackground.
Definition at line 267 of file twm_window_struct.h.
Referenced by AddWindow().
SqueezeInfo* TwmWindow::squeeze_info |
Control info for title squeezing.
Definition at line 213 of file twm_window_struct.h.
Referenced by AddWindow(), and HandleDestroyNotify().
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().
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().
bool TwmWindow::stackmode |
Honor stackmode requests.
Definition at line 182 of file twm_window_struct.h.
Referenced by AddWindow(), and HandleConfigureRequest().
bool TwmWindow::StartSqueezed |
Definition at line 233 of file twm_window_struct.h.
Referenced by AddWindow(), ctwm_main(), and HandleMapRequest().
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().
bool TwmWindow::titlehighlight |
Should I highlight the title bar?
Definition at line 193 of file twm_window_struct.h.
Referenced by AddWindow().
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().
bool TwmWindow::UnmapByMovingFarAway |
Definition at line 231 of file twm_window_struct.h.
Referenced by AddWindow(), and HandleMapRequest().
struct VirtualScreen* TwmWindow::vs |
Where the window is currently mapped (may be NULL)
Definition at line 261 of file twm_window_struct.h.
Referenced by AddWindow(), EwmhClientMessage_NET_WM_DESKTOP(), EwmhSet_NET_WM_DESKTOP(), HandleButtonRelease(), OtpCheckConsistencyVS(), RescueWindows(), SetupOccupation(), WMapDeIconify(), WMapIconify(), and WMapSetupWindow().
Window TwmWindow::w |
The actual X Window handle.
Definition at line 42 of file twm_window_struct.h.
Referenced by AddWindow(), CanChangeOccupation(), EwmhGet_NET_WM_STATE(), EwmhGetIcon(), EwmhGetOccupation(), EwmhGetProperties(), EwmhGetStrut(), EwmhHandlePropertyNotify(), EwmhSet_NET_CLIENT_LIST_STACKING(), EwmhSet_NET_FRAME_EXTENTS(), EwmhSet_NET_WM_DESKTOP_ws(), EwmhSet_NET_WM_STATE(), EwmhUnmapNotify(), f_showiconmgr_impl(), HandleButtonPress(), HandleDestroyNotify(), HandleEnterNotify(), HandleFocusChange(), HandleKeyPress(), HandleLeaveNotify(), HandleMapRequest(), HandlePropertyNotify(), isGroupLeader(), munge_wmhints(), set_window_icon_name(), set_window_name(), SetPropsIfCaptiveCtwm(), SetupOccupation(), and synth_btnevent_for_moveresize().
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().
XWMHints* TwmWindow::wmhints |
Window manager hints.
From WM_HINTS property, filled in via XGetWMHints().
Definition at line 156 of file twm_window_struct.h.
Referenced by AddWindow(), HandleButtonPress(), HandleDestroyNotify(), HandleEnterNotify(), HandleFocusIn(), HandleLeaveNotify(), HandleMapRequest(), HandlePropertyNotify(), HandleUnmapNotify(), and SetupOccupation().
WindowRegion* TwmWindow::wr |
WindowRegion containing this window.
Definition at line 245 of file twm_window_struct.h.
bool TwmWindow::wShaped |
This window is Shape'd.
Definition at line 206 of file twm_window_struct.h.
Referenced by HandleShapeNotify().
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().