|
CTWM
|
#include "ctwm.h"#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <X11/Xatom.h>#include "otp.h"#include "ctwm_atoms.h"#include "screen.h"#include "util.h"#include "icons.h"#include "list.h"#include "events.h"#include "event_handlers.h"#include "vscreen.h"#include "win_utils.h"Go to the source code of this file.
Data Structures | |
| struct | OtpWinList |
| struct | OtpPreferences |
| struct | Box |
Macros | |
| #define | DEBUG_OTP 0 |
| #define | DPRINTF(x) |
| #define | CHECK_OTP 1 |
| #define | OTP_ZERO 8 |
| #define | OTP_MAX (OTP_ZERO * 2) |
| #define | PRI(owl) |
| #define | PRI_CP(from, to) |
Typedefs | |
| typedef struct Box | Box |
Functions | |
| static bool | OtpCheckConsistencyVS (VirtualScreen *currentvs, Window vroot) |
| static void | OwlPrettyPrint (const OtpWinList *start) |
| Pretty-print a whole OWL stack. | |
| static void | OwlSetAflagMask (OtpWinList *owl, unsigned mask, unsigned setto) |
| static void | OwlSetAflag (OtpWinList *owl, unsigned flag) |
| static void | OwlClearAflag (OtpWinList *owl, unsigned flag) |
| static void | OwlStashAflags (OtpWinList *owl) |
| static unsigned | OwlGetStashedAflags (OtpWinList *owl, bool *gotit) |
| static int | OwlEffectivePriority (OtpWinList *owl) |
| static Box | BoxOfOwl (OtpWinList *owl) |
| static bool | BoxesIntersect (Box *b1, Box *b2) |
| static bool | isIntersectingWith (OtpWinList *owl1, OtpWinList *owl2) |
| static bool | isOnScreen (OtpWinList *owl) |
| bool | isTransientOf (TwmWindow *trans, TwmWindow *main) |
| bool | isGroupLeader (TwmWindow *twm_win) |
| bool | isGroupLeaderOf (TwmWindow *leader, TwmWindow *twm_win) |
| bool | isSmallTransientOf (TwmWindow *trans, TwmWindow *main) |
| static Window | WindowOfOwl (OtpWinList *owl) |
| bool | OtpCheckConsistency (void) |
| static void | RemoveOwl (OtpWinList *owl) |
| static OtpWinList * | GetOwlAtOrBelowInVS (OtpWinList *owl, VirtualScreen *vs) |
| For the purpose of putting a window above another, they need to have the same parent, i.e. | |
| static void | InsertOwlAbove (OtpWinList *owl, OtpWinList *other_owl) |
| static bool | shouldStayAbove (OtpWinList *owl, OtpWinList *other_owl) |
| static void | RaiseSmallTransientsOfAbove (OtpWinList *owl, OtpWinList *other_owl) |
| static OtpWinList * | OwlRightBelow (int priority) |
| static void | InsertOwl (OtpWinList *owl, int where) |
| static void | SetOwlPriority (OtpWinList *owl, int new_pri, int where) |
| static void | TryToMoveTransientsOfTo (OtpWinList *owl, int priority, int where) |
| static void | TryToSwitch (OtpWinList *owl, int where) |
| static void | RaiseOwl (OtpWinList *owl) |
| static void | LowerOwl (OtpWinList *owl) |
| static bool | isHiddenBy (OtpWinList *owl, OtpWinList *other_owl) |
| static void | TinyRaiseOwl (OtpWinList *owl) |
| static void | TinyLowerOwl (OtpWinList *owl) |
| static void | RaiseLowerOwl (OtpWinList *owl) |
| void | OtpRaise (TwmWindow *twm_win, WinType wintype) |
| void | OtpLower (TwmWindow *twm_win, WinType wintype) |
| void | OtpRaiseLower (TwmWindow *twm_win, WinType wintype) |
| void | OtpTinyRaise (TwmWindow *twm_win, WinType wintype) |
| void | OtpTinyLower (TwmWindow *twm_win, WinType wintype) |
| void | OtpCirculateSubwindows (VirtualScreen *vs, int direction) |
| void | OtpHandleCirculateNotify (VirtualScreen *vs, TwmWindow *twm_win, WinType wintype, int place) |
| void | OtpSetPriority (TwmWindow *twm_win, WinType wintype, int new_pri, int where) |
| void | OtpChangePriority (TwmWindow *twm_win, WinType wintype, int relpriority) |
| void | OtpSwitchPriority (TwmWindow *twm_win, WinType wintype) |
| void | OtpToggleSwitching (TwmWindow *twm_win, WinType wintype) |
| void | OtpForcePlacement (TwmWindow *twm_win, int where, TwmWindow *other_win) |
| static void | ApplyPreferences (OtpPreferences *prefs, OtpWinList *owl) |
| static void | RecomputeOwlPrefs (OtpPreferences *prefs, OtpWinList *owl) |
| void | OtpRecomputePrefs (TwmWindow *twm_win) |
| static void | free_OtpWinList (OtpWinList *owl) |
| void | OtpRemove (TwmWindow *twm_win, WinType wintype) |
| static OtpWinList * | new_OtpWinList (TwmWindow *twm_win, WinType wintype, bool switching, int priority) |
| static OtpWinList * | AddNewOwl (TwmWindow *twm_win, WinType wintype, OtpWinList *parent) |
| void | OtpAdd (TwmWindow *twm_win, WinType wintype) |
| void | OtpReassignIcon (TwmWindow *twm_win, Icon *old_icon) |
| void | OtpFreeIcon (TwmWindow *twm_win) |
| name_list ** | OtpScrSwitchingL (ScreenInfo *scr, WinType wintype) |
| void | OtpScrSetSwitching (ScreenInfo *scr, WinType wintype, bool switching) |
| void | OtpScrSetZero (ScreenInfo *scr, WinType wintype, int priority) |
| name_list ** | OtpScrPriorityL (ScreenInfo *scr, WinType wintype, int priority) |
| static OtpPreferences * | new_OtpPreferences (void) |
| static void | free_OtpPreferences (OtpPreferences *pref) |
| void | OtpScrInitData (ScreenInfo *scr) |
| int | ReparentWindow (Display *display, TwmWindow *twm_win, WinType wintype, Window parent, int x, int y) |
| void | ReparentWindowAndIcon (Display *display, TwmWindow *twm_win, Window parent, int win_x, int win_y, int icon_x, int icon_y) |
| TwmWindow * | OtpBottomWin (void) |
| TwmWindow * | OtpTopWin (void) |
| TwmWindow * | OtpNextWinUp (TwmWindow *twm_win) |
| TwmWindow * | OtpNextWinDown (TwmWindow *twm_win) |
| void | OtpSetAflagMask (TwmWindow *twm_win, unsigned mask, unsigned setto) |
| void | OtpSetAflag (TwmWindow *twm_win, unsigned flag) |
| void | OtpClearAflag (TwmWindow *twm_win, unsigned flag) |
| void | OtpStashAflagsFirstTime (TwmWindow *twm_win) |
| void | OtpRestackWindow (TwmWindow *twm_win) |
| static void | OtpFocusWindowBE (TwmWindow *twm_win, int oldprio) |
| Focus/unfocus backend. | |
| void | OtpUnfocusWindow (TwmWindow *twm_win) |
| Unfocus a window. | |
| void | OtpFocusWindow (TwmWindow *twm_win) |
| Focus a window. | |
| int | OtpEffectiveDisplayPriority (TwmWindow *twm_win) |
| int | OtpEffectivePriority (TwmWindow *twm_win) |
| bool | OtpIsFocusDependent (TwmWindow *twm_win) |
| #define DPRINTF | ( | x | ) |
Definition at line 36 of file otp.c.
Referenced by InsertOwl(), InsertOwlAbove(), OtpCheckConsistencyVS(), OtpCirculateSubwindows(), OtpHandleCirculateNotify(), OtpSetPriority(), ReparentWindow(), ReparentWindowAndIcon(), and SetOwlPriority().
| #define OTP_MAX (OTP_ZERO * 2) |
Definition at line 47 of file otp.c.
Referenced by ApplyPreferences(), free_OtpPreferences(), new_OtpPreferences(), OtpCheckConsistencyVS(), OtpSwitchPriority(), OwlEffectivePriority(), RaiseLowerOwl(), SetOwlPriority(), and TryToSwitch().
| #define OTP_ZERO 8 |
Definition at line 46 of file otp.c.
Referenced by AddNewOwl(), new_OtpPreferences(), OtpEffectiveDisplayPriority(), OtpScrPriorityL(), OtpScrSetZero(), OtpSetPriority(), OtpSwitchPriority(), and OwlEffectivePriority().
| #define PRI | ( | owl | ) |
Definition at line 50 of file otp.c.
Referenced by AddNewOwl(), InsertOwl(), InsertOwlAbove(), OtpCheckConsistencyVS(), OtpFocusWindow(), OtpUnfocusWindow(), OwlRightBelow(), RaiseLowerOwl(), TinyLowerOwl(), TinyRaiseOwl(), and TryToMoveTransientsOfTo().
| #define PRI_CP | ( | from, | |
| to ) |
Definition at line 51 of file otp.c.
Referenced by AddNewOwl(), InsertOwl(), and RaiseSmallTransientsOfAbove().
| typedef struct Box Box |
|
static |
Definition at line 1134 of file otp.c.
References AddNewOwl(), ApplyPreferences(), EWMH_STATE_ABOVE, EWMH_STATE_BELOW, EWMH_STATE_FULLSCREEN, EwmhGetInitPriority(), IconWin, InsertOwl(), TwmWindow::istransient, new_OtpWinList(), OTP_ZERO, OwlGetStashedAflags(), OwlStashAflags(), PRI, OtpWinList::pri_aflags, OtpWinList::pri_base, PRI_CP, OtpPreferences::priority, Scr, OtpWinList::stashed_aflags, OtpPreferences::switching, and OtpWinList::switching.
Referenced by AddNewOwl(), and OtpAdd().
|
static |
Definition at line 1024 of file otp.c.
References ApplyPreferences(), TwmWindow::class, LookInList(), TwmWindow::name, OTP_MAX, OtpWinList::pri_base, OtpPreferences::priorityL, OtpPreferences::switching, OtpWinList::switching, OtpPreferences::switchingL, and OtpWinList::twm_win.
Referenced by AddNewOwl(), ApplyPreferences(), and RecomputeOwlPrefs().
Definition at line 121 of file otp.c.
References BoxesIntersect(), Box::height, Box::width, Box::x, and Box::y.
Referenced by BoxesIntersect(), and isIntersectingWith().
|
static |
Definition at line 91 of file otp.c.
References BoxOfOwl(), TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, Box::height, TwmWindow::icon, IconWin, OtpWinList::twm_win, OtpWinList::type, Icon::w_height, Icon::w_width, Icon::w_x, Icon::w_y, Box::width, WinWin, Box::x, and Box::y.
Referenced by BoxOfOwl(), and isIntersectingWith().
|
static |
Definition at line 1354 of file otp.c.
References free_OtpPreferences(), FreeList(), OTP_MAX, OtpPreferences::priorityL, and OtpPreferences::switchingL.
Referenced by free_OtpPreferences(), and OtpScrInitData().
|
static |
Definition at line 1086 of file otp.c.
References OtpWinList::above, OtpWinList::below, and free_OtpWinList().
Referenced by free_OtpWinList(), and OtpRemove().
|
static |
For the purpose of putting a window above another, they need to have the same parent, i.e.
be in the same VirtualScreen.
Definition at line 378 of file otp.c.
References OtpWinList::below, GetOwlAtOrBelowInVS(), TwmWindow::parent_vs, and OtpWinList::twm_win.
Referenced by GetOwlAtOrBelowInVS(), and InsertOwlAbove().
|
static |
Definition at line 561 of file otp.c.
References OtpWinList::above, OtpWinList::below, DPRINTF, InsertOwl(), InsertOwlAbove(), OwlRightBelow(), PRI, PRI_CP, RaiseSmallTransientsOfAbove(), Scr, and shouldStayAbove().
Referenced by AddNewOwl(), InsertOwl(), LowerOwl(), OtpFocusWindowBE(), OtpRestackWindow(), RaiseOwl(), RecomputeOwlPrefs(), and SetOwlPriority().
|
static |
Definition at line 415 of file otp.c.
References OtpWinList::above, OtpWinList::below, DPRINTF, dpy, GetOwlAtOrBelowInVS(), InsertOwlAbove(), TwmWindow::parent_vs, PRI, Scr, OtpWinList::twm_win, WindowOfOwl(), VirtualScreen::x, and VirtualScreen::y.
Referenced by InsertOwl(), InsertOwlAbove(), OtpForcePlacement(), RaiseSmallTransientsOfAbove(), ReparentWindow(), ReparentWindowAndIcon(), TinyLowerOwl(), and TinyRaiseOwl().
| bool isGroupLeader | ( | TwmWindow * | twm_win | ) |
Definition at line 153 of file otp.c.
References TwmWindow::group, isGroupLeader(), and TwmWindow::w.
Referenced by isGroupLeader(), isGroupLeaderOf(), and OtpAdd().
Definition at line 159 of file otp.c.
References TwmWindow::group, isGroupLeader(), and isGroupLeaderOf().
Referenced by isGroupLeaderOf(), and OtpAdd().
|
static |
Definition at line 693 of file otp.c.
References isHiddenBy(), isIntersectingWith(), and isOnScreen().
Referenced by isHiddenBy(), RaiseLowerOwl(), TinyLowerOwl(), and TinyRaiseOwl().
|
static |
Definition at line 130 of file otp.c.
References BoxesIntersect(), BoxOfOwl(), and isIntersectingWith().
Referenced by isHiddenBy(), and isIntersectingWith().
|
static |
Definition at line 139 of file otp.c.
References TwmWindow::iconified, IconWin, isOnScreen(), TwmWindow::mapped, OCCUPY, Scr, OtpWinList::twm_win, and OtpWinList::type.
Referenced by isHiddenBy(), and isOnScreen().
Definition at line 166 of file otp.c.
References TwmWindow::frame, TwmWindow::frame_height, TwmWindow::frame_width, isSmallTransientOf(), isTransientOf(), main(), and Scr.
Referenced by isSmallTransientOf(), and shouldStayAbove().
Definition at line 148 of file otp.c.
References TwmWindow::istransient, isTransientOf(), main(), and TwmWindow::transientfor.
Referenced by isSmallTransientOf(), isTransientOf(), OtpAdd(), OtpFocusWindowBE(), and TryToMoveTransientsOfTo().
|
static |
Definition at line 686 of file otp.c.
References InsertOwl(), LowerOwl(), RemoveOwl(), and TryToSwitch().
Referenced by LowerOwl(), OtpLower(), and RaiseLowerOwl().
|
static |
Definition at line 1338 of file otp.c.
References new_OtpPreferences(), OTP_MAX, OTP_ZERO, OtpPreferences::priority, OtpPreferences::priorityL, OtpPreferences::switching, and OtpPreferences::switchingL.
Referenced by new_OtpPreferences(), and OtpScrInitData().
|
static |
Definition at line 1109 of file otp.c.
References OtpWinList::above, OtpWinList::below, new_OtpWinList(), OtpWinList::pri_aflags, OtpWinList::pri_base, OtpWinList::stashed_aflags, OtpWinList::switching, OtpWinList::twm_win, OtpWinList::type, and WinWin.
Referenced by AddNewOwl(), and new_OtpWinList().
Definition at line 1222 of file otp.c.
References AddNewOwl(), TwmWindow::icon, IconWin, isGroupLeader(), isGroupLeaderOf(), TwmWindow::istransient, isTransientOf(), TwmWindow::next, Icon::otp, TwmWindow::otp, OtpAdd(), OtpCheckConsistency(), Scr, OtpWinList::switching, and WinWin.
Referenced by AddWindow(), CreateIconWindow(), OtpAdd(), and OtpReassignIcon().
| TwmWindow * OtpBottomWin | ( | void | ) |
Definition at line 1437 of file otp.c.
References OtpWinList::above, OtpBottomWin(), Scr, OtpWinList::twm_win, OtpWinList::type, and WinWin.
Referenced by EwmhSet_NET_CLIENT_LIST_STACKING(), GotoWorkSpace(), OtpBottomWin(), and RestoreForShutdown().
Definition at line 920 of file otp.c.
References TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OtpChangePriority(), OtpCheckConsistency(), OtpWinList::pri_base, SetOwlPriority(), and TryToMoveTransientsOfTo().
Referenced by otp_priority_handler(), and OtpChangePriority().
| bool OtpCheckConsistency | ( | void | ) |
Definition at line 188 of file otp.c.
References VirtualScreen::next, OtpCheckConsistency(), OtpCheckConsistencyVS(), Scr, VirtualScreen::window, VirtualScreen::x, and VirtualScreen::y.
Referenced by DisplayWin(), GotoWorkSpace(), OtpAdd(), OtpChangePriority(), OtpCheckConsistency(), OtpFocusWindowBE(), OtpForcePlacement(), OtpLower(), OtpRaise(), OtpRaiseLower(), OtpRecomputePrefs(), OtpRemove(), OtpRestackWindow(), OtpSetPriority(), OtpSwitchPriority(), OtpTinyLower(), OtpTinyRaise(), OtpToggleSwitching(), ReparentWindow(), and ReparentWindowAndIcon().
|
static |
Definition at line 205 of file otp.c.
References OtpWinList::above, OtpWinList::below, DPRINTF, dpy, TwmWindow::icon, IconWin, TwmWindow::name, TwmWindow::next, TwmWindow::occupation, Icon::otp, TwmWindow::otp, OTP_MAX, OtpCheckConsistencyVS(), OwlPrettyPrint(), TwmWindow::parent_vs, PRI, OtpWinList::pri_base, root, Scr, OtpWinList::twm_win, OtpWinList::type, TwmWindow::vs, WindowOfOwl(), WinWin, VirtualScreen::x, and VirtualScreen::y.
Referenced by OtpCheckConsistency(), and OtpCheckConsistencyVS().
| void OtpCirculateSubwindows | ( | VirtualScreen * | vs, |
| int | direction ) |
Definition at line 849 of file otp.c.
References DPRINTF, dpy, Event, HandleCirculateNotify(), OtpCirculateSubwindows(), and VirtualScreen::window.
Referenced by f_circledown_impl(), f_circleup_impl(), and OtpCirculateSubwindows().
| void OtpClearAflag | ( | TwmWindow * | twm_win, |
| unsigned | flag ) |
Definition at line 1559 of file otp.c.
References TwmWindow::otp, OtpClearAflag(), and OwlClearAflag().
Referenced by OtpClearAflag(), and unzoom().
| int OtpEffectiveDisplayPriority | ( | TwmWindow * | twm_win | ) |
Definition at line 1794 of file otp.c.
References TwmWindow::otp, OTP_ZERO, OtpEffectiveDisplayPriority(), and OwlEffectivePriority().
Referenced by EwmhSet_NET_WM_STATE(), Identify(), OtpEffectiveDisplayPriority(), and OwlPrettyPrint().
| int OtpEffectivePriority | ( | TwmWindow * | twm_win | ) |
Definition at line 1803 of file otp.c.
References TwmWindow::otp, OtpEffectivePriority(), and OwlEffectivePriority().
Referenced by EwmhClientMessage_NET_WM_STATEchange(), OtpEffectivePriority(), and OwlPrettyPrint().
| void OtpFocusWindow | ( | TwmWindow * | twm_win | ) |
Focus a window.
This needs to know internals of OTP because of focus-dependent stacking of it and its transients.
Definition at line 1774 of file otp.c.
References TwmWindow::otp, OtpFocusWindow(), OtpFocusWindowBE(), PRI, and Scr.
Referenced by HandleFocusIn(), OtpFocusWindow(), and SetFocus().
|
static |
Focus/unfocus backend.
This is used on windows whose stacking is focus-dependent (e.g., EWMH fullscreen), to move them and their transients around. For these windows, getting/losing focus is practically the same as a f.setpriority, except it's on the calculated rather than the base parts. And it's hard to re-use our existing functions to do it because we have to move Scr->Focus before the main window changes, but then it's too late to see where all the transients were.
There are a number of unpleasant assumptions in here relating to where the transients are, and IWBNI we could be smarter and quicker about dealing with them. But this gets us past the simple to cause assertion failures, anyway...
Definition at line 1675 of file otp.c.
References OtpWinList::above, InsertOwl(), isTransientOf(), TwmWindow::otp, OtpCheckConsistency(), OtpFocusWindowBE(), RemoveOwl(), Scr, OtpWinList::twm_win, OtpWinList::type, and WinWin.
Referenced by OtpFocusWindow(), OtpFocusWindowBE(), and OtpUnfocusWindow().
Definition at line 990 of file otp.c.
References OtpWinList::below, InsertOwlAbove(), TwmWindow::otp, OtpCheckConsistency(), OtpForcePlacement(), OtpWinList::pri_base, and RemoveOwl().
Referenced by HandleConfigureRequest(), and OtpForcePlacement().
| void OtpFreeIcon | ( | TwmWindow * | twm_win | ) |
Definition at line 1278 of file otp.c.
References TwmWindow::icon, IconWin, OtpFreeIcon(), and OtpRemove().
Referenced by OtpFreeIcon(), and RedoIcon().
| void OtpHandleCirculateNotify | ( | VirtualScreen * | vs, |
| TwmWindow * | twm_win, | ||
| WinType | wintype, | ||
| int | place ) |
Definition at line 877 of file otp.c.
References DPRINTF, OtpHandleCirculateNotify(), OtpLower(), and OtpRaise().
Referenced by HandleCirculateNotify(), and OtpHandleCirculateNotify().
| bool OtpIsFocusDependent | ( | TwmWindow * | twm_win | ) |
Definition at line 1883 of file otp.c.
References TwmWindow::otp, OtpIsFocusDependent(), and OtpWinList::pri_aflags.
Referenced by HandleFocusIn(), HandleFocusOut(), OtpIsFocusDependent(), and SetFocus().
Definition at line 777 of file otp.c.
References EwmhSet_NET_CLIENT_LIST_STACKING(), TwmWindow::icon, IconWin, LowerOwl(), Icon::otp, TwmWindow::otp, OtpCheckConsistency(), and OtpLower().
Referenced by AutoLowerWindow(), f_lower_impl(), HandleConfigureRequest(), OtpHandleCirculateNotify(), and OtpLower().
Definition at line 1467 of file otp.c.
References OtpWinList::below, TwmWindow::otp, OtpNextWinDown(), OtpWinList::twm_win, OtpWinList::type, and WinWin.
Referenced by GotoWorkSpace(), and OtpNextWinDown().
Definition at line 1458 of file otp.c.
References OtpWinList::above, TwmWindow::otp, OtpNextWinUp(), OtpWinList::twm_win, OtpWinList::type, and WinWin.
Referenced by EwmhSet_NET_CLIENT_LIST_STACKING(), GotoWorkSpace(), OtpNextWinUp(), and RestoreForShutdown().
Definition at line 763 of file otp.c.
References EwmhSet_NET_CLIENT_LIST_STACKING(), TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OtpCheckConsistency(), OtpRaise(), and RaiseOwl().
Referenced by AutoRaiseWindow(), AutoSqueeze(), EndResize(), f_movetitlebar_impl(), f_popup_impl(), f_raiseicons_impl(), f_showiconmgr_impl(), f_showworkspacemgr_impl(), f_toggleworkspacemgr_impl(), f_warptoiconmgr_impl(), fullzoom(), HandleButtonPress(), HandleButtonRelease(), HandleConfigureRequest(), HandleEnterNotify(), HandleMapRequest(), Iconify(), jump(), JumpIconManager(), MoveIconManager(), MoveMappedIconManager(), MoveToNextWorkSpaceAndFollow(), MoveToPrevWorkSpaceAndFollow(), movewindow(), OtpHandleCirculateNotify(), OtpRaise(), packwindow(), raise_handler(), RedoIcon(), ReMapOne(), and WMgrHandleButtonEvent().
Definition at line 791 of file otp.c.
References EwmhSet_NET_CLIENT_LIST_STACKING(), TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OtpCheckConsistency(), OtpRaiseLower(), and RaiseLowerOwl().
Referenced by f_raiselower_impl(), HandleConfigureRequest(), and OtpRaiseLower().
Definition at line 1262 of file otp.c.
References TwmWindow::icon, IconWin, Icon::otp, OtpAdd(), and OtpReassignIcon().
Referenced by OtpReassignIcon(), and RedoIcon().
| void OtpRecomputePrefs | ( | TwmWindow * | twm_win | ) |
Definition at line 1073 of file otp.c.
References TwmWindow::icon, Icon::otp, TwmWindow::otp, OtpCheckConsistency(), OtpRecomputePrefs(), RecomputeOwlPrefs(), and Scr.
Referenced by apply_window_name(), and OtpRecomputePrefs().
Definition at line 1094 of file otp.c.
References free_OtpWinList(), TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OtpCheckConsistency(), OtpRemove(), and RemoveOwl().
Referenced by HandleDestroyNotify(), OtpFreeIcon(), and OtpRemove().
| void OtpRestackWindow | ( | TwmWindow * | twm_win | ) |
Definition at line 1648 of file otp.c.
References InsertOwl(), TwmWindow::otp, OtpCheckConsistency(), OtpRestackWindow(), and RemoveOwl().
Referenced by EwmhClientMessage_NET_WM_STATEchange(), fullzoom(), OtpRestackWindow(), and unzoom().
| void OtpScrInitData | ( | ScreenInfo * | scr | ) |
Definition at line 1366 of file otp.c.
References free_OtpPreferences(), ScreenInfo::IconOTP, new_OtpPreferences(), ScreenInfo::OTP, and OtpScrInitData().
Referenced by InitScreenInfo(), and OtpScrInitData().
| name_list ** OtpScrPriorityL | ( | ScreenInfo * | scr, |
| WinType | wintype, | ||
| int | priority ) |
Definition at line 1324 of file otp.c.
References ABS, ScreenInfo::IconOTP, IconWin, ScreenInfo::OTP, OTP_ZERO, OtpScrPriorityL(), and OtpPreferences::priorityL.
Referenced by OtpScrPriorityL().
| void OtpScrSetSwitching | ( | ScreenInfo * | scr, |
| WinType | wintype, | ||
| bool | switching ) |
Definition at line 1297 of file otp.c.
References ScreenInfo::IconOTP, IconWin, ScreenInfo::OTP, OtpScrSetSwitching(), and OtpPreferences::switching.
Referenced by OtpScrSetSwitching().
| void OtpScrSetZero | ( | ScreenInfo * | scr, |
| WinType | wintype, | ||
| int | priority ) |
Definition at line 1309 of file otp.c.
References ABS, ScreenInfo::IconOTP, IconWin, ScreenInfo::OTP, OTP_ZERO, OtpScrSetZero(), and OtpPreferences::priority.
Referenced by OtpScrSetZero().
| name_list ** OtpScrSwitchingL | ( | ScreenInfo * | scr, |
| WinType | wintype ) |
Definition at line 1287 of file otp.c.
References ScreenInfo::IconOTP, IconWin, ScreenInfo::OTP, OtpScrSwitchingL(), and OtpPreferences::switchingL.
Referenced by OtpScrSwitchingL().
| void OtpSetAflag | ( | TwmWindow * | twm_win, |
| unsigned | flag ) |
Definition at line 1541 of file otp.c.
References TwmWindow::otp, OtpSetAflag(), and OwlSetAflag().
Referenced by fullzoom(), and OtpSetAflag().
| void OtpSetAflagMask | ( | TwmWindow * | twm_win, |
| unsigned | mask, | ||
| unsigned | setto ) |
Definition at line 1522 of file otp.c.
References TwmWindow::otp, OtpSetAflagMask(), and OwlSetAflagMask().
Referenced by EwmhClientMessage_NET_WM_STATEchange(), and OtpSetAflagMask().
Definition at line 894 of file otp.c.
References ABS, DPRINTF, TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OTP_ZERO, OtpCheckConsistency(), OtpSetPriority(), SetOwlPriority(), and TryToMoveTransientsOfTo().
Referenced by Occupy(), otp_priority_handler(), and OtpSetPriority().
| void OtpStashAflagsFirstTime | ( | TwmWindow * | twm_win | ) |
Definition at line 1585 of file otp.c.
References TwmWindow::otp, OtpStashAflagsFirstTime(), OwlStashAflags(), and OtpWinList::stashed_aflags.
Referenced by otp_priority_handler(), and OtpStashAflagsFirstTime().
Definition at line 941 of file otp.c.
References TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OTP_MAX, OTP_ZERO, OtpCheckConsistency(), OtpSwitchPriority(), OtpWinList::pri_base, SetOwlPriority(), and TryToMoveTransientsOfTo().
Referenced by otp_priority_handler(), and OtpSwitchPriority().
Definition at line 819 of file otp.c.
References EwmhSet_NET_CLIENT_LIST_STACKING(), TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OtpCheckConsistency(), OtpTinyLower(), and TinyLowerOwl().
Referenced by f_tinylower_impl(), and OtpTinyLower().
Definition at line 805 of file otp.c.
References EwmhSet_NET_CLIENT_LIST_STACKING(), TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OtpCheckConsistency(), OtpTinyRaise(), and TinyRaiseOwl().
Referenced by f_tinyraise_impl(), and OtpTinyRaise().
Definition at line 963 of file otp.c.
References TwmWindow::icon, IconWin, Icon::otp, TwmWindow::otp, OtpCheckConsistency(), OtpToggleSwitching(), and OtpWinList::switching.
Referenced by otp_priority_handler(), and OtpToggleSwitching().
| TwmWindow * OtpTopWin | ( | void | ) |
Definition at line 1446 of file otp.c.
References OtpWinList::above, OtpTopWin(), Scr, OtpWinList::type, and WinWin.
Referenced by GotoWorkSpace(), and OtpTopWin().
| void OtpUnfocusWindow | ( | TwmWindow * | twm_win | ) |
Unfocus a window.
This needs to know internals of OTP because of focus-dependent stacking of it and its transients.
Definition at line 1753 of file otp.c.
References TwmWindow::otp, OtpFocusWindowBE(), OtpUnfocusWindow(), PRI, and Scr.
Referenced by HandleFocusIn(), HandleFocusOut(), OtpUnfocusWindow(), and SetFocus().
|
static |
Definition at line 1568 of file otp.c.
References OwlClearAflag(), OwlStashAflags(), and OtpWinList::pri_aflags.
Referenced by OtpClearAflag(), and OwlClearAflag().
|
static |
Definition at line 1812 of file otp.c.
References EWMH_PRI_ABOVE, EWMH_PRI_DOCK, EWMH_PRI_FULLSCREEN, GetTwmWindow(), TwmWindow::istransient, MAX, MIN, OTP_MAX, OTP_ZERO, OwlEffectivePriority(), OtpWinList::pri_aflags, OtpWinList::pri_base, Scr, TwmWindow::transientfor, OtpWinList::twm_win, and wt_Dock.
Referenced by OtpEffectiveDisplayPriority(), OtpEffectivePriority(), and OwlEffectivePriority().
|
static |
Definition at line 1609 of file otp.c.
References dpy, OwlGetStashedAflags(), OtpWinList::twm_win, OtpWinList::type, TwmWindow::w, and WinWin.
Referenced by AddNewOwl(), and OwlGetStashedAflags().
|
static |
Pretty-print a whole OWL stack.
Works upward from the arg; generally, you'd call this with Scr->bottomOwl.
Definition at line 1485 of file otp.c.
References OtpWinList::above, GetTwmWindow(), TwmWindow::istransient, TwmWindow::name, OtpEffectiveDisplayPriority(), OtpEffectivePriority(), OwlPrettyPrint(), OtpWinList::pri_aflags, OtpWinList::pri_base, TwmWindow::transientfor, OtpWinList::twm_win, OtpWinList::type, TwmWindow::w, and WinWin.
Referenced by OtpCheckConsistencyVS(), and OwlPrettyPrint().
|
static |
Definition at line 538 of file otp.c.
References OtpWinList::above, OwlRightBelow(), PRI, and Scr.
Referenced by InsertOwl(), OwlRightBelow(), and TryToMoveTransientsOfTo().
|
static |
Definition at line 1550 of file otp.c.
References OwlSetAflag(), OwlStashAflags(), and OtpWinList::pri_aflags.
Referenced by OtpSetAflag(), and OwlSetAflag().
|
static |
Definition at line 1530 of file otp.c.
References OwlSetAflagMask(), OwlStashAflags(), and OtpWinList::pri_aflags.
Referenced by OtpSetAflagMask(), and OwlSetAflagMask().
|
static |
Definition at line 1593 of file otp.c.
References dpy, OwlStashAflags(), OtpWinList::pri_aflags, OtpWinList::stashed_aflags, OtpWinList::twm_win, OtpWinList::type, TwmWindow::w, and WinWin.
Referenced by AddNewOwl(), OtpStashAflagsFirstTime(), OwlClearAflag(), OwlSetAflag(), OwlSetAflagMask(), OwlStashAflags(), and RecomputeOwlPrefs().
|
static |
Definition at line 734 of file otp.c.
References OtpWinList::above, isHiddenBy(), LowerOwl(), MAX, OTP_MAX, PRI, RaiseLowerOwl(), RaiseOwl(), and shouldStayAbove().
Referenced by OtpRaiseLower(), and RaiseLowerOwl().
|
static |
Definition at line 678 of file otp.c.
References InsertOwl(), RaiseOwl(), RemoveOwl(), and TryToSwitch().
Referenced by OtpRaise(), RaiseLowerOwl(), and RaiseOwl().
|
static |
Definition at line 517 of file otp.c.
References OtpWinList::below, InsertOwlAbove(), PRI_CP, RaiseSmallTransientsOfAbove(), RemoveOwl(), shouldStayAbove(), OtpWinList::type, and WinWin.
Referenced by InsertOwl(), RaiseSmallTransientsOfAbove(), and TinyRaiseOwl().
|
static |
Definition at line 1048 of file otp.c.
References ApplyPreferences(), EWMH_STATE_ABOVE, EwmhSet_NET_WM_STATE(), InsertOwl(), OwlStashAflags(), OtpWinList::pri_base, RecomputeOwlPrefs(), RemoveOwl(), OtpWinList::stashed_aflags, and OtpWinList::twm_win.
Referenced by OtpRecomputePrefs(), and RecomputeOwlPrefs().
|
static |
Definition at line 357 of file otp.c.
References OtpWinList::above, OtpWinList::below, RemoveOwl(), and Scr.
Referenced by LowerOwl(), OtpFocusWindowBE(), OtpForcePlacement(), OtpRemove(), OtpRestackWindow(), RaiseOwl(), RaiseSmallTransientsOfAbove(), RecomputeOwlPrefs(), RemoveOwl(), ReparentWindow(), ReparentWindowAndIcon(), SetOwlPriority(), TinyLowerOwl(), and TinyRaiseOwl().
| int ReparentWindow | ( | Display * | display, |
| TwmWindow * | twm_win, | ||
| WinType | wintype, | ||
| Window | parent, | ||
| int | x, | ||
| int | y ) |
Definition at line 1378 of file otp.c.
References OtpWinList::below, DPRINTF, TwmWindow::icon, IconWin, InsertOwlAbove(), Icon::otp, TwmWindow::otp, OtpCheckConsistency(), RemoveOwl(), ReparentWindow(), and WindowOfOwl().
Referenced by ReMapOne(), ReparentFrameAndIcon(), ReparentWindow(), and RestoreWinConfig().
| void ReparentWindowAndIcon | ( | Display * | display, |
| TwmWindow * | twm_win, | ||
| Window | parent, | ||
| int | win_x, | ||
| int | win_y, | ||
| int | icon_x, | ||
| int | icon_y ) |
Definition at line 1399 of file otp.c.
References OtpWinList::below, DPRINTF, TwmWindow::frame, TwmWindow::icon, InsertOwlAbove(), Icon::otp, TwmWindow::otp, OtpCheckConsistency(), RemoveOwl(), ReparentWindowAndIcon(), and Icon::w.
Referenced by ReparentFrameAndIcon(), and ReparentWindowAndIcon().
|
static |
Definition at line 600 of file otp.c.
References DPRINTF, InsertOwl(), OTP_MAX, OtpWinList::pri_base, RemoveOwl(), and SetOwlPriority().
Referenced by OtpChangePriority(), OtpSetPriority(), OtpSwitchPriority(), SetOwlPriority(), and TryToMoveTransientsOfTo().
|
static |
Definition at line 509 of file otp.c.
References isSmallTransientOf(), shouldStayAbove(), OtpWinList::twm_win, OtpWinList::type, and WinWin.
Referenced by InsertOwl(), RaiseLowerOwl(), RaiseSmallTransientsOfAbove(), shouldStayAbove(), and TinyRaiseOwl().
|
static |
Definition at line 718 of file otp.c.
References OtpWinList::below, InsertOwlAbove(), isHiddenBy(), PRI, RemoveOwl(), and TinyLowerOwl().
Referenced by OtpTinyLower(), and TinyLowerOwl().
|
static |
Definition at line 700 of file otp.c.
References OtpWinList::above, InsertOwlAbove(), isHiddenBy(), PRI, RaiseSmallTransientsOfAbove(), RemoveOwl(), shouldStayAbove(), and TinyRaiseOwl().
Referenced by OtpTinyRaise(), and TinyRaiseOwl().
|
static |
Definition at line 624 of file otp.c.
References OtpWinList::above, isTransientOf(), OwlRightBelow(), PRI, OtpWinList::pri_aflags, Scr, SetOwlPriority(), TryToMoveTransientsOfTo(), OtpWinList::twm_win, OtpWinList::type, and WinWin.
Referenced by OtpChangePriority(), OtpSetPriority(), OtpSwitchPriority(), TryToMoveTransientsOfTo(), and TryToSwitch().
|
static |
Definition at line 654 of file otp.c.
References OTP_MAX, OtpWinList::pri_base, OtpWinList::switching, TryToMoveTransientsOfTo(), and TryToSwitch().
Referenced by LowerOwl(), RaiseOwl(), and TryToSwitch().
|
static |
Definition at line 182 of file otp.c.
References TwmWindow::frame, TwmWindow::icon, IconWin, OtpWinList::twm_win, OtpWinList::type, Icon::w, and WindowOfOwl().
Referenced by InsertOwlAbove(), OtpCheckConsistencyVS(), ReparentWindow(), and WindowOfOwl().