summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-01Replace GCC_NORETURN with _X_NORETURNTim Wiederhake
This silences all "function might be candidate for attribute 'noreturn'" warnings. Add to HandleEvent as well, as that function never returns. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Replace GCC_PRINTFLIKE with _X_ATTRIBUTE_PRINTFTim Wiederhake
This silences all "function '...' might be a candidate for 'gnu_printf' format attribute" warnings. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove redundant declaration of yylexTim Wiederhake
yylex is already declared in (the generated) lex.c. This silences a "redundant redeclaration of 'yylex'" warning. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove redundant declaration of yyparseTim Wiederhake
yyparse is already declared in (the generated) gram.h. This silences a "redundant redeclaration of 'yyparse'" warning. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove redundant declaration of yylinenoTim Wiederhake
yylineno is already declared in (the generated) gram.h. This silences a "redundant redeclaration of 'yylineno'" warning. 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-01Silence old-style function definition warning in yywrapTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Silence uninitialized variable warningTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Enable compiler warningsTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove write to never-read variable in InstallWindowColormapsTim Wiederhake
The variable `n` is written to every iteration of the loop, but never read. It is overwritten (and read) in the next loop though. Remove the dead store. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove unused typedef SigProcTim Wiederhake
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>
2024-01-01Remove always-true ifndef TOMTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove disabled codeTim Wiederhake
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Fix include guard namesTim Wiederhake
Names that begin with an underscore ('_') are reserved. Follow the usual practice of naming the include guard of file "foo.h" "FOO_H", as is already done in "icons.h". 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-21quiet a misleading warning in grammarThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-21issue #8: twm displays all windows as "Untitled"Thomas E. Dickey
adapt the suggestion to use XFetchName to work around a system whose locale support is broken, but rather than break existing configurations, use that call as a fallback when the existing/working calls fail. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-21X11R5 change lost the update for yylineno needed to make parse messagesThomas E. Dickey
useful; a subsequent X11R6 change made the behavior a little worse. This change repairs that old damage. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-21include twm.h in header files which rely upon its definitionsThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-21indent lex/yacc files using xxx-indent (twm-indent uses GNU indent, whichThomas E. Dickey
does not handle those files). Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
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-19use new warning-message functions in the remaining places where suitable,Thomas E. Dickey
since -q option can be used to silence those if wanted 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>
2020-06-16eliminate a fixed-size buffer in Execute() function.Thomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-06-15issue #1: twm random window placement handles large windows poorlyThomas E. Dickey
report/patch by Preston Crow for improved window placement (reindented to fit with current sources) Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-11-23an error in the action for warp-to-ring would produce two error messagesThomas E. Dickey
because the case lacked a break-statement Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-11-23strict gcc-warning fixes, no object-changeThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-11-23whitespace-fixesThomas 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-16issue 4: twm makes windows too wideThomas E. Dickey
https://gitlab.freedesktop.org/xorg/app/twm/issues/4 patch submitted by Jes Bodi Klinke Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-16fix const-warnings by making a copy of the dataThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-16fix const-warnings in grammar using a non-const initializerThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-16constify deftwmrc[], to fix gcc-stricter warningsThomas E. Dickey
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>
2019-07-15issue 7: check if there are no fonts found for the fontset, and fallback to ↵Thomas E. Dickey
fixed in that case. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-05-31Make some char pointers const as necessary to clear some gcc warningsAlan Coopersmith
twm.c:544:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] Scr->iconmgr.name = "TWM"; ^ twm.c:545:25: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] Scr->iconmgr.icon_name = "Icons"; Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-03Read system.twmrc from where it got installedBryan Kadzban
${rcdir} is ${datadir}/X11/twm by default, but can be overridden when running make. If it is overridden, then the code should read from the same place as where "make rcdir=FOO install" puts the file. (Obviously overriding rcdir= for "make install" requires overriding it for "make" as well. But at least this way it's possible to get it to work. :-) ) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-09-30If we can't find a colormap to replace, insert new one instead of leaking itAlan Coopersmith
Found by Oracle's Parfait 2.2 static analyzer: Error: Memory leak Memory leak [memory-leak] (CWE 401): Memory leak of pointer sc allocated with malloc(32) at line 421 of src/util.c in function 'InsertRGBColormap'. sc allocated at line 397 with malloc(32) sc leaks when replace != 0 at line 405. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>