summaryrefslogtreecommitdiff
path: root/src/twm.c
AgeCommit message (Collapse)Author
2024-03-16Fix memory leak in FindFontSetTim Wiederhake
Valgrind results before: definitely lost: 800 bytes in 23 blocks indirectly lost: 872 bytes in 6 blocks possibly lost: 0 bytes in 0 blocks still reachable: 991,316 bytes in 1,795 blocks suppressed: 0 bytes in 0 blocks Valgrind results after: definitely lost: 200 bytes in 17 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 0 bytes in 0 blocks still reachable: 918,812 bytes in 994 blocks suppressed: 0 bytes in 0 blocks Signed-off-by: Tim Wiederhake <twied@gmx.net> Part-of: <https://gitlab.freedesktop.org/xorg/app/twm/-/merge_requests/29>
2024-03-16Fix memory leak in SaveYourselfPhase2CBTim Wiederhake
Valgrind results before: definitely lost: 981 bytes in 37 blocks indirectly lost: 872 bytes in 6 blocks possibly lost: 0 bytes in 0 blocks still reachable: 991,316 bytes in 1,795 blocks suppressed: 0 bytes in 0 blocks Valgrind results after: definitely lost: 800 bytes in 23 blocks indirectly lost: 872 bytes in 6 blocks possibly lost: 0 bytes in 0 blocks still reachable: 991,316 bytes in 1,795 blocks suppressed: 0 bytes in 0 blocks Signed-off-by: Tim Wiederhake <twied@gmx.net> Part-of: <https://gitlab.freedesktop.org/xorg/app/twm/-/merge_requests/29>
2024-03-07Provide defaults for externally defined symbolsTim Wiederhake
AM_CPPFLAGS defines several symbols that do not have to be there. By providing default values in twm.h, this list can be reduced in size while still allowing to override these values. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-03-05include "gram.h" only from "parse.h"Thomas E. Dickey
all of the users of (generated) gram.h rely upon (custom) parse.h, and the order of those headers affects portability. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2024-01-21Add explicit cast after memory allocationTim Wiederhake
Still valid c, but now also valid c++. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Accomodate different field names when compiling with c++Tim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Rename field 'delete' to 'remove' in TitlebarPixmapsTim Wiederhake
'delete' is a keyword in c++. Its usage confuses some tools that work with c and c++ source code. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove global variables JunkWidth, JunkHeight, JunkBW, JunkDepth, JunkMaskTim Wiederhake
Replace with a local variable following the naming scheme from Identify() in src/menus.c. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove global variables JunkX, JunkYTim Wiederhake
Replace with a local variable following the naming scheme from Identify() in src/menus.c. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove global variables JunkRoot, JunkChildTim Wiederhake
Replace with a local variable following the naming scheme from Identify() in src/menus.c. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make XtSignalId si staticTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make FirstScreen a local variableTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make appContext a local variableTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make InitFile a local variableTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make MultiScreen a local variableTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Split up InitMenusTim Wiederhake
Preparation for the removal of FirstScreen: Separate code that is executed for all screens from code that is executed for only the first screen. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove now unused NoPrintscreens variableTim Wiederhake
Support for xprint was removed in commit 0ce52bc9ed. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Make atom_names const correctTim Wiederhake
Silence some "initialization discards 'const' qualifier from pointer target type" warnings. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove support for xprintTim Wiederhake
xprint is deprecated and was removed from xorg in 2008. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2021-11-28Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-06-21add/use new function parseWarning, which honors -v/-q optionsThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-20make the "-V" version print less cluttered (and more like most programs)Thomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-19add/use functions to make warning messages more consistently use the program ↵Thomas E. Dickey
name as a prefix Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-18fix the cppcheck style- and format-warningsThomas E. Dickey
also bump version to 1.0.11.1, reflecting ongoing work since release Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-17allow most options to be long/abbreviatable for consistency,Thomas E. Dickey
and document (except for the print-extension) all of the options Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-17add "-V" version-messageThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-17eliminate some unnecessary(?) goto statementsThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-11-23Formatted most of the C files using "twm-indent", part of cindent atThomas E. Dickey
https://invisible-island.net/cindent/ That is essentially a script which adds typedefs to the x-indent.sh script. No object-code changed in this reformatting. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-16issue 2: twm doesn't handle RandR screen size changesThomas E. Dickey
patch submitted by Preston Crow modified to check if xrandr development header/library is available Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-16caddr_t used to be used in X code before XPointer was established; it's ↵Thomas E. Dickey
obsolete and less portable Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-16gcc-stricter warnings, no object changeThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-15fix gcc-normal compiler warnings, no object changeThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2013-08-18Stop casting return values from malloc & callocAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-18Stop casting pointers to (char *) when freeing themAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-31Make more functions static that aren't called from other filesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-31Assume C89 signal handlers, returning voidAlan Coopersmith
Removes old #ifdef SIGNALRETURNSINT check that was never defined in autoconf builds, only old Imake builds. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-31Make some more previously global variables into file-scoped staticsAlan Coopersmith
Not used from other source files, so no need to export them Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-31Use (void) to declare functions that take no arguments, instead of ()Alan Coopersmith
It's time for C89. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: <wharms@bfs.de>
2013-07-18Constification cleanup - fix dozens of gcc warningsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-07-14Whitespace fixes in src filesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
2005-03-11xc/programs/twm/Imakefilesco_port_update-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_14XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1sco_port_updateRoland Mainz
xc/programs/twm/twm.c //bugs.freedesktop.org/show_bug.cgi?id=2705) attachment #2087 (https://bugs.freedesktop.org/attachment.cgi?id=2087) Make twm ignore print screens to avoid that users accidentally warp on a non-video screen (which are not visible on any monitor) when the Xserver has both video and print screens. (This includes also a small cleanup of xdpyinfo where parts of the print screen test code comes from) Patch by Julien Lafon <julien.lafon@gmail.com> (MIT/X.org license).
2005-03-11xc/programs/twm/add_window.cRoland Mainz
xc/programs/twm/cursor.c xc/programs/twm/events.c xc/programs/twm/gc.c xc/programs/twm/gram.y xc/programs/twm/iconmgr.c xc/programs/twm/icons.c xc/programs/twm/list.c xc/programs/twm/menus.c xc/programs/twm/parse.c xc/programs/twm/resize.c xc/programs/twm/twm.c //bugs.freedesktop.org/show_bug.cgi?id=2566) attachment #2083 (https://bugs.freedesktop.org/attachment.cgi?id=2083) ANSI-fy twm window manager code. The conversion preserves the comments which annotate variables and function arguments (these have been moved into doxygen(esque?) "stubs" above each function. Patch by Mike Owens <etc@filespanker.com>.
2004-04-23Merging XORG-CURRENT into trunkxprint_packagertest_20041217_basexprint_packagertest_20041125_baserel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1XACE-SELINUX-MERGExprint_packagertest_20041217xprint_packagertest_20041125lg3d-masterlg3d-eventlg3d-dev-0-7-1lg3d-dev-0-7-0lg3d-dev-0-6-latestlg3d-dev-0-6-2lg3d-dev-0-6-1-latestlg3d-dev-0-6-1-currentlg3d-dev-0-6-1-1lg3d-dev-0-6-1lg3dXORG-6_8-branchCOMPOSITEWRAPEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330Kaleb Keithley
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley