|
CTWM
|
#include "ctwm.h"#include <stdio.h>#include <stdlib.h>#include <sys/time.h>#include <X11/Xatom.h>#include <X11/extensions/shape.h>#include "add_window.h"#include "animate.h"#include "clicktofocus.h"#include "colormaps.h"#include "ctwm_atoms.h"#include "ctwm_shutdown.h"#include "events.h"#include "event_handlers.h"#include "event_internal.h"#include "event_names.h"#include "functions.h"#include "functions_defs.h"#include "gram.tab.h"#include "iconmgr.h"#include "icons.h"#include "image.h"#include "list.h"#include "occupation.h"#include "otp.h"#include "parse.h"#include "screen.h"#include "util.h"#include "vscreen.h"#include "win_decorations.h"#include "win_iconify.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 "workspace_utils.h"Go to the source code of this file.
Data Structures | |
| struct | HENScanArgs |
| struct | HLNScanArgs |
Macros | |
| #define | MAX_NAME_LEN 200L /* truncate to this many */ |
Typedefs | |
| typedef struct HENScanArgs | HENScanArgs |
| typedef struct HLNScanArgs | HLNScanArgs |
Functions | |
| static void | do_key_menu (MenuRoot *menu, Window w) |
| static void | HandleFocusIn (void) |
| static void | HandleFocusOut (void) |
| static void | SendTakeFocusMessage (TwmWindow *tmp, Time timestamp) |
| static unsigned int | set_mask_ignore (unsigned int modifier) |
| void | HandleColormapNotify (void) |
| static XEvent * | LastFocusEvent (Window w, XEvent *first) |
| void | HandleFocusChange (void) |
| void | HandleCirculateNotify (void) |
| void | HandleVisibilityNotify (void) |
| void | HandleKeyRelease (void) |
| void | HandleKeyPress (void) |
| void | HandlePropertyNotify (void) |
| void | HandleClientMessage (void) |
| static void | flush_expose (Window w) |
| void | HandleExpose (void) |
| static void | remove_window_from_ring (TwmWindow *tmp) |
| void | HandleDestroyNotify (void) |
| void | HandleCreateNotify (void) |
| void | HandleMapRequest (void) |
| void | HandleMapNotify (void) |
| void | HandleUnmapNotify (void) |
| void | HandleMotionNotify (void) |
| void | HandleButtonRelease (void) |
| static void | do_menu (MenuRoot *menu, Window w) |
| void | HandleButtonPress (void) |
| static Bool | HENQueueScanner (Display *display, XEvent *ev, char *_args) |
| void | HandleEnterNotify (void) |
| static Bool | HLNQueueScanner (Display *display, XEvent *ev, char *_args) |
| void | HandleLeaveNotify (void) |
| void | HandleConfigureRequest (void) |
| void | HandleShapeNotify (void) |
| void | HandleUnknown (void) |
Variables | |
| static char * | Action |
| static TwmWindow * | ButtonWindow |
| #define MAX_NAME_LEN 200L /* truncate to this many */ |
Referenced by HandlePropertyNotify().
| typedef struct HENScanArgs HENScanArgs |
| typedef struct HLNScanArgs HLNScanArgs |
|
static |
Definition at line 2564 of file event_handlers.c.
References dpy, Event, PopUpMenu(), Scr, UpdateMenu(), x, and y.
Referenced by HandleKeyPress().
|
static |
Definition at line 2531 of file event_handlers.c.
References dpy, Event, PopUpMenu(), Scr, UpdateMenu(), x, and y.
Referenced by HandleButtonPress().
|
static |
| void HandleButtonPress | ( | void | ) |
Definition at line 2606 of file event_handlers.c.
References Action, MenuItem::action, TitleButtonFunc::action, ActiveItem, ActiveMenu, AlternateContext, AlternateKeymap, ButtonPressed, ButtonWindow, C_ALTERNATE, C_FRAME, C_ICON, C_ICONMGR, C_IDENTIFY, C_NO_CONTEXT, C_ROOT, C_TITLE, C_WINDOW, C_WORKSPACE, Cancel, FuncButton::cont, Context, CurrentDragX, CurrentDragY, do_menu(), DownIconManager, dpy, DragWindow, DrawIconManagerBorder(), Event, ExecuteFunction(), FuncButton::func, TitleButtonFunc::func, TitleButton::funs, GetTwmWindow(), TBWindow::info, FuncButton::item, JunkChild, LeftButt, FuncButton::menu, MenuContext, menuFromFrameOrWindowOrTitlebar, TitleButtonFunc::menuroot, MiddleButt, FuncButton::mods, TitleButtonFunc::mods, mods_used, MoveMenu(), MoveOutline(), FuncButton::next, TitleButtonFunc::next, FuncButton::num, TitleButtonFunc::num, OccupyHandleButtonEvent(), origDragX, origDragY, OtpRaise(), PopDownMenu(), ResizeWindow, RightButt, RootFunction, Scr, set_mask_ignore(), SetFocus(), Tmp_win, UninstallRootColormap(), TBWindow::window, WinWin, WMapRaise(), WMgrHandleButtonEvent(), wt_Desktop, x, and y.
| void HandleButtonRelease | ( | void | ) |
Definition at line 2255 of file event_handlers.c.
References Action, ActiveItem, ActiveMenu, AddToWorkSpace(), AlternateContext, AlternateKeymap, ButtonPressed, ButtonWindow, C_IDENTIFY, C_NO_CONTEXT, Cancel, ConstMove, ConstMoveDir, ConstMoveX, ConstMoveY, ConstrainByBorders(), Context, CurrentDragX, CurrentDragY, WorkSpaceWindow::currentwspc, DownIconManager, dpy, DragBW, DragHeight, DragWidth, DragWindow, DragX, DragY, DrawIconManagerBorder(), EndResize(), enter_flag, enter_win, Event, EventHandler, ExecuteFunction(), GetTwmWindow(), HandleEnterNotify(), HandleLeaveNotify(), IconWin, JunkChild, leave_flag, leave_win, lower_win, MOVE_HORIZ, MOVE_NONE, MOVE_VERT, MoveFunction, MoveOutline(), WorkSpace::name, OtpRaise(), PopDownMenu(), raise_win, RemoveFromWorkSpace(), ResizeWindow, RootFunction, Scr, SetupWindow(), Tmp_win, TryToGrid(), TryToPack(), TryToPush(), UninstallRootColormap(), WarpCursorToDefaultEntry(), VirtualScreen::window, WinWin, and VirtualScreen::wsw.
| void HandleCirculateNotify | ( | void | ) |
Definition at line 439 of file event_handlers.c.
References Event, TwmWindow::frame, GetTwmWindow(), TwmWindow::icon, IconWin, VirtualScreen::next, OtpHandleCirculateNotify(), Scr, Icon::w, VirtualScreen::window, and WinWin.
Referenced by OtpCirculateSubwindows().
| void HandleClientMessage | ( | void | ) |
Definition at line 1543 of file event_handlers.c.
References Animating, dpy, Event, EwmhClientMessage(), ExecuteFunction(), JunkChild, JunkMask, JunkRoot, JunkX, JunkY, Scr, and Tmp_win.
| void HandleColormapNotify | ( | void | ) |
Definition at line 107 of file event_handlers.c.
References TwmColormap::c, CM_INSTALLABLE, CM_INSTALLED, ColormapWindow::colormap, ColormapContext, ColortableThrashing, CreateTwmColormap(), dpy, Event, InstallColormaps(), TwmColormap::refcnt, Scr, and TwmColormap::state.
| void HandleConfigureRequest | ( | void | ) |
Definition at line 3679 of file event_handlers.c.
References dpy, Event, GetGravityOffsets(), GetTwmWindow(), OtpForcePlacement(), OtpLower(), OtpRaise(), OtpRaiseLower(), Scr, SetupFrame(), Tmp_win, unzoom(), WinWin, x, and y.
| void HandleCreateNotify | ( | void | ) |
Definition at line 1901 of file event_handlers.c.
| void HandleDestroyNotify | ( | void | ) |
Definition at line 1720 of file event_handlers.c.
References DeleteHighlightWindows(), DeleteIcon(), DeleteIconsList(), dpy, EwmhDeleteClientWindow(), EwmhSet_NET_CLIENT_LIST_STACKING(), FocusOnRoot(), free_cwins(), FreeWMPropertyString(), IconDown(), IconWin, InstallColormaps(), WorkSpace::next, NoName, OtpRemove(), remove_window_from_ring(), RemoveIconManager(), RemoveWindowFromRegion(), WorkSpace::save_focus, Scr, ScreenContext, set_last_window(), Tmp_win, TwmContext, Icon::w, Icon::w_not_ours, WinWin, and WMapRemoveWindow().
Referenced by HandleUnmapNotify().
| void HandleEnterNotify | ( | void | ) |
Definition at line 3073 of file event_handlers.c.
References ActiveItem, ActiveMenu, AutoRaiseWindow(), C_ROOT, ColormapContext, Context, CurrentIconManagerEntry(), DoesWmTakeFocus, dpy, enter_flag, enter_win, MenuRoot::entered, HENScanArgs::enters, Event, ExpandIconTitle(), VirtualScreen::h, HENQueueScanner(), HideMenu(), IconWin, InstallColormaps(), InstallWindowColormaps(), JunkChild, JunkMask, JunkRoot, HENScanArgs::leaves, MenuContext, MenuDepth, MenuItem::next, VirtualScreen::next, OtpRaise(), PaintEntry(), MenuRoot::pinned, PopUpMenu(), MenuRoot::prev, raise_win, RaiseDelay, RootFunction, Scr, SendTakeFocusMessage(), SetBorderCursor(), SetFocus(), SynthesiseFocusIn(), Tmp_win, UninstallRootColormap(), UpdateMenu(), ColormapWindow::visibility, HENScanArgs::w, VirtualScreen::w, VirtualScreen::window, WindowIsOnRing, VirtualScreen::x, x, VirtualScreen::y, and y.
Referenced by HandleButtonRelease().
| void HandleExpose | ( | void | ) |
Definition at line 1591 of file event_handlers.c.
References dpy, draw_info_window(), DrawIconManagerIconName(), Event, flush_expose(), WList::icon, LookInList(), MenuContext, VirtualScreen::next, PaintBorders(), PaintIcon(), PaintMenu(), PaintOccupyWindow(), PaintTitle(), PaintTitleButton(), Scr, ShowIconifiedIcon(), Tmp_win, WorkSpaceWindow::twm_win, WList::w, TBWindow::window, WMgrHandleExposeEvent(), and VirtualScreen::wsw.
Referenced by DispatchEvent2().
| void HandleFocusChange | ( | void | ) |
Definition at line 314 of file event_handlers.c.
References Event, HandleFocusIn(), HandleFocusOut(), LastFocusEvent(), and Tmp_win.
Referenced by InitEvents().
|
static |
Definition at line 369 of file event_handlers.c.
References AutoSqueeze(), OtpFocusWindow(), OtpIsFocusDependent(), OtpUnfocusWindow(), Scr, SetFocusVisualAttributes(), and Tmp_win.
Referenced by HandleFocusChange().
|
static |
Definition at line 405 of file event_handlers.c.
References AutoSqueeze(), OtpIsFocusDependent(), OtpUnfocusWindow(), Scr, SetFocusVisualAttributes(), and Tmp_win.
Referenced by HandleFocusChange().
| void HandleKeyPress | ( | void | ) |
Definition at line 545 of file event_handlers.c.
References MenuItem::action, ActiveItem, ActiveMenu, AlternateContext, AlternateKeymap, ButtonWindow, C_ALTERNATE, C_FRAME, C_ICON, C_ICONMGR, C_NAME, C_NO_CONTEXT, C_ROOT, C_TITLE, C_WINDOW, C_WORKSPACE, Context, CurrentSelectedWorkspace, do_key_menu(), dpy, Event, ExecuteFunction(), MenuItem::func, GetTwmWindow(), GotoWorkSpaceByName(), MenuRoot::height, Islower, Isupper, MenuItem::item, MenuItem::item_num, MenuRoot::lastactive, len, MenuDepth, mods_used, MenuItem::next, PaintEntry(), PopDownMenu(), Scr, set_mask_ignore(), MenuItem::sub, Tmp_win, Tolower, MenuRoot::w, MenuRoot::width, WMgrHandleKeyPressEvent(), and wt_Desktop.
| void HandleKeyRelease | ( | void | ) |
Definition at line 526 of file event_handlers.c.
References Event, Scr, Tmp_win, and WMgrHandleKeyReleaseEvent().
| void HandleLeaveNotify | ( | void | ) |
Definition at line 3496 of file event_handlers.c.
References ActiveMenu, AutoLowerWindow(), DoesWmTakeFocus, dpy, HLNScanArgs::enters, Event, HLNQueueScanner(), InstallColormaps(), leave_flag, leave_win, lower_win, HLNScanArgs::matches, PopDownMenu(), Scr, SetFocus(), ShrinkIconTitle(), SynthesiseFocusOut(), Tmp_win, and HLNScanArgs::w.
Referenced by HandleButtonRelease().
| void HandleMapNotify | ( | void | ) |
Definition at line 2068 of file event_handlers.c.
| void HandleMapRequest | ( | void | ) |
Definition at line 1921 of file event_handlers.c.
References AddIconManager(), AddToWorkSpace(), AddWindow(), AWT_NORMAL, DeIconify(), dpy, Event, EWMH_STATE_ALL, EwmhAddClientWindow(), EwmhSet_NET_CLIENT_LIST_STACKING(), EwmhSet_NET_WM_STATE(), GetTwmWindow(), GetWMState(), HandlingEvents, Iconify(), LookInList(), MaybeAnimate, OCCUPY, OtpRaise(), RestartPreviousState, Scr, SetFocus(), SetMapStateProp(), SetRaiseWindow(), Squeeze(), Tmp_win, WinWin, and WMapMapWindow().
Referenced by SimulateMapRequest().
| void HandleMotionNotify | ( | void | ) |
Definition at line 2215 of file event_handlers.c.
References DoResize(), dpy, Event, FixRootEvent(), GetTwmWindow(), JunkChild, JunkMask, ResizeOrigX, ResizeOrigY, ResizeWindow, Scr, SetBorderCursor(), Tmp_win, and WindowMoved.
| void HandlePropertyNotify | ( | void | ) |
Definition at line 1125 of file event_handlers.c.
References AllocImage(), apply_window_icon_name(), apply_window_name(), AutoPopupMaybe(), ColorPair::back, Icon::bm_w, ChangeOccupation(), dpy, Event, EwmhHandlePropertyNotify(), FB, FetchWmColormapWindows(), FetchWmProtocols(), ColorPair::fore, FreeWMPropertyString(), GetIconOffset(), GetMaskFromProperty(), GetWindowSizeHints(), GetWMPropertyString(), GotoWorkSpaceByName(), Icon::height, Image::height, Icon::iconc, Icon::image, InsertRGBColormap(), JunkBW, JunkDepth, JunkHeight, JunkRoot, JunkWidth, JunkX, JunkY, Image::mask, Icon::match, match_icon_pixmap_hint, match_net_wm_icon, MAX_NAME_LEN, munge_wmhints(), Image::pixmap, RedoIconName(), ReleaseIconImage(), RemoveRGBColormap(), Scr, ScreenContext, Tmp_win, TwmContext, Icon::w, Icon::w_not_ours, Icon::width, Image::width, and x.
| void HandleShapeNotify | ( | void | ) |
Definition at line 3854 of file event_handlers.c.
References dpy, Event, SetFrameShape(), and Tmp_win.
Referenced by InitEvents().
| void HandleUnknown | ( | void | ) |
Definition at line 3900 of file event_handlers.c.
References Event.
Referenced by f_movetitlebar_impl(), f_resize_impl(), InitEvents(), and movewindow().
| void HandleUnmapNotify | ( | void | ) |
Definition at line 2131 of file event_handlers.c.
References dpy, Event, EwmhUnmapNotify(), GetTwmWindow(), HandleDestroyNotify(), RestoreWinConfig(), SetMapStateProp(), and Tmp_win.
| void HandleVisibilityNotify | ( | void | ) |
Definition at line 488 of file event_handlers.c.
References CM_INSTALLABLE, ColormapWindow::colormap, ColormapContext, dpy, Event, InstallWindowColormaps(), TwmColormap::state, ColormapWindow::visibility, ColormapWindow::w, and TwmColormap::w.
|
static |
Definition at line 3040 of file event_handlers.c.
References HENScanArgs::enters, HENScanArgs::inferior, HENScanArgs::leaves, and HENScanArgs::w.
Referenced by HandleEnterNotify().
|
static |
Definition at line 3473 of file event_handlers.c.
References HLNScanArgs::enters, HLNScanArgs::matches, and HLNScanArgs::w.
Referenced by HandleLeaveNotify().
|
static |
Definition at line 263 of file event_handlers.c.
Referenced by HandleFocusChange().
|
static |
Definition at line 1691 of file event_handlers.c.
References enter_flag, enter_win, leave_flag, leave_win, lower_win, raise_win, Tmp_win, and UnlinkWindowFromRing().
Referenced by HandleDestroyNotify().
|
static |
Definition at line 3920 of file event_handlers.c.
References send_clientmessage(), and TwmWindow::w.
Referenced by HandleEnterNotify().
|
static |
Definition at line 87 of file event_handlers.c.
References Scr.
Referenced by HandleButtonPress(), and HandleKeyPress().
|
static |
Definition at line 80 of file event_handlers.c.
Referenced by GotButton(), GotKey(), GotTitleButton(), HandleButtonPress(), and HandleButtonRelease().
|
static |
Definition at line 82 of file event_handlers.c.
Referenced by HandleButtonPress(), HandleButtonRelease(), and HandleKeyPress().