1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00
Commit Graph

2925 Commits

Author SHA1 Message Date
Tamas TEVESZ
e75b1b6d70 wrlib: Use snprintf() instead of sprintf() 2010-05-11 09:18:12 +02:00
Brad Jorsch
68bd644b0d Fix wheel resizing with resize increments
In C, dividing two integers automatically rounds towards zero, so ceil(a
/ b) is useless as the result is truncated before ceil ever sees it. The
correct result for positive integers is obtained by (a + b - 1) / b.
2010-04-26 23:23:56 +02:00
Brad Jorsch
4ddc2a5a0a Don't grab Ctrl+Wheel if ResizeIncrement is 0
I personally cannot stand stealing Ctrl+Wheel for resizing windows, so I
turned it off. But wmaker is still preventing Ctrl+Wheel from reaching
apps, which is certainly not the behavior I desire.
2010-04-26 23:23:56 +02:00
Brad Jorsch
12d16d92e7 Fix mouse button grab swallowing
We grab Mod+Button events for our own purposes, and swallow them using
XAllowEvents(AsyncPointer) to prevent the client window from seeing
them. But if events are coming in fast enough (e.g. via fast wheel
scrolling) so that multiple grabbed events are in the queue, the second
queued event would be allowed to leak through to the client by the
unconditional XAllowEvents(ReplayPointer) a few lines later.
2010-04-26 23:23:56 +02:00
Carlos R. Mafra
b575955263 Remove NEWSTUFF #ifdef's
...as they are never defined and there is no code associated to it.
2010-04-16 12:47:29 +02:00
Carlos R. Mafra
f7dc986ed1 Add include guards 2010-04-14 18:42:11 +02:00
Carlos R. Mafra
0350b8445a Remove unneeded extern's in .c files
They were not being used in those files, so let's remove them.
2010-04-14 18:39:28 +02:00
Carlos R. Mafra
4041278f48 Address some sparse warnings
Plain integer as NULL pointer, non-ANSI function declaration etc.
2010-04-14 18:39:17 +02:00
Tamas TEVESZ
62f4eff7ae Add missing initializers 2010-04-12 11:56:00 +02:00
Tamas TEVESZ
4247ac9f82 Add i18n labels to wmgenmenu 2010-04-12 09:58:37 +02:00
Carlos R. Mafra
6002ce0cbc Add more pretty names for wmgenmenu apps 2010-04-12 09:58:37 +02:00
Tamas TEVESZ
22978af5a6 Add nice labels to wmgenmenu 2010-04-12 09:58:37 +02:00
Brad Jorsch
37829a7c60 Fix loading saved states on 64-bit systems
One misuse of CARD32 was missed back when someone fixed the 64-bit
issues (background: X has 8-bit, 16-bit, and "32-bit stored in a long"
data formats; on a 64-bit system, long is 64 bits). This was causing
minimized windows to be restored as shaded, and possibly occasional
crashes, when wmaker was restarted.

Also, throw in a safety check that 10 items really were returned before
trying to access them.
2010-04-12 09:58:37 +02:00
Carlos R. Mafra
518b3b4480 Fix 'make install' from silent compilation 2010-04-12 09:58:37 +02:00
Brad Jorsch
554f9dea25 Remove apparently-unused files
WPrefs.app/Font.c - unused since 2004
wrlib/configure.in - not used and not really edited since 1998, so it's
    probably very out of date
2010-04-12 09:58:37 +02:00
Brad Jorsch
7a38ea85b9 Ignore build files
Ignore various files created by autotools, so they don't clutter the
"git status" output.
2010-04-12 09:58:37 +02:00
Brad Jorsch
bbe55ba242 Fix "make dist"
The "make dist" command can be used to generate the release tarball, but
only if the Makefile.am correctly specifies EXTRA_DIST, specifies
headers in foo_SOURCES, and so on.
2010-04-12 09:58:37 +02:00
Brad Jorsch
39426bde35 Rename INSTALL.pt
All the other INSTALL files were renamed INSTALL-WMAKER, but this one
was forgotten.
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
c960ae622e Kill contribs
- Patches don't apply
- RPM spec refers to stuff long dead, distros probably have better
  ones anyway
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
607beee479 Fix CRLF files 2010-04-12 09:58:36 +02:00
Tamas TEVESZ
abda319c16 Fix Debian builds 2010-04-12 09:58:36 +02:00
Brad Jorsch
65aa3ae9c8 Fix enable-modelock warnings
Fix warnings that only show up when --enable-modelock is passed to
./configure.
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
ec7506e5e5 Plug leak 2010-04-12 09:58:36 +02:00
Brad Jorsch
12de2f319e Fix uninitialized vars
Initialized variables that are conditionally set. In particular, this
construct is dangerous:
  void *p;
  if (something) p = couldReturnNull();
  if (!p) p = fallbackFunction();
2010-04-12 09:58:36 +02:00
Brad Jorsch
bbf3635590 XShapeEvent strict aliasing violation
C99 defines new strict aliasing rules to allow compilers to make certain
optimizations. These rules prohibit converting an XEvent to an event
struct (e.g. XShapeEvent) that is not already in the XEvent union using
pointer type punning (e.g. "(XShapeEvent *)&ev"), and vice versa. The
canonical fix seems to be to create a union between XEvent and the
extension event struct to make the aliasing explicit, so do that.
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
3be81b0243 Fix PO files breaking build 2010-04-12 09:58:36 +02:00
Brad Jorsch
35bcfa6a02 Fix internationalized format string warnings
A few internationalized format strings have only one %s in the default
while two strings are being passed. Change those defaults to have two
%s's, which means we also have to update the .po files to match. May as
well throw in the extra %s in the translated version while we're at it.
2010-04-09 15:16:31 +02:00
Brad Jorsch
6082f2d243 Fix trivial warnings
* Format string integer size warnings
 * Missing or non-value returns in non-void functions
 * A missing #include in WPrefs.app/MouseSettings.c
2010-04-09 15:16:31 +02:00
Tamas TEVESZ
6b5cfc887a Fix out-of-tree builds
- The throwing out of autogen.sh in favor of autoreconf comes from
  http://www.gnu.org/software/automake/manual/autoconf/autoreconf-Invocation.html#autoreconf-Invocation
- 'think that instead of the exit, some better way should be put in
  to control whether or not to automatically run configure. Or maybe
  just don't even run it.
2010-04-09 15:16:31 +02:00
Carlos R. Mafra
e4fedca2bb Remove install-sh, missing and mkinstalldirs from the repo
..as they get overwritten by the configure stuff.
2010-04-09 15:12:02 +02:00
Carlos R. Mafra
c183d9107e Rename wmaker INSTALL file
..so that it does not get overwritten by the configure stuff.
2010-04-09 15:07:40 +02:00
Carlos R. Mafra
fb91e5d67a Do not skip windows in the switchpanel
If a window has the skip_window_list flag set wmaker currently not only skips
this window from the window list (F11) but also from the switchpanel (TAB).

This patch makes skip_window_list-windows appear in the switchpanel and be
skipped only in the window list, strictly honoring what the name of the flag
is supposed to mean.

The motivation for this is that I have lots of workspaces and almost all of
them has a xterm, so that I set the skip_window_list for the xterms not to
overcrowd the window list. But I still want to alt+TAB to xterms on the current
workspace.

In addition to that, now the "internal window" flag is not checked before
appearing in the switchpanel.
2010-04-08 18:38:37 +02:00
Carlos R. Mafra
08f990a946 Use int instead of size_t to silence warning
gcc-4.4.1 was complaining:

fontconv.c: In function ‘mapWeightToName’:
fontconv.c:114: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c:114: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c: In function ‘xlfdToFc’:
fontconv.c:157: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c:157: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
2010-04-08 17:11:41 +02:00
Tamas TEVESZ
241e66ff0a Tidy
- Kill unused vars in wrlib
- Add missing initializers to defaults.c:staticOptionList
- Re-format it slightly
- Kill some dead code
- Kill stupid "if (const op var)"
2010-04-08 15:53:50 +02:00
Brad Jorsch
79e1bb53d3 Menu positioning bug
I noticed a bug today in menu workspace positioning (in the next tree):
if I right-click and hold the button down at the left edge of the
screen, the menu appears (correctly) half off the edge but will *not*
slide back onto the screen. Compare the behavior to right-clicking at
the right edge of the screen: the menu appears half off the edge, but
sliding the mouse to the edge causes the menu to slide until it is fully
visible.

Also, opening a submenu in this state positions the submenu as if the
menu were fully on the screen, leaving a gap between the menu and the
submenu.

If the menu happens to also go off the bottom of the screen, moving the
mouse to the bottom edge causes the issue to be magically fixed as soon
as the sliding upwards begins.

I also note inconsistent behavior when simply right-clicking (without
holding) to bring up the menu: at the right or bottom edge the menu
appears in the correct partially off the edge position, but at the left
edge it immediately jumps to be fully on-screen, almost as if
WrapMenus = YES were set for the left edge only.

I bisected it to d316260395. As far as I
can tell the "fix" there was to position the menu at the correct
negative X position but then lie to wmaker so it thought the menu was at
X=0. Presumably the "WrapMenus" behavior was the intended result.

Since (AFAIK) the window menu is the only one with this problem, why
don't we just check if x is too negative in OpenWindowMenu()?
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
c90484324c Fix spacing on WPrefs Misc panel
- w/o XKB_MODELOCK it looks like shit anyway, so let's at least
  make the w/ XKB_MODELOCK case readable.
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
1b666f53e4 Make WPrefs' Expert panel scrollable 2010-04-08 15:53:50 +02:00
Tamas TEVESZ
b59575e709 Add new cycling option
When using Xinerama, make it possible only to cycle between those
windows that are on the currently active head - AFAICT this means
windows that have the majority of their area on the same head as
the pointer.

Patch complete with WPrefs integration, alas this being quite
unusable - for a lack of a better idea, I tucked the option on the
expert panel, making the item list too tall - making it scrollable
would be a nice addition.

The default for the new option (CycleActiveHeadOnly) should be NO,
that is, no change in default behaviour.
2010-04-08 15:53:50 +02:00
Carlos R. Mafra
3f8248f534 wmgenmenu: Change the app order in terminals list
Because the terminal detection stuff by Tamas was choosing 'mrxvt' for
me, but I want it to be 'xterm'.
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
68a55be998 Poke wmgenmenu some more
- change some variable names to better reflect their purpose, do a little
  write-up how a menu is built
- auto-detect what terminal to use for apps in need of a terminal
- fix the chunk that adds the terminal-based apps
2010-04-08 15:53:50 +02:00
Carlos R. Mafra
68f70da310 Regenerate wmgenmenu German translation 2010-04-08 15:53:50 +02:00
Tamas TEVESZ
c165beeb4b Poke wmgenmenu, part 2
- Convert to using WINGs PropList functions
- Add mwm to other_wm, remove ee from Graphics while here
2010-04-02 10:15:58 +02:00
Tamas TEVESZ
daad5ed828 Poke wmgenmenu
- add help and usage, to bring it in line with other tools
- if no item in any particular group was found, don't write an
  empty group
2010-04-02 10:13:15 +02:00
Tamas TEVESZ
2e91634921 Kill leftovers 2010-04-02 08:41:31 +02:00
Tamas TEVESZ
81aaed2bf8 Tidy comms between external apps and wm a bit
- one instance of this left in setstyle, it will follow later
2010-04-02 08:41:11 +02:00
Tamas TEVESZ
e7a46d5cdf Attach utils versions to WM version 2010-04-02 08:38:39 +02:00
Tamas TEVESZ
7dc767ae78 Convert to getopt, continued
plus some assorted fixes:
 - sort headers, remove some unneeded ones
 - small bits of formatting and the like
2010-04-02 08:38:23 +02:00
Tamas TEVESZ
859338fd83 Spice up setstyle
- convert to getopt
- tidy xsendevent
- modify hackPathInTexture() so that:
  - it properly figures where the style file is
  - if it's under the user's home directory, that part of the path
    is changed to `~' - this makes your wm configuration usable on
    systems with a network home, used on systems where home is /home,
    or /u, or /export/home, or whatever.

XXX: there's a note WINGs/findfile.c:wexpandpath() stating that
`too many functions handle a return value of NULL incorrectly'. this is
so true. so if anyone is looking for a small project to sink their
teeth in...
2010-04-02 08:37:16 +02:00
Tamas TEVESZ
1bc042c172 Autoconf mods
- according to the automake manual, `acinclude.m4' is the old style
  of doing stuff, putting local macros in their own directory is the
  way to go, so move acincluce.m4 to m4/windowmaker.m4
- reflect this in autogen.sh and Makefile.am
- while there, add a `conditionally set cflags' macro from the
  autoconf macro archive
- use this to slightly pump warning levels up if we are on gcc
2010-04-01 11:40:08 +02:00
Tamas TEVESZ
6bf7994520 Style stuff up
- convert hand-rolled arg parsers to getopt_long
- sort headers, get rid of some duplicates in the process
- in fontconv, replace magic numbers with constants (there's
  little practical value to this here, but it's much nicer)
- slightly redo fontconv.c:strToInt()
2010-04-01 11:24:46 +02:00