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 |
Variables | |
static char * | Action |
static TwmWindow * | ButtonWindow |
Definition at line 2564 of file event_handlers.c.
References dpy, Event, PlaceX, PopUpMenu(), Scr, UpdateMenu(), x, and y.
Referenced by HandleKeyPress().
Definition at line 2531 of file event_handlers.c.
References dpy, Event, PlaceX, PopUpMenu(), Scr, UpdateMenu(), x, and y.
Referenced by HandleButtonPress().
Definition at line 3908 of file event_handlers.c.
Referenced by HandleExpose().
Definition at line 2606 of file event_handlers.c.
References 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, Context, CurrentDragX, CurrentDragY, do_menu(), WList::down, DownIconManager, dpy, DragWindow, DrawIconManagerBorder(), Event, ExecuteFunction(), TwmWindow::frame, TwmWindow::frame_bw3D, MenuItem::func, GetTwmWindow(), WList::icon, TwmWindow::icon, TwmWindow::iconmanagerlist, WList::iconmgr, TwmWindow::iswspmgr, JunkChild, LeftButt, MenuContext, menuFromFrameOrWindowOrTitlebar, MiddleButt, mods_used, MoveMenu(), MoveOutline(), OccupyHandleButtonEvent(), origDragX, origDragY, OtpRaise(), MenuRoot::pinned, PlaceX, PopDownMenu(), ResizeWindow, RightButt, RootFunction, Scr, set_mask_ignore(), SetFocus(), TwmWindow::title_height, TwmWindow::title_w, TwmWindow::titlebuttons, Tmp_win, IconMgr::twm_win, UninstallRootColormap(), WList::w, Icon::w, MenuRoot::w, TwmWindow::w, WinWin, WMapRaise(), WMgrHandleButtonEvent(), TwmWindow::wmhints, wt_Desktop, x, and y.
Definition at line 2255 of file event_handlers.c.
References Action, MenuItem::action, ActiveItem, ActiveMenu, AddToWorkSpace(), AlternateContext, AlternateKeymap, ButtonPressed, ButtonWindow, C_IDENTIFY, C_NO_CONTEXT, Cancel, ConstMove, ConstMoveDir, ConstMoveX, ConstMoveY, ConstrainByBorders(), Context, CurrentDragX, CurrentDragY, WorkSpaceWindow::currentwspc, MenuRoot::defaultitem, WList::down, DownIconManager, dpy, DragBW, DragHeight, DragWidth, DragWindow, DragX, DragY, DrawIconManagerBorder(), EndResize(), enter_flag, enter_win, MenuRoot::entered, Event, EventHandler, ExecuteFunction(), TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_height, TwmWindow::frame_width, MenuItem::func, GetTwmWindow(), HandleEnterNotify(), HandleLeaveNotify(), TwmWindow::icon, IconWin, JunkChild, leave_flag, leave_win, lower_win, MOVE_HORIZ, MOVE_NONE, MOVE_VERT, MoveFunction, MoveOutline(), WorkSpace::name, OtpRaise(), PlaceX, PopDownMenu(), raise_win, RemoveFromWorkSpace(), ResizeWindow, RootFunction, Scr, SetupWindow(), Tmp_win, TryToGrid(), TryToPack(), TryToPush(), UninstallRootColormap(), TwmWindow::vs, Icon::w, Icon::w_x, Icon::w_y, WarpCursorToDefaultEntry(), VirtualScreen::window, WinWin, and VirtualScreen::wsw.
Definition at line 439 of file event_handlers.c.
References Event, TwmWindow::frame, GetTwmWindow(), TwmWindow::icon, IconWin, VirtualScreen::next, OtpHandleCirculateNotify(), PlaceX, Scr, Icon::w, VirtualScreen::window, and WinWin.
Referenced by OtpCirculateSubwindows().
Definition at line 1543 of file event_handlers.c.
References Animating, dpy, Event, EwmhClientMessage(), ExecuteFunction(), TwmWindow::isicon, JunkChild, JunkMask, JunkRoot, JunkX, JunkY, PlaceX, Scr, and Tmp_win.
Definition at line 107 of file event_handlers.c.
References CM_INSTALLABLE, CM_INSTALLED, ColormapContext, ColortableThrashing, CreateTwmColormap(), dpy, Event, InstallColormaps(), PlaceX, and Scr.
Definition at line 3679 of file event_handlers.c.
References dpy, Event, TwmWindow::frame_bw, TwmWindow::frame_bw3D, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, GetGravityOffsets(), GetTwmWindow(), TwmWindow::icon, TwmWindow::old_bw, OtpForcePlacement(), OtpLower(), OtpRaise(), OtpRaiseLower(), PlaceX, Scr, SetupFrame(), TwmWindow::stackmode, TwmWindow::title_height, Tmp_win, unzoom(), Icon::w, WinWin, x, and y.
Definition at line 1901 of file event_handlers.c.
Definition at line 1720 of file event_handlers.c.
References TwmWindow::auto_lower, TwmWindow::auto_raise, TwmWindow::class, TwmWindow::cmaps, TwmWindow::_names::ctwm_wm_icon_name, TwmWindow::_names::ctwm_wm_name, DeleteHighlightWindows(), DeleteIcon(), DeleteIconsList(), dpy, EwmhDeleteClientWindow(), EwmhSet_NET_CLIENT_LIST_STACKING(), FocusOnRoot(), TwmWindow::frame, free_cwins(), FreeWMPropertyString(), TwmWindow::gray, TwmWindow::hilite_wl, TwmWindow::hilite_wr, TwmWindow::icon, IconDown(), IconWin, InstallColormaps(), TwmWindow::lolite_wl, TwmWindow::lolite_wr, TwmWindow::names, TwmWindow::next, NoName, TwmWindow::occupation, OtpRemove(), PlaceX, TwmWindow::prev, remove_window_from_ring(), RemoveIconManager(), RemoveWindowFromRegion(), WorkSpace::save_focus, Scr, ScreenContext, set_last_window(), TwmWindow::squeeze_info, TwmWindow::squeeze_info_copied, TwmWindow::title_height, TwmWindow::title_w, TwmWindow::titlebuttons, Tmp_win, TwmContext, Icon::w, TwmWindow::w, Icon::w_not_ours, TBWindow::window, WinWin, TwmWindow::_names::wm_icon_name, TwmWindow::_names::wm_name, WMapRemoveWindow(), and TwmWindow::wmhints.
Referenced by HandleUnmapNotify().
Definition at line 3073 of file event_handlers.c.
References ActiveItem, ActiveMenu, TwmWindow::auto_raise, AutoRaiseWindow(), C_ROOT, ColormapContext, Context, CurrentIconManagerEntry(), DoesWmTakeFocus, dpy, enter_flag, enter_win, Event, ExpandIconTitle(), MenuRoot::first, TwmWindow::frame, VirtualScreen::h, HENQueueScanner(), HideMenu(), TwmWindow::icon, TwmWindow::iconmanagerlist, WList::iconmgr, IconWin, InstallColormaps(), InstallWindowColormaps(), JunkChild, JunkMask, JunkRoot, TwmWindow::mapped, MenuContext, MenuDepth, VirtualScreen::next, OtpRaise(), PaintEntry(), MenuRoot::pinned, PlaceX, PopUpMenu(), MenuRoot::prev, TwmWindow::protocols, raise_win, RaiseDelay, RootFunction, Scr, SendTakeFocusMessage(), SetBorderCursor(), SetFocus(), MenuItem::state, SynthesiseFocusIn(), Tmp_win, IconMgr::twm_win, UninstallRootColormap(), UpdateMenu(), WList::w, Icon::w, MenuRoot::w, TwmWindow::w, VirtualScreen::w, VirtualScreen::window, WindowIsOnRing, TwmWindow::wmhints, x, VirtualScreen::x, y, and VirtualScreen::y.
Referenced by HandleButtonRelease().
Definition at line 1591 of file event_handlers.c.
References TwmWindow::class, dpy, draw_info_window(), DrawIconManagerIconName(), Event, flush_expose(), TwmWindow::frame, WList::icon, TwmWindow::icon, TwmWindow::iconmanagerlist, LookInList(), MenuContext, TwmWindow::name, VirtualScreen::next, PaintBorders(), PaintIcon(), PaintMenu(), PaintOccupyWindow(), PaintTitle(), PaintTitleButton(), PlaceX, Scr, ShowIconifiedIcon(), TwmWindow::title_w, TwmWindow::titlebuttons, Tmp_win, WorkSpaceWindow::twm_win, WList::w, Icon::w, TBWindow::window, WMgrHandleExposeEvent(), and VirtualScreen::wsw.
Referenced by DispatchEvent2().
Definition at line 314 of file event_handlers.c.
References Event, HandleFocusIn(), HandleFocusOut(), TwmWindow::isiconmgr, LastFocusEvent(), PlaceX, Tmp_win, and TwmWindow::w.
Referenced by InitEvents().
Definition at line 369 of file event_handlers.c.
References TwmWindow::AutoSqueeze, AutoSqueeze(), OtpFocusWindow(), OtpIsFocusDependent(), OtpUnfocusWindow(), Scr, SetFocusVisualAttributes(), TwmWindow::squeezed, Tmp_win, and TwmWindow::wmhints.
Referenced by HandleFocusChange().
Definition at line 405 of file event_handlers.c.
References TwmWindow::AutoSqueeze, AutoSqueeze(), OtpIsFocusDependent(), OtpUnfocusWindow(), PlaceX, Scr, SetFocusVisualAttributes(), TwmWindow::squeezed, and Tmp_win.
Referenced by HandleFocusChange().
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, TwmWindow::class, Context, CurrentSelectedWorkspace, do_key_menu(), dpy, Event, ExecuteFunction(), MenuRoot::first, TwmWindow::frame, MenuItem::func, GetTwmWindow(), GotoWorkSpaceByName(), MenuRoot::height, WList::icon, TwmWindow::icon, TwmWindow::iconmanagerlist, Islower, Isupper, TwmWindow::iswspmgr, MenuItem::item, MenuItem::item_num, MenuRoot::lastactive, len, MenuDepth, mods_used, TwmWindow::name, MenuItem::next, FuncKey::next, TwmWindow::next, PaintEntry(), MenuRoot::pinned, PlaceX, PopDownMenu(), MenuRoot::prev, Scr, set_mask_ignore(), MenuRoot::shadow, MenuItem::state, MenuItem::sub, TwmWindow::title_w, Tmp_win, Tolower, WList::w, Icon::w, MenuRoot::w, TwmWindow::w, MenuRoot::width, WMgrHandleKeyPressEvent(), wt_Desktop, and MenuItem::x.
Definition at line 526 of file event_handlers.c.
References Event, Scr, Tmp_win, and WMgrHandleKeyReleaseEvent().
Definition at line 3496 of file event_handlers.c.
References ActiveMenu, TwmWindow::auto_lower, AutoLowerWindow(), TwmWindow::_ring::curs_x, TwmWindow::_ring::curs_y, TwmWindow::_ring::cursor_valid, DoesWmTakeFocus, dpy, Event, TwmWindow::frame, TwmWindow::frame_x, TwmWindow::frame_y, HLNQueueScanner(), TwmWindow::icon, TwmWindow::iconmanagerlist, InstallColormaps(), leave_flag, leave_win, lower_win, TwmWindow::mapped, MenuRoot::pinned, PlaceX, PopDownMenu(), TwmWindow::protocols, TwmWindow::ring, Scr, SetFocus(), ShrinkIconTitle(), SynthesiseFocusOut(), Tmp_win, HLNScanArgs::w, WList::w, Icon::w, MenuRoot::w, TwmWindow::w, and TwmWindow::wmhints.
Referenced by HandleButtonRelease().
Definition at line 2068 of file event_handlers.c.
References dpy, TwmWindow::frame, TwmWindow::hilite_wl, TwmWindow::hilite_wr, TwmWindow::icon, TwmWindow::icon_on, TwmWindow::isicon, TwmWindow::lolite_wl, TwmWindow::lolite_wr, TwmWindow::mapped, PlaceX, Scr, Tmp_win, and Icon::w.
Definition at line 1921 of file event_handlers.c.
References AddIconManager(), AddToWorkSpace(), AddWindow(), AWT_NORMAL, TwmWindow::class, DeIconify(), dpy, Event, EWMH_STATE_ALL, EwmhAddClientWindow(), EwmhSet_NET_CLIENT_LIST_STACKING(), EwmhSet_NET_WM_STATE(), TwmWindow::frame, GetTwmWindow(), GetWMState(), HandlingEvents, Iconify(), TwmWindow::iconmanagerlist, TwmWindow::isicon, TwmWindow::isiconmgr, TwmWindow::istransient, LookInList(), TwmWindow::mapped, MaybeAnimate, TwmWindow::name, OCCUPY, OtpRaise(), PlaceX, RestartPreviousState, Scr, SetFocus(), SetMapStateProp(), SetRaiseWindow(), Squeeze(), TwmWindow::squeezed, TwmWindow::StartSqueezed, Tmp_win, TwmWindow::UnmapByMovingFarAway, TwmWindow::w, WinWin, WMapMapWindow(), and TwmWindow::wmhints.
Referenced by SimulateMapRequest().
Definition at line 2215 of file event_handlers.c.
References DoResize(), dpy, Event, FixRootEvent(), TwmWindow::frame, GetTwmWindow(), JunkChild, JunkMask, PlaceX, ResizeOrigX, ResizeOrigY, ResizeWindow, Scr, SetBorderCursor(), Tmp_win, and WindowMoved.
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(), TwmWindow::_names::ctwm_wm_icon_name, TwmWindow::_names::ctwm_wm_name, dpy, Event, EwmhHandlePropertyNotify(), FB, FetchWmColormapWindows(), FetchWmProtocols(), TwmWindow::forced, ColorPair::fore, FreeWMPropertyString(), GetIconOffset(), GetMaskFromProperty(), GetWindowSizeHints(), GetWMPropertyString(), GotoWorkSpaceByName(), Icon::height, Image::height, TwmWindow::icon, Icon::iconc, Icon::image, InsertRGBColormap(), TwmWindow::isicon, JunkBW, JunkDepth, JunkHeight, JunkRoot, JunkWidth, JunkX, JunkY, Image::mask, Icon::match, match_icon_pixmap_hint, match_net_wm_icon, MAX_NAME_LEN, munge_wmhints(), TwmWindow::names, Image::pixmap, PlaceX, RedoIconName(), ReleaseIconImage(), RemoveRGBColormap(), Scr, ScreenContext, Tmp_win, TwmContext, Icon::w, TwmWindow::w, Icon::w_not_ours, Icon::width, Image::width, TwmWindow::_names::wm_icon_name, TwmWindow::_names::wm_name, TwmWindow::wmhints, and x.
Definition at line 3854 of file event_handlers.c.
References dpy, Event, TwmWindow::frame, PlaceX, SetFrameShape(), Tmp_win, and TwmWindow::wShaped.
Referenced by InitEvents().
Definition at line 3900 of file event_handlers.c.
Referenced by f_movetitlebar_impl(), f_resize_impl(), InitEvents(), and movewindow().
Definition at line 2131 of file event_handlers.c.
References TwmWindow::attr, dpy, Event, EwmhUnmapNotify(), TwmWindow::frame, GetTwmWindow(), HandleDestroyNotify(), TwmWindow::icon, TwmWindow::isicon, TwmWindow::mapped, TwmWindow::old_bw, PlaceX, RestoreWinConfig(), SetMapStateProp(), Tmp_win, Icon::w, and TwmWindow::wmhints.
Definition at line 488 of file event_handlers.c.
References CM_INSTALLABLE, ColormapContext, dpy, Event, InstallWindowColormaps(), PlaceX, and TwmColormap::state.
Definition at line 3040 of file event_handlers.c.
References HENScanArgs::leaves, and PlaceX.
Referenced by HandleEnterNotify().
Definition at line 3473 of file event_handlers.c.
References HLNScanArgs::enters, and PlaceX.
Referenced by HandleLeaveNotify().
Definition at line 263 of file event_handlers.c.
References dpy, PlaceX, and Tmp_win.
Referenced by HandleFocusChange().
Definition at line 1691 of file event_handlers.c.
References enter_flag, enter_win, leave_flag, leave_win, lower_win, PlaceX, raise_win, Tmp_win, and UnlinkWindowFromRing().
Referenced by HandleDestroyNotify().
Definition at line 3920 of file event_handlers.c.
References PlaceX, and send_clientmessage().
Referenced by HandleEnterNotify().
Definition at line 87 of file event_handlers.c.
References PlaceX.
Referenced by HandleButtonPress(), and HandleKeyPress().
|
static |
Definition at line 80 of file event_handlers.c.
Referenced by HandleButtonPress(), and HandleButtonRelease().
|
static |
Definition at line 82 of file event_handlers.c.
Referenced by HandleButtonPress(), HandleButtonRelease(), and HandleKeyPress().