CTWM
Loading...
Searching...
No Matches
/usr/src/RPM/BUILD/ctwm-4.1.0/ctwm_main.c File Reference
#include "ctwm.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <locale.h>
#include <fcntl.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include "ctwm_atoms.h"
#include "ctwm_main.h"
#include "ctwm_takeover.h"
#include "clargs.h"
#include "add_window.h"
#include "gc.h"
#include "parse.h"
#include "version.h"
#include "colormaps.h"
#include "events.h"
#include "util.h"
#include "mask_screen.h"
#include "animate.h"
#include "screen.h"
#include "icons.h"
#include "iconmgr.h"
#include "list.h"
#include "occupation.h"
#include "otp.h"
#include "cursor.h"
#include "r_area.h"
#include "r_area_list.h"
#include "r_layout.h"
#include "signals.h"
#include "vscreen.h"
#include "win_decorations_init.h"
#include "win_ops.h"
#include "win_regions.h"
#include "win_utils.h"
#include "workspace_manager.h"
#include "gram.tab.h"
Include dependency graph for ctwm_main.c:

Go to the source code of this file.

Macros

#define SETFB(fld)
#define SETDEF(fld, num)
#define DEFCURSOR(name, val)
#define Scr   StupidProgrammer
#define DEFAULT_NICE_FONT   "-*-helvetica-bold-r-normal-*-*-120-*"
#define DEFAULT_FAST_FONT   "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-*"
#define SETFONT(fld, var)

Functions

ScreenInfoInitScreenInfo (int scrnum, Window croot, int crootx, int crooty, unsigned int crootw, unsigned int crooth)
 Initialize ScreenInfo for a Screen.
static bool MappedNotOverride (Window w)
 Return true if a window is not set to override_redirect ("Hey!
int ctwm_main (int argc, char *argv[])
 Start up ctwm.

Variables

XtAppContext appContext
Display * dpy
Window ResizeWindow
Atom XCTWMAtom [NUM_CTWM_XATOMS]
 Our various common atoms.
int NumScreens
 How many Screens are on our display.
bool HasShape
int ShapeEventBase
int ShapeErrorBase
ScreenInfo ** ScreenList
 List of ScreenInfo structs for each Screen.
ScreenInfoScr = NULL
 The ScreenInfo struct for the current Screen.
int PreviousScreen
static bool cfgerrs = false
 Whether there were config parsing errors.
Cursor UpperLeftCursor
Cursor TopRightCursor
Cursor TopLeftCursor
Cursor BottomRightCursor
Cursor BottomLeftCursor
Cursor LeftCursor
Cursor RightCursor
Cursor TopCursor
Cursor BottomCursor
Cursor RightButt
Cursor MiddleButt
Cursor LeftButt
XContext TwmContext
XContext MenuContext
XContext ScreenContext
XContext ColormapContext
XClassHint NoClass
XGCValues Gcv
char * Home
int HomeLen
bool HandlingEvents = false
Window JunkRoot
Window JunkChild
int JunkX
int JunkY
unsigned int JunkWidth
unsigned int JunkHeight
unsigned int JunkBW
unsigned int JunkDepth
unsigned int JunkMask
char * ProgramName
size_t ProgramNameLen
int Argc
char ** Argv
bool RestartPreviousState = true
bool ctwm_test = false
 Magic flag for tests. Nothing else should touch this!
int(* ctwm_test_postparse )(void) = NULL
 Magic callback for tests.

Macro Definition Documentation

◆ DEFAULT_FAST_FONT

#define DEFAULT_FAST_FONT   "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-*"

◆ DEFAULT_NICE_FONT

#define DEFAULT_NICE_FONT   "-*-helvetica-bold-r-normal-*-*-120-*"

◆ DEFCURSOR

#define DEFCURSOR ( name,
val )
Value:
if(!Scr->name) NewFontCursor(&Scr->name, val)
#define Scr
void NewFontCursor(Cursor *cp, const char *str)
Definition cursor.c:117

Referenced by ctwm_main().

◆ Scr

#define Scr   StupidProgrammer

Referenced by _tryToPack(), AddFuncButton(), AddFuncKey(), AddIconManager(), AddIconRegion(), AddNewOwl(), AddStartResize(), AddToCaptiveList(), AddToClientsList(), AddToMenu(), AddWindow(), addWindowBox(), AddWindowRegion(), AddWindowToRing(), AddWorkSpace(), AdoptWindow(), AllocateIconManager(), AllocateOtherIconManagers(), apply_window_name(), assign_var_savecolor(), AutoPopupMaybe(), AutoSqueeze(), belongs_to_twm_window(), BumpWindowColormap(), CanChangeOccupation(), ChangeOccupation(), ComputeCommonTitleOffsets(), ComputeWindowTitleOffsets(), ConfigureCaptiveRootWindow(), ConfigureWorkSpaceManager(), ConstrainByBorders1(), ConstrainSize(), Create2DIconManagerIcon(), Create3DBarImage(), Create3DBoxImage(), Create3DCrossImage(), Create3DDotImage(), Create3DIconifyImage(), Create3DIconManagerIcon(), Create3DMenuAnimation(), Create3DMenuIcon(), Create3DMenuImage(), Create3DResizeAnimation(), Create3DResizeImage(), Create3DSunkenResizeImage(), Create3DVertBarImage(), Create3DZoomAnimation(), Create3DZoomImage(), CreateDotPixmap(), CreateGCs(), CreateHighlightWindows(), CreateIconManagers(), CreateIconWindow(), CreateLowlightWindows(), CreateMenuIcon(), CreateMenuPixmap(), CreateOccupyWindow(), CreateQuestionPixmap(), CreateResizePixmap(), CreateTitleButton(), createWindowBoxes(), CreateWindowRegions(), CreateWindowTitlebarButtons(), CreateWorkSpaceManager(), CreateWorkSpaceManagerWindow(), CreateXLogoPixmap(), ctwm_main(), defer_cursor(), DeferExecution(), DeIconify(), DeleteHighlightWindows(), DestroyMenu(), DispatchEvent(), DispatchEvent2(), DisplayPosition(), DisplaySize(), do_auto_clamp(), do_color_keyword(), do_colorlist_keyword(), do_key_menu(), do_menu(), do_number_keyword(), do_single_keyword(), do_string_keyword(), do_string_string_keyword(), DoResize(), DoShutdown(), Draw3DBorder(), Draw3DCorner(), draw_info_window(), DrawIconManagerBorder(), DrawIconManagerIconName(), EF_main(), EndResize(), EwmhAddClientWindow(), EwmhClientMessage(), EwmhClientMessage_NET_ACTIVE_WINDOW(), EwmhClientMessage_NET_WM_DESKTOP(), EwmhDeleteClientWindow(), EwmhGetIcon(), EwmhGetOccupation(), EwmhGetStrut(), EwmhHandle_NET_WM_ICONNotify(), EwmhRecalculateStrut(), EwmhRemoveStrut(), EwmhSet_NET_ACTIVE_WINDOW(), EwmhSet_NET_CLIENT_LIST_STACKING(), EwmhSet_NET_SHOWING_DESKTOP(), EwmhSet_NET_WM_DESKTOP_ws(), EwmhSet_NET_WORKAREA(), Execute(), ExpandPixmapPath(), f_altcontext_impl(), f_altkeymap_impl(), f_autolower_impl(), f_autoraise_impl(), f_circledown_impl(), f_circleup_impl(), f_delete_impl(), f_deleteordestroy_impl(), f_destroy_impl(), f_downworkspace_impl(), f_exec_impl(), f_focus_impl(), f_gotoworkspace_impl(), f_hideworkspacemgr_impl(), f_hypermove_impl(), f_leftworkspace_impl(), f_menu_impl(), f_moveresize_impl(), f_movetitlebar_impl(), f_movetonextworkspace_impl(), f_movetonextworkspaceandfollow_impl(), f_movetoprevworkspace_impl(), f_movetoprevworkspaceandfollow_impl(), f_nextworkspace_impl(), f_popup_impl(), f_prevworkspace_impl(), f_raiseicons_impl(), f_refresh_impl(), f_resize_impl(), f_rightworkspace_impl(), f_setbuttonsstate_impl(), f_setmapstate_impl(), f_showbackground_impl(), f_showiconmgr_impl(), f_showworkspacemgr_impl(), f_sorticonmgr_impl(), f_togglestate_impl(), f_toggleworkspacemgr_impl(), f_upworkspace_impl(), f_vanish_impl(), f_warphere_impl(), f_warpto_impl(), f_warptoiconmgr_impl(), f_warptoscreen_impl(), f_winrefresh_impl(), f_winwarp_impl(), FetchWmColormapWindows(), fillwindow(), FindBitmap(), FindConstraint(), FindIconEntry(), FindMenuRoot(), findWindowBox(), fittocontent(), FixRootEvent(), FocusOnRoot(), fullzoom(), get_last_window(), GetCaptiveCTWMUnderPointer(), GetColor(), GetColorFromList(), GetCurrentWorkSpaceName(), GetFont(), GetIconOffset(), GetImage(), GetMaskFromResource(), GetPropertyFromMask(), GetRoot(), GetShadeColors(), GetWindowSizeHints(), GetWMPropertyString(), GetWorkspace(), GotoDownWorkSpace(), GotoLeftWorkSpace(), GotoNextWorkSpace(), GotoPrevWorkSpace(), GotoRightWorkSpace(), GotoUpWorkSpace(), GotoWorkSpace(), GotoWorkSpaceByNumber(), GrabButtons(), GrabKeys(), HandleButtonPress(), HandleButtonRelease(), HandleCirculateNotify(), HandleClientMessage(), HandleColormapNotify(), HandleConfigureRequest(), HandleDestroyNotify(), HandleEnterNotify(), HandleEvents(), HandleExpose(), HandleFocusIn(), HandleFocusOut(), HandleKeyPress(), HandleKeyRelease(), HandleLeaveNotify(), HandleMapNotify(), HandleMapRequest(), HandleMotionNotify(), HandlePropertyNotify(), HideIconManager(), HideMenu(), Iconify(), IconUp(), Identify(), InitTitlebarButtons(), InitVirtualScreens(), InsertInIconManager(), InsertOwl(), InsertOwlAbove(), InsertRGBColormap(), InstallColormaps(), InstallRootColormap(), isOnScreen(), isSmallTransientOf(), jump(), LoadBitmapImage(), LoadJpegImage(), LoadTwmrc(), LoadXpmImage(), LoadXwdImage(), LocateStandardColormaps(), LookupIconNameOrClass(), m4_defs(), MakeMenu(), MakeMenus(), MakeStringCursor(), MakeWorkspacesMenu(), MaskScreen(), MenuDoResize(), MenuEndResize(), MenuStartResize(), mk_blackgray_pixmap(), MoveIconManager(), MoveMappedIconManager(), MoveMenu(), MoveOutline(), MoveResizeSizeWindow(), MoveToNextWorkSpace(), MoveToPrevWorkSpace(), movewindow(), munge_wmhints(), mwm_has_border(), mwm_sets_title(), NeedToDefer(), NewBitmapCursor(), NewMenuRoot(), Occupy(), OccupyAll(), OccupyHandleButtonEvent(), OpaqueResizeSize(), OtpAdd(), OtpBottomWin(), OtpCheckConsistency(), OtpCheckConsistencyVS(), OtpFocusWindow(), OtpFocusWindowBE(), OtpRecomputePrefs(), OtpTopWin(), OtpUnfocusWindow(), OwlEffectivePriority(), OwlRightBelow(), PackIconManager(), PackIconManagers(), packwindow(), Paint3DEntry(), PaintAllDecoration(), PaintBorders(), PaintEntry(), PaintIcon(), PaintMenu(), PaintNormalEntry(), PaintOccupyWindow(), PaintTitle(), PaintTitleButton(), PaintTitleButtons(), PaintWorkSpaceManager(), PaintWorkSpaceManagerBorder(), PaintWsButton(), PlaceIcon(), PlaceWindowInRegion(), PopUpMenu(), proc_layout_override(), put_pixel_on_root(), RedirectToCaptive(), RedoIcon(), RedoIconName(), ReGrab(), ReMapOne(), ReMapTransients(), RemoveFromCaptiveList(), RemoveOwl(), RemoveRGBColormap(), RemoveWindowFromRegion(), RescueWindows(), resizeFromCenter(), ResizeOccupyWindow(), ResizeWorkSpaceManager(), RestoreForShutdown(), RestoreWinConfig(), set_mask_ignore(), SetBorderCursor(), SetFocus(), SetFocusVisualAttributes(), SetFrameShape(), SetupFrame(), SetupOccupation(), ShowBackground(), ShowIconifiedIcon(), SortIconManager(), Squeeze(), StartResize(), TryToGrid(), TryToMoveTransientsOfTo(), TryToPack(), TryToPush_be(), UninstallRootColormap(), UnlinkWindowFromRing(), UnmapTransients(), UnmaskScreen(), UpdateMenu(), Vanish(), WarpAlongRing(), WarpCursorToDefaultEntry(), WarpToScreen(), WarpToWindow(), wmap_mapwin_backend(), WMapAddWindow(), WMapAddWindowToWorkspace(), WMapCreateCurrentBackGround(), WMapCreateDefaultBackGround(), WMapIconify(), WMapRaiseLower(), WMapRedrawName(), WMapRedrawWindow(), WMapRemoveWindow(), WMapRemoveWindowFromWorkspace(), WMapRestack(), WMapSetupWindow(), WMapUpdateIconName(), WMapWindowMayBeAdded(), WMgrAddToCurrentWorkSpaceAndWarp(), WMgrHandleButtonEvent(), WMgrHandleExposeEvent(), WMgrHandleKeyPressEvent(), WMgrHandleKeyReleaseEvent(), WmgrRedoOccupation(), WMgrSetButtonsState(), WMgrSetMapState(), WriteWinConfigEntry(), and Zoom().

◆ SETDEF

#define SETDEF ( fld,
num )
Value:
if(Scr->fld == -100) { Scr->fld = num; }

Referenced by ctwm_main().

◆ SETFB

#define SETFB ( fld)
Value:
Scr->fld.fore = Scr->Black; Scr->fld.back = Scr->White;

Referenced by ctwm_main().

◆ SETFONT

#define SETFONT ( fld,
var )
Value:
(scr->fld##Font.basename = DEFAULT_##var##_FONT)

Referenced by InitScreenInfo().

Function Documentation

◆ ctwm_main()

int ctwm_main ( int argc,
char * argv[] )

Start up ctwm.

This is effectively main(), just wrapped for various unimportant reasons.

Definition at line 170 of file ctwm_main.c.

References AddToCaptiveList(), AllocateIconManager(), AllocateOtherIconManagers(), appContext, Argc, Argv, assign_var_savecolor(), BottomCursor, BottomLeftCursor, BottomRightCursor, cfgerrs, chk_keytable_order(), CLarg, clargs_check(), clargs_parse(), ColormapContext, ConfigureWorkSpaceManager(), ConnectToSessionManager(), CreateColormapWindow(), CreateFonts(), CreateGCs(), CreateIconManagers(), CreateOccupyWindow(), createWindowBoxes(), CreateWindowRegions(), CreateWorkSpaceManager(), ctwm_test, ctwm_test_postparse, DEFCURSOR, dpy, EwmhInit(), EwmhInitScreenLate(), TwmWindow::frame, GetColor(), GetShadeColors(), HandleEvents(), HandlingEvents, HasShape, Home, HomeLen, InitEvents(), InitScreenInfo(), InitTitlebarButtons(), InitVirtualScreens(), InitWorkSpaceManagerContext(), InstallColormaps(), IRA_UNDEF, IRJ_UNDEF, LeftButt, LeftCursor, LoadTwmrc(), LocateStandardColormaps(), MakeMenus(), MakeWorkspacesMenu(), TwmWindow::mapped, MappedNotOverride(), MaskScreen(), MenuContext, MiddleButt, NewFontCursor(), VirtualScreen::next, NoClass, NoName, NumScreens, play_startup_sound(), PreviousScreen, ProgramName, ProgramNameLen, RAreaListNew(), RAreaNewStatic(), ReadWinConfigFile(), RestartPreviousState, RightButt, RightCursor, RLayoutCopyCropped(), RLayoutGetAreaIndex(), RLayoutNew(), RLayoutNumMonitors(), RLayoutPrint(), Scr, ScreenContext, ScreenList, SETDEF, SETFB, SetFocus(), SetMapStateProp(), setup_signal_handlers(), ShapeErrorBase, ShapeEventBase, SimulateMapRequest(), SIZE_VINDENT, sound_init(), sound_load_list(), Squeeze(), StartAnimation(), TwmWindow::StartSqueezed, takeover_screen(), TJ_UNDEF, TopCursor, TopLeftCursor, TopRightCursor, WorkSpaceWindow::twm_win, TwmContext, UnmaskScreen(), UpperLeftCursor, WorkSpaceWindow::w, VirtualScreen::wsw, RArea::x, XCTWMAtom, XrandrNewLayout(), and RArea::y.

Referenced by main().

◆ InitScreenInfo()

ScreenInfo * InitScreenInfo ( int scrnum,
Window croot,
int crootx,
int crooty,
unsigned int crootw,
unsigned int crooth )

Initialize ScreenInfo for a Screen.

This allocates the struct, assigns in the info we pass it about the screen and dimensions, and then puts in our various default/fallback/sentinel/etc values to prepare it for later use.

It is intentional that this doesn't do any of the initialization that involves calling out to X functions; it operates as a pure function. This makes it easier to use it to fake up a ScreenInfo for something that isn't actually an X Screen, for testing etc.

Parameters
scrnumThe Screen number (e.g, :0.0 -> 0)
crootThe X Window for the Screen's root window
crootxRoot X coordinate
crootyRoot Y coordinate
crootwRoot width
croothRoot height
Returns
Allocated and populated ScreenInfo

Definition at line 1112 of file ctwm_main.c.

References ScreenInfo::AlwaysSqueezeToGravity, ScreenInfo::AutoFocusToTransients, ScreenInfo::AutoOccupy, ScreenInfo::AutoRaiseIcons, ScreenInfo::BackingStore, MyFont::basename, ScreenInfo::BeNiceToColormap, ScreenInfo::_TBInfo::border, ScreenInfo::BorderBottom, ScreenInfo::BorderCursors, ScreenInfo::BorderLeft, ScreenInfo::BorderRight, ScreenInfo::BorderShadowDepth, ScreenInfo::BorderTop, ScreenInfo::BorderWidth, ScreenInfo::ButtonIndent, WorkSpaceMgr::buttonStyle, BW, ScreenInfo::CaseSensitive, ScreenInfo::CenterFeedbackWindow, ScreenInfo::ClearShadowContrast, ScreenInfo::ClickToFocus, ScreenInfo::ClientBorderWidth, ScreenInfo::d_depth, ScreenInfo::DarkShadowContrast, ScreenInfo::DecorateTransients, ScreenInfo::DontMoveOff, ScreenInfo::DontPaintRootWindow, ScreenInfo::DontToggleWorkspaceManagerState, ScreenInfo::DontWarpCursorInWMap, ScreenInfo::DoOpaqueMove, ScreenInfo::DoOpaqueResize, ScreenInfo::DoZoom, ScreenInfo::FirstTime, ScreenInfo::FocusRoot, ScreenInfo::ForceFocus, ScreenInfo::ForceIcon, ScreenInfo::FramePadding, ScreenInfo::HaveFonts, ScreenInfo::Highlight, OccupyWindow::hspace, WorkSpaceMgr::hspace, OccupyWindow::icon_name, WorkSpaceMgr::icon_name, ScreenInfo::IconBorderWidth, ICONIFY_NORMAL, ScreenInfo::IconifyByUnmapping, ScreenInfo::IconifyStyle, ScreenInfo::IconJustification, ScreenInfo::IconManagerDontShow, ScreenInfo::IconManagerFocus, ScreenInfo::IconManagerShadowDepth, ScreenInfo::IconRegionAlignement, ScreenInfo::IconRegionJustification, ScreenInfo::IgnoreCaseInMenuSelection, ScreenInfo::IgnoreModifier, WorkSpaceMgr::initialstate, ScreenInfo::InterpolateMenuColors, IRA_CENTER, IRJ_CENTER, ScreenInfo::MaxIconTitleWidth, ScreenInfo::MaxWindowHeight, ScreenInfo::MaxWindowWidth, ScreenInfo::MenuShadowDepth, ScreenInfo::mm_h, ScreenInfo::mm_w, ScreenInfo::Monochrome, ScreenInfo::MoveDelta, ScreenInfo::MoveOffResistance, ScreenInfo::MovePackResistance, OccupyWindow::name, WorkSpaceMgr::name, ScreenInfo::NameDecorations, ScreenInfo::NoDefaults, ScreenInfo::NoGrabServer, ScreenInfo::NoIconManagers, ScreenInfo::NoIconTitlebar, ScreenInfo::NoRaiseDeicon, ScreenInfo::NoRaiseMove, ScreenInfo::NoRaiseResize, ScreenInfo::NoTitlebar, ScreenInfo::NoWarpToMenuTitle, ScreenInfo::NumAutoLowers, ScreenInfo::NumAutoRaises, WorkSpaceMgr::occupyWindow, ScreenInfo::OpaqueMove, ScreenInfo::OpaqueMoveThreshold, ScreenInfo::OpaqueResize, ScreenInfo::OpaqueResizeThreshold, ScreenInfo::OpenWindowTimeout, OtpScrInitData(), ScreenInfo::PackNewWindows, ScreenInfo::PixmapDirectory, PPOS_OFF, ScreenInfo::RaiseOnClick, ScreenInfo::RaiseOnClickButton, ScreenInfo::RaiseOnWarp, ScreenInfo::RaiseWhenAutoUnSqueeze, ScreenInfo::RandomDisplacementX, ScreenInfo::RandomDisplacementY, ScreenInfo::RandomPlacement, ScreenInfo::ReallyMoveInWorkspaceManager, ScreenInfo::RealRoot, ScreenInfo::ReverseCurrentWorkspace, ScreenInfo::Root, ScreenInfo::rooth, ScreenInfo::rootw, ScreenInfo::rootx, ScreenInfo::rooty, RP_ALL, ScreenInfo::SaveUnder, ScreenInfo::SaveWorkspaceFocus, ScreenInfo::screen, SETFONT, ScreenInfo::Shadow, ScreenInfo::ShortAllWindowsMenus, ScreenInfo::ShowIconManager, ScreenInfo::ShowWinWhenMovingInWmgr, ScreenInfo::ShowWorkspaceManager, ScreenInfo::ShrinkIconTitles, ScreenInfo::SizeStringOffset, ScreenInfo::SloppyFocus, ScreenInfo::SortIconMgr, ScreenInfo::SqueezeTitle, ScreenInfo::StackMode, ScreenInfo::StayUpMenus, STYLE_NORMAL, ScreenInfo::SunkFocusWindowTitle, ScreenInfo::TBInfo, ScreenInfo::ThreeDBorderWidth, ScreenInfo::TitleButtonShadowDepth, ScreenInfo::TitleFocus, ScreenInfo::TitleHighlight, ScreenInfo::TitleJustification, ScreenInfo::TitlePadding, ScreenInfo::TitleShadowDepth, TJ_CENTER, TJ_LEFT, ScreenInfo::TransientHasOccupation, ScreenInfo::TransientOnTop, ScreenInfo::use3Dborders, ScreenInfo::use3Diconmanagers, ScreenInfo::use3Dmenus, ScreenInfo::use3Dtitles, ScreenInfo::use3Dwmap, ScreenInfo::UsePPosition, ScreenInfo::UseSunkTitlePixmap, OccupyWindow::vspace, WorkSpaceMgr::vspace, ScreenInfo::WarpCursor, ScreenInfo::WarpRingAnyWhere, ScreenInfo::WarpToDefaultMenuEntry, ScreenInfo::WarpUnmapped, WorkSpaceMgr::windowFont, ScreenInfo::WindowRingAll, ScreenInfo::WMgrButtonShadowDepth, ScreenInfo::WMgrHorizButtonIndent, ScreenInfo::WMgrVertButtonIndent, WMS_map, ScreenInfo::workSpaceMgr, ScreenInfo::XineramaRoot, ScreenInfo::XMoveGrid, ScreenInfo::YMoveGrid, and ScreenInfo::ZoomCount.

Referenced by ctwm_main().

◆ MappedNotOverride()

bool MappedNotOverride ( Window w)
static

Return true if a window is not set to override_redirect ("Hey!

WM! Leave those wins alone!"), and isn't unmapped. Used during startup to fake mapping for wins that should be up.

Definition at line 1404 of file ctwm_main.c.

References dpy.

Referenced by ctwm_main().

Variable Documentation

◆ appContext

XtAppContext appContext

Definition at line 83 of file ctwm_main.c.

Referenced by ConnectToSessionManager(), and ctwm_main().

◆ Argc

int Argc

Definition at line 148 of file ctwm_main.c.

Referenced by ctwm_main(), and SaveYourselfPhase2CB().

◆ Argv

char** Argv

Definition at line 149 of file ctwm_main.c.

Referenced by ctwm_main(), DoRestart(), and SaveYourselfPhase2CB().

◆ BottomCursor

Cursor BottomCursor

Definition at line 113 of file ctwm_main.c.

◆ BottomLeftCursor

Cursor BottomLeftCursor

Definition at line 109 of file ctwm_main.c.

◆ BottomRightCursor

Cursor BottomRightCursor

Definition at line 108 of file ctwm_main.c.

◆ cfgerrs

bool cfgerrs = false
static

Whether there were config parsing errors.

Definition at line 95 of file ctwm_main.c.

Referenced by ctwm_main().

◆ ColormapContext

◆ ctwm_test

bool ctwm_test = false

Magic flag for tests. Nothing else should touch this!

Definition at line 155 of file ctwm_main.c.

Referenced by ctwm_main().

◆ ctwm_test_postparse

int(* ctwm_test_postparse) (void) ( void ) = NULL

Magic callback for tests.

Special magic for use in tests.

This will trigger right after config file parsing if it's set, and then exit. Nothing else should ever touch this!

Definition at line 160 of file ctwm_main.c.

Referenced by ctwm_main().

◆ dpy

Display* dpy

Definition at line 84 of file ctwm_main.c.

Referenced by AddFuncKey(), AddIconManager(), AddStartResize(), AddToCaptiveList(), AddToMenu(), AddWindow(), AdoptWindow(), Animate(), AnimateButton(), AnimateHighlight(), AnimateIcons(), AnimateRoot(), apply_window_name(), assign_var_savecolor(), AutoLowerWindow(), AutoRaiseWindow(), CaptiveCtwmRootWindow(), ChangeOccupation(), ChangeSize(), ConfigureCaptiveRootWindow(), ConfigureWorkSpaceManager(), ConstrainByBorders(), ConstrainedToWinBox(), Create2DIconManagerIcon(), Create3DBarImage(), Create3DBoxImage(), Create3DCrossImage(), Create3DDotImage(), Create3DIconifyImage(), Create3DIconManagerIcon(), Create3DMenuAnimation(), Create3DMenuIcon(), Create3DMenuImage(), Create3DResizeAnimation(), Create3DResizeImage(), Create3DSunkenResizeImage(), Create3DVertBarImage(), Create3DZoomAnimation(), Create3DZoomImage(), CreateColormapWindow(), CreateDotPixmap(), CreateGCs(), CreateHighlightWindows(), CreateIconManagers(), CreateIconWindow(), CreateLowlightWindows(), CreateMenuIcon(), CreateOccupyWindow(), CreateQuestionPixmap(), CreateResizePixmap(), CreateTwmColormap(), createWindowBoxes(), CreateWindowTitlebarButtons(), CreateWorkSpaceManager(), CreateWorkSpaceManagerWindow(), CreateXLogoPixmap(), ctwm_main(), DeferExecution(), DeIconify(), DeleteHighlightWindows(), DeleteIcon(), DestroyMenu(), DisplayPosition(), DisplaySize(), DisplayWinUnchecked(), do_auto_clamp(), do_key_menu(), do_menu(), DontRedirect(), DoResize(), DoRestart(), DoShutdown(), Draw3DBorder(), Draw3DCorner(), draw_info_window(), DrawIconManagerBorder(), DrawIconManagerIconName(), EF_main(), EndResize(), EwmhAddClientWindow(), EwmhClientMessage(), EwmhClientMessage_NET_WM_STATE(), EwmhDeleteClientWindow(), EwmhGetIcon(), EwmhGetWindowProperties(), EwmhGetWindowProperty(), EwmhHandle_NET_WM_ICONNotify(), EwmhInitAtoms(), EwmhInitScreenEarly(), EwmhInitScreenLate(), EwmhReplaceWM(), EwmhSet_NET_ACTIVE_WINDOW(), EwmhSet_NET_CLIENT_LIST_STACKING(), EwmhSet_NET_FRAME_EXTENTS(), EwmhSet_NET_SHOWING_DESKTOP(), EwmhSet_NET_WM_DESKTOP_ws(), EwmhSet_NET_WM_STATE(), EwmhSet_NET_WORKAREA(), EwmhTerminateScreen(), EwmhUnmapNotify(), Execute(), ExpandIconTitle(), ExtractIcon(), f_altcontext_impl(), f_altkeymap_impl(), f_beep_impl(), f_delete_impl(), f_deleteordestroy_impl(), f_destroy_impl(), f_exec_impl(), f_fill_impl(), f_hypermove_impl(), f_moveresize_impl(), f_movetitlebar_impl(), f_pack_impl(), f_pin_impl(), f_refresh_impl(), f_resize_impl(), f_saveyourself_impl(), f_showiconmgr_impl(), f_sorticonmgr_impl(), f_warpring_impl(), f_warpto_impl(), f_warptoiconmgr_impl(), f_winrefresh_impl(), FadeWindow(), FetchWmColormapWindows(), FetchWmProtocols(), FindBitmap(), FindScreenInfo(), flush_expose(), free_cwins(), FreeImage(), fullzoom(), GenerateTimestamp(), GetCaptiveCTWMUnderPointer(), GetCaptivesList(), GetClientID(), GetColor(), GetFont(), GetImage(), GetMWMHints(), GetShadeColors(), GetTwmScreen(), GetTwmWindow(), GetWindowConfig(), GetWindowRole(), GetWindowSizeHints(), GetWMPropertyString(), GetWMState(), GotoWorkSpace(), HandleButtonPress(), HandleButtonRelease(), HandleClientMessage(), HandleColormapNotify(), HandleConfigureRequest(), HandleCreateNotify(), HandleDestroyNotify(), HandleEnterNotify(), HandleEvents(), HandleExpose(), HandleKeyPress(), HandleLeaveNotify(), HandleMapNotify(), HandleMapRequest(), HandleMotionNotify(), HandlePropertyNotify(), HandleShapeNotify(), HandleUnmapNotify(), HandleVisibilityNotify(), HideIconManager(), HideMenu(), Iconify(), IconUp(), Identify(), InitVirtualScreens(), InsertOwlAbove(), InstallColormaps(), jump(), JumpIconManager(), LastFocusEvent(), LoadBitmapImage(), LoadJpegImage(), LoadXpmImage(), LoadXwdImage(), LocateStandardColormaps(), MakeMenu(), MakeStringCursor(), MappedNotOverride(), mask_out_event(), mask_out_event_mask(), MaskScreen(), MenuDoResize(), MenuEndResize(), MenuStartResize(), mk_blackgray_pixmap(), MosaicFade(), MoveIconManager(), MoveMappedIconManager(), MoveMenu(), MoveOutline(), MoveResizeSizeWindow(), movewindow(), NewBitmapCursor(), NewFontCursor(), Occupy(), OccupyHandleButtonEvent(), OtpCheckConsistencyVS(), OtpCirculateSubwindows(), OwlGetStashedAflags(), OwlStashAflags(), PackIconManager(), packwindow(), Paint3DEntry(), PaintIcon(), PaintMenu(), PaintNormalEntry(), PaintTitle(), PaintTitleButton(), PaintWsButton(), PopDownMenu(), PopUpMenu(), put_pixel_on_root(), RedirectToCaptive(), RedoIcon(), RedoIconName(), ReGrab(), ReMapOne(), RemoveFromCaptiveList(), RemoveIconManager(), ReparentFrameAndIcon(), RescueWindows(), ReshapeIcon(), resizeFromCenter(), ResizeOccupyWindow(), ResizeWorkSpaceManager(), restore_mask(), RestoreForShutdown(), RestoreWinConfig(), send_clientmessage(), SendPropertyMessage(), set_window_icon_name(), set_window_name(), SetBorderCursor(), SetCaptivesList(), SetFocus(), SetFocusVisualAttributes(), SetFrameShape(), SetMapStateProp(), SetNoRedirect(), SetPropsIfCaptiveCtwm(), SetRaiseWindow(), SetupFrame(), SetupOccupation(), ShowIconifiedIcon(), ShrinkIconTitle(), Squeeze(), start_m4(), StartResize(), SweepWindow(), synth_btnevent_for_moveresize(), SynthesiseFocusIn(), SynthesiseFocusOut(), takeover_screen(), UninstallRootColormap(), UnmapTransients(), UnmaskScreen(), UpdateMenu(), Vanish(), WarpCursorToDefaultEntry(), WarpToScreen(), WarpToWindow(), wmap_mapwin_backend(), WMapAddWindowToWorkspace(), WMapIconify(), WMapRedrawWindow(), WMapRemoveWindow(), WMapRemoveWindowFromWorkspace(), WMapRestack(), WMapSetupWindow(), WMgrAddToCurrentWorkSpaceAndWarp(), WMgrHandleButtonEvent(), WMgrHandleExposeEvent(), WMgrSetButtonsState(), WMgrSetMapState(), WriteWinConfigEntry(), Zoom(), ZoomInWindow(), and ZoomOutWindow().

◆ Gcv

XGCValues Gcv

Definition at line 126 of file ctwm_main.c.

◆ HandlingEvents

bool HandlingEvents = false

Definition at line 131 of file ctwm_main.c.

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

◆ HasShape

bool HasShape

Definition at line 90 of file ctwm_main.c.

Referenced by AddWindow(), ctwm_main(), do_squeeze_entry(), InitEvents(), and SetupFrame().

◆ Home

char* Home

◆ HomeLen

int HomeLen

Definition at line 129 of file ctwm_main.c.

Referenced by ctwm_main(), and ExpandFilePath().

◆ JunkBW

unsigned int JunkBW

Definition at line 144 of file ctwm_main.c.

◆ JunkChild

Window JunkChild

Definition at line 142 of file ctwm_main.c.

◆ JunkDepth

unsigned int JunkDepth

Definition at line 144 of file ctwm_main.c.

◆ JunkHeight

unsigned int JunkHeight

Definition at line 144 of file ctwm_main.c.

◆ JunkMask

unsigned int JunkMask

Definition at line 144 of file ctwm_main.c.

◆ JunkRoot

◆ JunkWidth

unsigned int JunkWidth

◆ JunkX

◆ JunkY

int JunkY

Definition at line 143 of file ctwm_main.c.

◆ LeftButt

Cursor LeftButt

Definition at line 117 of file ctwm_main.c.

Referenced by ctwm_main(), HandleButtonPress(), and movewindow().

◆ LeftCursor

Cursor LeftCursor

Definition at line 110 of file ctwm_main.c.

◆ MenuContext

XContext MenuContext

◆ MiddleButt

Cursor MiddleButt

Definition at line 116 of file ctwm_main.c.

Referenced by ctwm_main(), HandleButtonPress(), and movewindow().

◆ NoClass

XClassHint NoClass

Definition at line 124 of file ctwm_main.c.

Referenced by AddWindow(), and ctwm_main().

◆ NumScreens

int NumScreens

◆ PreviousScreen

int PreviousScreen

Definition at line 94 of file ctwm_main.c.

Referenced by AddWindow(), ctwm_main(), f_warptoscreen_impl(), and WarpToScreen().

◆ ProgramName

◆ ProgramNameLen

size_t ProgramNameLen

Definition at line 147 of file ctwm_main.c.

Referenced by ctwm_main(), sh_restart(), and sh_shutdown().

◆ ResizeWindow

Window ResizeWindow

◆ RestartPreviousState

bool RestartPreviousState = true

◆ RightButt

Cursor RightButt

Definition at line 115 of file ctwm_main.c.

Referenced by ctwm_main(), HandleButtonPress(), and movewindow().

◆ RightCursor

Cursor RightCursor

Definition at line 111 of file ctwm_main.c.

◆ Scr

ScreenInfo* Scr = NULL

The ScreenInfo struct for the current Screen.

Definition at line 93 of file ctwm_main.c.

◆ ScreenContext

◆ ScreenList

◆ ShapeErrorBase

int ShapeErrorBase

Definition at line 91 of file ctwm_main.c.

◆ ShapeEventBase

int ShapeEventBase

Definition at line 91 of file ctwm_main.c.

Referenced by ctwm_main(), and InitEvents().

◆ TopCursor

Cursor TopCursor

Definition at line 112 of file ctwm_main.c.

Referenced by ctwm_main(), DoResize(), MenuDoResize(), and SetBorderCursor().

◆ TopLeftCursor

Cursor TopLeftCursor

Definition at line 107 of file ctwm_main.c.

◆ TopRightCursor

Cursor TopRightCursor

Definition at line 106 of file ctwm_main.c.

◆ TwmContext

◆ UpperLeftCursor

Cursor UpperLeftCursor

Definition at line 105 of file ctwm_main.c.

Referenced by AddWindow(), and ctwm_main().

◆ XCTWMAtom

Atom XCTWMAtom[NUM_CTWM_XATOMS]

Our various common atoms.

Definition at line 87 of file ctwm_main.c.

Referenced by ctwm_main().