CTWM
Loading...
Searching...
No Matches
Functions
/usr/src/RPM/BUILD/ctwm-4.1.0/win_utils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GetWindowSizeHints (TwmWindow *tmp_win)
 
void FetchWmProtocols (TwmWindow *tmp)
 
void GetGravityOffsets (TwmWindow *tmp, int *xp, int *yp)
 
TwmWindowGetTwmWindow (Window w)
 
charGetWMPropertyString (Window w, Atom prop)
 
void FreeWMPropertyString (char *prop)
 
bool visible (const TwmWindow *tmp_win)
 
long mask_out_event (Window w, long ignore_event)
 
long mask_out_event_mask (Window w, long ignore_event, long curmask)
 
int restore_mask (Window w, long restore)
 
void SetMapStateProp (TwmWindow *tmp_win, int state)
 
bool GetWMState (Window w, int *statep, Window *iwp)
 
void DisplayPosition (const TwmWindow *_unused_tmp_win, int x, int y)
 
void MoveResizeSizeWindow (int x, int y, unsigned int width, unsigned int height)
 
void TryToPack (TwmWindow *tmp_win, int *x, int *y)
 
void TryToPush (TwmWindow *tmp_win, int x, int y)
 
void TryToGrid (TwmWindow *tmp_win, int *x, int *y)
 
bool ConstrainByLayout (RLayout *layout, int move_off_res, int *left, int width, int *top, int height)
 
void ConstrainByBorders1 (int *left, int width, int *top, int height)
 
void ConstrainByBorders (TwmWindow *twmwin, int *left, int width, int *top, int height)
 
void WarpToWindow (TwmWindow *t, bool must_raise)
 
void send_clientmessage (Window w, Atom a, Time timestamp)
 
XWMHintsgen_synthetic_wmhints (TwmWindow *win)
 
XWMHintsmunge_wmhints (TwmWindow *win, XWMHints *hints)
 Perform whatever adaptations of WM_HINTS info we do.
 
bool set_window_name (TwmWindow *win)
 [Re]set a window's name.
 
void apply_window_name (TwmWindow *win)
 [Re]set and apply changes to a window's name.
 
bool set_window_icon_name (TwmWindow *win)
 [Re]set a window's icon name.
 
void apply_window_icon_name (TwmWindow *win)
 [Re]set and apply changes to a window's icon name.
 

Function Documentation

◆ apply_window_icon_name()

void apply_window_icon_name ( TwmWindow * win)

[Re]set and apply changes to a window's icon name.

This is called after we've received a new WM_ICON_NAME (or other name-setting) property, to update our titlebars, icon managers, etc.

See also
apply_window_name() which does the same for the window title.

Definition at line 1349 of file win_utils.c.

References AutoPopupMaybe(), RedoIcon(), set_window_icon_name(), and Tmp_win.

Referenced by apply_window_name(), EwmhHandlePropertyNotify(), and HandlePropertyNotify().

◆ apply_window_name()

void apply_window_name ( TwmWindow * win)

◆ ConstrainByBorders()

void ConstrainByBorders ( TwmWindow * twmwin,
int * left,
int width,
int * top,
int height )

Definition at line 825 of file win_utils.c.

References ConstrainByBorders1(), dpy, and PlaceX.

Referenced by AddWindow(), HandleButtonRelease(), movewindow(), and TryToPush_be().

◆ ConstrainByBorders1()

void ConstrainByBorders1 ( int * left,
int width,
int * top,
int height )

Definition at line 818 of file win_utils.c.

References ConstrainByLayout(), and Scr.

Referenced by ConstrainByBorders(), and MoveMenu().

◆ ConstrainByLayout()

bool ConstrainByLayout ( RLayout * layout,
int move_off_res,
int * left,
int width,
int * top,
int height )

◆ DisplayPosition()

void DisplayPosition ( const TwmWindow * _unused_tmp_win,
int x,
int y )

Definition at line 466 of file win_utils.c.

References dpy, Draw3DBorder(), FB, off, PlaceX, Scr, SIZE_HINDENT, SIZE_VINDENT, x, and y.

Referenced by AddWindow(), and movewindow().

◆ FetchWmProtocols()

void FetchWmProtocols ( TwmWindow * tmp)

Definition at line 108 of file win_utils.c.

References DoesWmDeleteWindow, DoesWmSaveYourself, DoesWmTakeFocus, dpy, and PlaceX.

Referenced by AddWindow(), and HandlePropertyNotify().

◆ FreeWMPropertyString()

void FreeWMPropertyString ( char * prop)

Definition at line 327 of file win_utils.c.

References NoName, and PlaceX.

Referenced by EwmhHandlePropertyNotify(), HandleDestroyNotify(), and HandlePropertyNotify().

◆ gen_synthetic_wmhints()

XWMHints * gen_synthetic_wmhints ( TwmWindow * win)

Definition at line 1030 of file win_utils.c.

References PlaceX.

Referenced by AddWindow().

◆ GetGravityOffsets()

void GetGravityOffsets ( TwmWindow * tmp,
int * xp,
int * yp )

Definition at line 149 of file win_utils.c.

References PlaceX, x, and y.

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

◆ GetTwmWindow()

TwmWindow * GetTwmWindow ( Window w)

◆ GetWindowSizeHints()

void GetWindowSizeHints ( TwmWindow * tmp_win)

Definition at line 41 of file win_utils.c.

References dpy, PlaceX, and Scr.

Referenced by AddWindow(), and HandlePropertyNotify().

◆ GetWMPropertyString()

char * GetWMPropertyString ( Window w,
Atom prop )

Definition at line 222 of file win_utils.c.

References dpy, PlaceX, ProgramName, and Scr.

Referenced by AddWindow(), EwmhHandlePropertyNotify(), and HandlePropertyNotify().

◆ GetWMState()

bool GetWMState ( Window w,
int * statep,
Window * iwp )

Definition at line 429 of file win_utils.c.

References dpy, and PlaceX.

Referenced by HandleMapRequest(), and SetupOccupation().

◆ mask_out_event()

long mask_out_event ( Window w,
long ignore_event )

◆ mask_out_event_mask()

long mask_out_event_mask ( Window w,
long ignore_event,
long curmask )

Definition at line 389 of file win_utils.c.

References dpy, and PlaceX.

Referenced by Iconify(), mask_out_event(), and UnmapTransients().

◆ MoveResizeSizeWindow()

void MoveResizeSizeWindow ( int x,
int y,
unsigned int width,
unsigned int height )

Definition at line 495 of file win_utils.c.

References dpy, PlaceX, RLayoutGetAreaAtXY(), Scr, x, and y.

Referenced by AddWindow(), MenuStartResize(), movewindow(), and StartResize().

◆ munge_wmhints()

XWMHints * munge_wmhints ( TwmWindow * win,
XWMHints * hints )

Perform whatever adaptations of WM_HINTS info we do.

Most of these relate to focus, but we also fiddle with group membership.

Definition at line 1059 of file win_utils.c.

References GetTwmWindow(), TwmWindow::group, IsInList(), PlaceX, Scr, and TwmWindow::w.

Referenced by AddWindow(), and HandlePropertyNotify().

◆ restore_mask()

int restore_mask ( Window w,
long restore )

◆ send_clientmessage()

void send_clientmessage ( Window w,
Atom a,
Time timestamp )

Definition at line 996 of file win_utils.c.

References dpy, and PlaceX.

Referenced by Animate(), f_saveyourself_impl(), SendDeleteWindowMessage(), and SendTakeFocusMessage().

◆ set_window_icon_name()

bool set_window_icon_name ( TwmWindow * win)

[Re]set a window's icon name.

As with the window name version in set_window_name(), this is mostly separate so the AddWindow() process can call it.

Note
As with TwmWindow::name, we never want to try free()'ing or the like TwmWindow::icon_name.
See also
set_window_name() for details; this is just the icon name equivalent of it.

Definition at line 1288 of file win_utils.c.

References dpy, TwmWindow::icon_name, TwmWindow::_names::icon_set, TwmWindow::name, TwmWindow::names, PlaceX, TRY, TwmWindow::w, and TwmWindow::_names::wm_icon_name.

Referenced by AddWindow(), and apply_window_icon_name().

◆ set_window_name()

bool set_window_name ( TwmWindow * win)

[Re]set a window's name.

This goes over the available naming sources for the window and points the TwmWindow::name at the appropriate one. It may also set a property to signal other EWMH-aware clients when we're naming it a way they can't see themselves.

Note
This should rarely be called directly; apply_window_name() should be used instead. It's split out because we need to do this step individually in AddWindow().
Note also that we never need to worry about freeing the TwmWindow::name; it always points to one of the TwmWindow::names values (which are free'd by the event handler when they change) or to NoName (which is static). So we can just casually flip it around at will.

Definition at line 1126 of file win_utils.c.

References dpy, TwmWindow::name, TwmWindow::names, NoName, PlaceX, TRY, TwmWindow::w, and TwmWindow::_names::wm_name.

Referenced by AddWindow(), and apply_window_name().

◆ SetMapStateProp()

void SetMapStateProp ( TwmWindow * tmp_win,
int state )

◆ TryToGrid()

void TryToGrid ( TwmWindow * tmp_win,
int * x,
int * y )

Definition at line 705 of file win_utils.c.

References PlaceX, Scr, x, and y.

Referenced by AddWindow(), HandleButtonRelease(), and movewindow().

◆ TryToPack()

void TryToPack ( TwmWindow * tmp_win,
int * x,
int * y )

◆ TryToPush()

void TryToPush ( TwmWindow * tmp_win,
int x,
int y )

Definition at line 617 of file win_utils.c.

References PD_ANY, PlaceX, TryToPush_be(), x, and y.

Referenced by HandleButtonRelease(), and movewindow().

◆ visible()

bool visible ( const TwmWindow * tmp_win)

◆ WarpToWindow()

void WarpToWindow ( TwmWindow * t,
bool must_raise )