CTWM
Loading...
Searching...
No Matches
/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)
char * GetWMPropertyString (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)
XWMHints * gen_synthetic_wmhints (TwmWindow *win)
XWMHints * munge_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 apply_window_icon_name(), AutoPopupMaybe(), RedoIcon(), set_window_icon_name(), and Tmp_win.

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

◆ apply_window_name()

◆ ConstrainByBorders()

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

◆ ConstrainByBorders1()

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

Definition at line 818 of file win_utils.c.

References ConstrainByBorders1(), ConstrainByLayout(), and Scr.

Referenced by ConstrainByBorders(), ConstrainByBorders1(), 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 DisplayPosition(), dpy, Draw3DBorder(), FB, off, Scr, SIZE_HINDENT, and SIZE_VINDENT.

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

◆ FetchWmProtocols()

◆ FreeWMPropertyString()

void FreeWMPropertyString ( char * prop)

◆ gen_synthetic_wmhints()

XWMHints * gen_synthetic_wmhints ( TwmWindow * win)

Definition at line 1030 of file win_utils.c.

References gen_synthetic_wmhints().

Referenced by AddWindow(), and gen_synthetic_wmhints().

◆ GetGravityOffsets()

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

◆ GetTwmWindow()

◆ GetWindowSizeHints()

◆ GetWMPropertyString()

char * GetWMPropertyString ( Window w,
Atom prop )

◆ GetWMState()

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

Definition at line 429 of file win_utils.c.

References dpy, and GetWMState().

Referenced by GetWMState(), 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 mask_out_event_mask().

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

◆ MoveResizeSizeWindow()

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

◆ 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(), munge_wmhints(), Scr, and TwmWindow::w.

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

◆ restore_mask()

int restore_mask ( Window w,
long restore )

◆ send_clientmessage()

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

◆ 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, set_window_icon_name(), TRY, TwmWindow::w, and TwmWindow::_names::wm_icon_name.

Referenced by AddWindow(), apply_window_icon_name(), and set_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, set_window_name(), TRY, TwmWindow::w, and TwmWindow::_names::wm_name.

Referenced by AddWindow(), apply_window_name(), and set_window_name().

◆ SetMapStateProp()

◆ TryToGrid()

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

◆ TryToPack()

◆ TryToPush()

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

Definition at line 617 of file win_utils.c.

References PD_ANY, TryToPush(), and TryToPush_be().

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

◆ visible()

◆ WarpToWindow()