CTWM
Loading...
Searching...
No Matches
/usr/src/RPM/BUILD/ctwm-4.1.0/add_window.c File Reference
#include "ctwm.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include "add_window.h"
#include "colormaps.h"
#include "ctwm_atoms.h"
#include "functions.h"
#include "events.h"
#include "gram.tab.h"
#include "icons.h"
#include "iconmgr.h"
#include "image.h"
#include "list.h"
#include "mwmhints.h"
#include "occupation.h"
#include "otp.h"
#include "parse.h"
#include "r_area.h"
#include "r_layout.h"
#include "screen.h"
#include "util.h"
#include "vscreen.h"
#include "win_decorations.h"
#include "win_ops.h"
#include "win_regions.h"
#include "win_resize.h"
#include "win_ring.h"
#include "win_utils.h"
#include "workspace_manager.h"
#include "xparsegeometry.h"
Include dependency graph for add_window.c:

Go to the source code of this file.

Macros

#define CHKL(lst)
#define HALF_AVE_CURSOR_SIZE   8 /* so that it is visible */
#define SETC(lst, save)
#define SETCTXS(win)
#define grabbutton(button, modifier, window, pointer_mode)
#define grabkey(funckey, modifier, window)
#define ungrabkey(funckey, modifier, window)
#define AltMask   (Alt1Mask | Alt2Mask | Alt3Mask | Alt4Mask | Alt5Mask)

Functions

TwmWindowAddWindow (Window w, AWType wtype, IconMgr *iconp, VirtualScreen *vs)
void GrabButtons (TwmWindow *tmp_win)
void GrabKeys (TwmWindow *tmp_win)

Variables

int AddingX
int AddingY
unsigned int AddingW
unsigned int AddingH
static int PlaceX = -1
static int PlaceY = -1
char NoName [] = "Untitled"
bool resizeWhenAdd

Macro Definition Documentation

◆ AltMask

#define AltMask   (Alt1Mask | Alt2Mask | Alt3Mask | Alt4Mask | Alt5Mask)

Referenced by GrabKeys().

◆ CHKL

#define CHKL ( lst)
Value:
IsInList(Scr->lst, tmp_win)
#define Scr
bool IsInList(name_list *list_head, TwmWindow *twin)
Definition list.c:140

Referenced by AddWindow().

◆ grabbutton

#define grabbutton ( button,
modifier,
window,
pointer_mode )
Value:
XGrabButton (dpy, button, modifier, window, \
True, ButtonPressMask | ButtonReleaseMask, \
pointer_mode, GrabModeAsync, None, \
Scr->FrameCursor);
Display * dpy
Definition ctwm_main.c:84

Definition at line 1897 of file add_window.c.

Referenced by GrabButtons().

◆ grabkey

#define grabkey ( funckey,
modifier,
window )
Value:
XGrabKey(dpy, funckey->keycode, funckey->mods | modifier, window, True, \
GrabModeAsync, GrabModeAsync);

Definition at line 1951 of file add_window.c.

Referenced by GrabKeys().

◆ HALF_AVE_CURSOR_SIZE

#define HALF_AVE_CURSOR_SIZE   8 /* so that it is visible */

Referenced by AddWindow().

◆ SETC

#define SETC ( lst,
save )
Value:
GetColorFromList(Scr->lst, tmp_win->name, \
&tmp_win->class, &tmp_win->save)
bool GetColorFromList(name_list *list_head, char *name, XClassHint *class, Pixel *ptr)
Definition list.c:194

Referenced by AddWindow().

◆ SETCTXS

#define SETCTXS ( win)
Value:
do { \
XSaveContext(dpy, win, TwmContext, (XPointer) tmp_win); \
XSaveContext(dpy, win, ScreenContext, (XPointer) Scr); \
} while(0)
XContext ScreenContext
Definition ctwm_main.c:121
XContext TwmContext
Definition ctwm_main.c:119

Referenced by AddWindow().

◆ ungrabkey

#define ungrabkey ( funckey,
modifier,
window )
Value:
XUngrabKey (dpy, funckey->keycode, funckey->mods | modifier, window);

Definition at line 1954 of file add_window.c.

Referenced by GrabKeys().

Function Documentation

◆ AddWindow()

TwmWindow * AddWindow ( Window w,
AWType wtype,
IconMgr * iconp,
VirtualScreen * vs )

Definition at line 113 of file add_window.c.

References AddEndResize(), AddIconManager(), AddingH, AddingW, AddingX, AddingY, AddStartResize(), AddWindowToRing(), ALLOW_DEAD_STORE, TwmWindow::AlwaysSqueezeToGravity, TwmWindow::attr, TwmWindow::auto_lower, TwmWindow::auto_raise, AutoSqueeze(), TwmWindow::AutoSqueeze, AWT_ICON_MANAGER, AWT_OCCUPY, AWT_WINDOWBOX, AWT_WORKSPACE_MANAGER, ColorPair::back, TwmWindow::border_tile, TwmWindow::borderC, CHKL, CLarg, TwmWindow::class, TwmWindow::cmaps, ComputeTitleLocation(), ConstrainByBorders(), ConstrainedToWinBox(), ConstrainSize(), CreateWindowTitlebarButtons(), TwmWindow::_names::ctwm_wm_icon_name, TwmWindow::_names::ctwm_wm_name, TwmWindow::_ring::cursor_valid, DisplayPosition(), TwmWindow::DontSetInactive, DoResize(), dpy, EWMH_HAS_STRUT, EWMH_STATE_SHADED, EwmhGetProperties(), EwmhHasBorder(), EwmhHasTitle(), EwmhOnWindowRing(), EwmhSet_NET_FRAME_EXTENTS(), FB, FetchWmColormapWindows(), FetchWmProtocols(), findWindowBox(), FixRootEvent(), ColorPair::fore, TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_bw3D, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, gen_synthetic_wmhints(), GetGravityOffsets(), GetMWMHints(), GetShadeColors(), GetTwmWindow(), GetWindowConfig(), GetWindowSizeHints(), GetWMPropertyString(), GrabButtons(), GrabKeys(), TwmWindow::gray, TwmWindow::group, HALF_AVE_CURSOR_SIZE, HandlingEvents, TwmWindow::hasfocusvisible, HasShape, RArea::height, TwmWindow::heightEverChangedByUser, TwmWindow::highlight, TwmWindow::hilite_wl, TwmWindow::hilite_wr, TwmWindow::hints, TwmWindow::icon_on, TwmWindow::iconified, TwmWindow::iconify_by_unmapping, TwmWindow::iconmgrp, InitWindowNotOnRing, InstallRootColormap(), TwmWindow::isicon, TwmWindow::isiconmgr, TwmWindow::isoccupy, TwmWindow::istransient, TwmWindow::iswspmgr, JunkBW, JunkChild, JunkDepth, JunkHeight, JunkMask, JunkRoot, JunkWidth, JunkX, JunkY, TwmWindow::lolite_wl, TwmWindow::lolite_wr, LookInListWin(), TwmWindow::mapped, mk_blackgray_pixmap(), MoveOutline(), MoveResizeSizeWindow(), munge_wmhints(), mwm_has_border(), mwm_has_title(), mwm_sets_title(), TwmWindow::name, TwmWindow::name_width, TwmWindow::nameChanged, TwmWindow::names, TwmWindow::next, NoClass, NoName, Colormaps::number_cwins, NumScreens, TwmWindow::old_bw, TwmWindow::OpaqueMove, TwmWindow::OpaqueResize, OtpAdd(), TwmWindow::parent_vs, PlaceWindowInRegion(), PlaceX, PlaceY, PPOS_NON_ZERO, PPOS_ON, TwmWindow::prev, PreviousScreen, ProgramName, RAreaNew(), RedirectToCaptive(), ReGrab(), resizeWhenAdd, TwmWindow::ring, RLayoutFindLeftRightEdges(), RLayoutFindMonitorBottomEdge(), RLayoutFindMonitorRightEdge(), RLayoutFindTopBottomEdges(), RLayoutXParseGeometry(), RootFunction, RP_ALL, RP_UNMAPPED, savegeometry(), TwmWindow::savegeometry, TwmWindow::savevs, Scr, set_window_icon_name(), set_window_name(), SETC, SETCTXS, SetFocusVisualAttributes(), SetPropsIfCaptiveCtwm(), SetupFrame(), SetupOccupation(), SIJ_LEFT, SIZE_HINDENT, SIZE_VINDENT, TwmWindow::squeeze_info, TwmWindow::squeeze_info_copied, TwmWindow::squeezed, TwmWindow::stackmode, TwmWindow::StartSqueezed, TwmWindow::title, TwmWindow::title_height, TwmWindow::title_w, TwmWindow::title_width, TwmWindow::title_x, TwmWindow::title_y, TwmWindow::titlebuttons, TwmWindow::titlehighlight, TwmWindow::transientfor, TryToGrid(), TryToPack(), UninstallRootColormap(), UnlinkWindowFromRing(), TwmWindow::UnmapByMovingFarAway, UpperLeftCursor, visible(), TwmWindow::vs, TwmWindow::w, RArea::width, TwmWindow::_savegeometry::width, TwmWindow::widthEverChangedByUser, TBWindow::window, VirtualScreen::window, WinWin, TwmWindow::_names::wm_icon_name, TwmWindow::_names::wm_name, WMapAddWindow(), TwmWindow::wmhints, TwmWindow::wShaped, RArea::x, x, RArea::y, y, ZOOM_NONE, and TwmWindow::zoomed.

Referenced by CreateIconManagers(), CreateOccupyWindow(), createWindowBoxes(), CreateWorkSpaceManagerWindow(), and HandleMapRequest().

◆ GrabButtons()

◆ GrabKeys()

Variable Documentation

◆ AddingH

unsigned int AddingH

Definition at line 80 of file add_window.c.

Referenced by AddEndResize(), AddWindow(), MenuEndResize(), and resizeFromCenter().

◆ AddingW

unsigned int AddingW

Definition at line 79 of file add_window.c.

Referenced by AddEndResize(), AddWindow(), MenuEndResize(), and resizeFromCenter().

◆ AddingX

int AddingX

Definition at line 77 of file add_window.c.

Referenced by AddEndResize(), AddWindow(), MenuEndResize(), and resizeFromCenter().

◆ AddingY

int AddingY

Definition at line 78 of file add_window.c.

Referenced by AddEndResize(), AddWindow(), MenuEndResize(), and resizeFromCenter().

◆ NoName

char NoName[] = "Untitled"

◆ PlaceX

int PlaceX = -1
static

Definition at line 82 of file add_window.c.

Referenced by AddWindow().

◆ PlaceY

int PlaceY = -1
static

Definition at line 83 of file add_window.c.

Referenced by AddWindow().

◆ resizeWhenAdd

bool resizeWhenAdd

Definition at line 90 of file add_window.c.

Referenced by AddWindow(), DoResize(), and StartResize().