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

2925 Commits

Author SHA1 Message Date
Carlos R. Mafra
4339e446e4 automake: Fix warnings about underquoted calls to AC_DEFUN
This patch fixes warnings from automake versions >=1.8 about
underquoted calls to AC_DEFUN.

I followed the recommended modifications of
http://sources.redhat.com/automake/automake.html#Extending-aclocal
2008-11-05 18:17:55 +01:00
Carlos R. Mafra
72689513a3 Makefile: Beautify compilation messages
This patch adds the --disable-verbose-compile switch to the
configure script.

When this option is used it reduces the verbosity of compilation
messages to the essential. However compiler warnings are not affected
and thus gain visibility by not standing in the middle of a storm
of other messages.

In summary, the compilation messages are reduced to a stream of

CC array.o
CC bagtree.o
CC configuration.o
CC connection.o
CC data.o
[...]

instead of a mind-boggling flux of

gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs -I../wrlib -I../src
-I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c array.c
gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs
-I../wrlib -I../src -I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c bagtree.c
[...]
2008-11-05 18:03:07 +01:00
Rodney Padgett
56d8568787 Use inotify to check for changes to the defaults database. Workaround for
event handler timer.

After upgrading my kernel recently I noticed that dnotify has been
depreciated, so I decided to try and implement the new inotify code in
Window Maker instead.

During testing, I also found that one of the timers which was removed
(the one causing the most wake-ups), calling delayedAction, was
responsible for handling signals. Basically with this timer removed,
signals were only handled after an X event occurs.

After looking at the delayedAction function, I couldn't see the purpose of it.
It certainly wouldn't cause any delay as it was called by the timer every
500ms, so there is no time correlation with when a signal was received.
Also, it appeared to count the signals and call DispatchEvent for each
one, but it appears DispatchEvent would just handle the most recent signal
and take action on that. The signals handled by delayedAction are the
various exit and reset signals, so only one need to be handled. I
therefore have commented out delayedAction (it wasn't called by any other
procedure) and added a call to DispatchEvent imediately after the signal
is registered, in handleExitSig.

I'm not sure what problems this may cause with dead children - these are
only cleaned up after an Xevent now that the timer is removed- but I
haven't observed any problems since a few months ago.
2008-08-09 13:14:39 -05:00
Pedro Gimeno
c91bb1ba13 Fix periodic focus bug
Pedro Gimeno explains:

"As you most likely already know, every X Window event comes with a
timestamp. You can see it using e.g. xev.

I don't know if this is Debian-specific and I'm no X Window expert, but
the fact is that in my machine this timestamp, according to my
/usr/include/X11/X.h, is a 32-bit unsigned integer and it holds the
event time in milliseconds according to my tests.

This timestamp appears to be in milliseconds from the start of the Unix
epoch, modulo 2^32. The problem is that 32 bits are too little for this
purpose: 2^32 milliseconds are exactly 49 days, 17 hours, 2 minutes and
47.296 seconds.

Now, the WindowMaker code rejects any focus event whose timestamp is
less than the last one seen, using code similar to this:

 if (timestamp < LastTimeStamp) return;
 LastTimeStamp = timestamp;

This is a disaster when timestamp wraps around because of the 32-bit
limit. Say LastTimeStamp equals 2^32-1 and a focus event comes two
milliseconds after. Its timestamp will equal 1 because of the
wraparound. Obviously, 1 < 2^32-1 so the event will be rejected even if
it comes from the future (relative to LastTimeStamp) and not from the
past. Focus events are no longer accepted because nothing can be greater
than 2^32-1 (unless you click on that exact millisecond, 49 days after).

If you look in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=102314
you'll see two people confirming the periodicity and predictability of
the bug. Arnaud Giersch was who noted that the period was 2^32
milliseconds (and not 2^31 as I thought it could be because of a signed
int involved) and who noted the coincidence with the Unix epoch.

My fix works by subtracting one timestamp from the other (an operation
which is done modulo 2^32) and rejecting the focus event only if the new
timestamp is within 1 minute (60000 milliseconds) in the past. Given the
periodicity of the timestamp, actually after 49.7 days there will be
another minute in the future during which focus events will not be
accepted; again after 99.4 days, etc., but thanks to the subtraction,
they will now be relative to the *last* focus change and not to the Unix
epoch.

The patch could be simplified to get rid of the compareTimes function.
It's written like that because it comes from the previous patch (which
you can see in the same bug report).

So the date comparison line could end up looking like this:

   if (scr->flags.ignore_focus_events || LastFocusChange - timestamp <
60000)

so you can get rid of the compareTimes function. However please respect
the other change of 'int' to 'Time'.

As for why you aren't experiencing this problem, perhaps the event
timestamp does not come from the Unix epoch in your X Window system, but
rather starts counting when you start it or your computer, I don't know.
Or maybe your X Window server's timestamps are 64 bits wide instead of
32 bits, which I don't think because I doubt the X11 protocol specifies
a 64-bit record for the transmission of the timestamp. In either case,
the output of xev will probably help understanding the cause.

Or maybe even it's a click-to-focus only bug and you're not using that
mode. I haven't checked who calls wSetFocusTo.

Note that I can reproduce it just by manipulating the system clock,
which seems to be tied to the event timestamps."

For more information see:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=102314

Reported-by: Joey Hess <joeyh@debian.org>
Signed-off-by: Pedro Gimeno <parigalo@formauri.es>
2008-06-26 15:03:38 -03:00
Paulo Cesar Pereira de Andrade
e4800e84d0 Workaround for Composite problems when default depth is not 24.
This is really a workaround patch, the proper fix would be to have
WindowMaker know about Composite, and take advantage of it's features.
2008-05-03 20:02:31 -03:00
Carlos R. Mafra
ee28b0257a WINGs/wfont.c: Avoid returning font=NULL in WMCreateFont()
WPrefs tries to use the fonts listed in the WMCreateFont() call (from WPrefs.c),

font = WMCreateFont(scr, "Lucida Sans,URW Gothic L,Times New Roman,serif"
                         ":bold:pixelsize=26:antialias=true");

and 'font' is later used without accounting the possibility of it being NULL in

WMSetLabelFont(WPrefs.nameL, font);
WMReleaseFont(font);

In particular, WMReleaseFont(font) will kill WPrefs ungracefully with the
following message if font=NULL

WPrefs: wfont.c:193: WMReleaseFont: Assertion `font!=((void *)0)' failed.
Aborted

That happens because the return value of WMCreateFont() can be NULL, so this
patch makes WMCreateFont() never return NULL. If the font creation fails for
some reason (see below), we try to use the emergency DEFAULT_FONT and print
debugging information telling what's going on. If the use of DEFAULT_FONT
also fails, then we terminate WPrefs with exit(1) and let the user know
why exactly if failed.

This bug happened because the font "Lucida Sans" (the first possibility
in the initial call to WMCreateFont()) "exists" in my system as a stale
symbolic link to a location which no longer exists after an upgrade from
java from 1.5.0.14 to 1.5.0.15

    /etc/alternatives/LucidaSansDemiBold.ttf ->
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/fonts/LucidaSansDemiBold.ttf

So the call to XftFontOpenName(display, scrPtr->screen, fname) with
"Lucida Sans" being the first possibility for Xft to try out ended up in 'font'
being NULL because, as far as the Xft library was concerned, "Lucida Sans"
produced a positive match (due to it existing as a symbolic link) but in the end
a NULL result was produced due to the missing symbolic link destination. This later
exposed the bug of WMCreateFont() returning font=NULL and WPrefs.c not checking
whether font=NULL before using it. Bang!

If "Lucida Sans" was the _second_ entry to try and the first one had suceeded,
this bug would not have surfaced.

This solves https://qa.mandriva.com/show_bug.cgi?id=39677

Signed-off-by: Carlos R. Mafra <crmafra@ift.unesp.br>
2008-05-02 20:23:00 -03:00
Carlos R. Mafra
722c82c8ab wmaker: Reduce wakeups to zero
This patch removes wmaker from PowerTop's shame list, where
it appeared with ~3-4 wakeups/second.

It adds the linux kernel's dnotify mechanism (adapted from
the example in Documentation/dnotify.txt in the kernel source),
to detect when a configuration file in ~/GNUStep/Defaults has
changed to load it again on-the-fly. For me it usually means that
modifications to ~/GNUStep/Defaults/WMRootMenu via the 'genmenu'
script are automatically detected and loaded.

The use of dnotify makes the ancient behaviour of polling unecessary
and cuts down the wakeups count.

Other 'apparently' useless timers are also deleted and it's been almost
one year now that I use this patched exclusively without problems, so
I am pretty sure that it doesn't hurt to remove them.

The end result of all this is that wmaker generates 0 (zero) wakeups
when idle in a Linux system.

Signed-off-by: Carlos R. Mafra <crmafra@ift.unesp.br>
2008-05-02 20:01:50 -03:00
Carlos R. Mafra
2061c30758 Add .gitignore to git repository 2008-05-02 01:01:24 -03:00
dan
4e8423d18a Fixed segfault when unhiding an application in certain conditions (seen
with KDE applications with transient windows)
wmaker-0.92.0+
2006-04-27 19:16:58 +00:00
dan
a5aa8573c9 updated todo with ideas for post 1.0 2006-04-27 02:57:57 +00:00
dan
ecd5217633 Enhanced the cursor positioning/selecting text using the mouse in a textfield.
This also fixed an endless loop that could be entered by the previous code
in certain situations, after the patch to fix navigation/selection in a
textfiled with UTF8 chars was applied.
2006-04-27 02:48:18 +00:00
dan
577b3ee949 Removed WINGs' dependency on rgb.txt (from X11).
This fixes issues with locating the file which is being stored on different
locations depending on the X server release/version
2006-04-26 20:28:24 +00:00
dan
bc4de88d8b Applied patches from Stanislav Maslovski <stanislav.maslovski@gmail.com> to
fix the 2 problems mentioend below:

- Fixed buggy handling of UTF8 characters in textfields in WINGs.
- Fixed segfault in WPrefs when some font description is missing from the
  configuration file.
2006-04-25 23:52:43 +00:00
dan
4688c9839b more fixes for missing linking flags in some cases 2006-04-25 20:01:51 +00:00
dan
90c0e656f1 replaced windowmaker.org with windowmaker.info everywhere 2006-04-25 19:35:14 +00:00
dan
42191340fd - Improved Info panel display.
- Fixed missing library paths when linking some binaries on certain
  platforms with a recent pkg-config
2006-04-25 18:59:24 +00:00
dan
d873d09fa5 yet another cvs commit notification test 2006-04-25 18:50:42 +00:00
dan
2e114bcc1e another cvs commit notification test 2006-04-25 18:46:14 +00:00
dan
1a73c71d56 cvs commit notification test 2006-04-25 18:23:19 +00:00
dan
240586edc5 cvs commit notification test 2006-04-25 17:58:33 +00:00
dan
eae4c45cf5 test cvs commit notifications 2006-03-28 19:50:04 +00:00
dan
c2c58734b8 test cvs commit notifications 2006-01-23 06:47:27 +00:00
dan
085e9d6254 - updated the XDND code in WINGs to work with GDK based applications.
WINGs based applications should now work with both KDE and GNOME
  applications (Sylvain Reynal <sreynal@nerim.net>)
- better check for the XDND protocol version when interoperating with other
  applications. As it seems xdnd version 3 (which WINGs supports) and newer
  are not backward compatible with xdnd version 1 and 2. This is why WINGs
  applications cannot interoperate with GNUstep applications (which uses
  xdnd version 2). Xdnd version 4 and 5 are backwards compatible with
  version 3 though. (Sylvain Reynal <sreynal@nerim.net>)
2006-01-22 20:33:19 +00:00
dan
f683b99405 updated estonian translation 2006-01-22 19:20:57 +00:00
dan
bacf8229b0 - release colors to avoid issues with the reference count overflowing a
small integer and causing unexpected color releases that can crash
  Window Maker (Martin Frydl <martin.frydl@systinet.com>)
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
  background color of a view (Martin Frydl <martin.frydl@systinet.com>)
2006-01-22 18:19:09 +00:00
dan
fa7a5db4bd - fixed issue with invisible modal windows from Qt and Gtk applications
on 64bit platforms (Max Loparyev <max@city.veganet.ru>)
- fixed issue with icon colors on big endian platforms
  (Max Loparyev <max@city.veganet.ru>)

patch based on a previous patch by Vladimir Nadvornik <nadvornik@suse.cz>
2006-01-22 18:05:00 +00:00
dan
e534138417 test 2006-01-22 16:29:39 +00:00
dan
73d94f7bdc test 2006-01-22 16:03:31 +00:00
dan
054f954390 Applied some patches from Balaton Zoltan <balaton@eik.bme.hu>
- small fix for compilation in a different directory than the source
- fixed some warnings on 64bit platforms
2006-01-22 15:53:44 +00:00
dan
c0317ddae5 eliminated gcc-4 compilation warnings 2005-08-22 23:58:19 +00:00
dan
91f5abc955 - fixed gcc-4 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
- fixed amd64 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
2005-08-22 19:07:57 +00:00
dan
d26f18505a Fixed WPrefs.app to find its icons when not installed under GNUstep paths 2005-07-17 19:16:46 +00:00
dan
f3a960d9d8 updated german translations 2005-07-05 19:41:06 +00:00
dan
5f0a357b1f try to work around some user's IQ level 2005-07-05 08:44:00 +00:00
dan
20d5925d08 updated news file (part 2) 2005-07-03 18:08:46 +00:00
dan
b655a5fa5f updated news file 2005-07-03 18:01:46 +00:00
dan
ad0ae4887f - new algorithm for placing miniwindows after unhiding the application they
belong to, that works without auto-arranging the icons, while still avoiding
  multiple icons in the same spot by moving the miniwindows to a new slot if
  their old slot was occupied in the meantime.
- double clicking an appicon will also raise the miniwindows that belong to
  that application to the front (along with the normal windows).
wmaker-0.92.0
2005-07-03 17:37:03 +00:00
dan
eca635cb5d - try fixed font for the technical drawing font if helvetica-12 is not
available to avoid crashing (Timo Juhani Lindfors <timo.lindfors@iki.fi>)
- german WINgs po file fix
2005-07-03 00:49:06 +00:00
dan
ad641c1992 Fixed issue with GNUstep applications losing focus when all their windows
are closed and there remains only their menu (Matt Rice <ratmice@yahoo.com>)
2005-07-02 19:23:41 +00:00
dan
69730273b1 - fixed bug with windows shrinking to very small sizes when Unmaximize was
used on them, after they were closed in a maximized state.
- fixed bug with restoring maximized state from NetWM atoms.
2005-05-15 16:45:02 +00:00
dan
f8b3a774be removed obsolete file 2005-05-09 00:27:33 +00:00
dan
2ea40ff2c5 Improved hide/unhide animation for applications with multiple windows
(only animate the active window hiding/unhiding, which makes Window Maker
faster and more responsive for such applications).
2005-05-08 00:51:56 +00:00
dan
33f7b63d11 - Fixed switch panel default value in defaults.c
- Fixed WPrefs path in the installed WMState (changed after recent WPrefs
  installation path changes)
- Fixed wmaker.inst (apparently some very noisy individual was unable to get
  right his 10 line patch to rename a path)
2005-04-08 11:51:06 +00:00
dan
880880162b Fixed bug that caused wmaker to crash when kplayer was switched back from
fullscreen mode to windowed mode.
2005-03-22 23:15:11 +00:00
dan
2f56373cc2 fixed issue with window being moved by 1 pixel up and left when the window
move was initiated by the client
2005-03-13 00:15:13 +00:00
dan
24519b6292 Added code to automatically convert Icon paths in WMWindowAttributes from
the old .AppInfo/... to the new Library/WindowMaker/... on the fly when
Window Maker starts.
This should allow a transparent transition without any need for users to do
anything.
2005-03-12 01:16:04 +00:00
dan
24e349afe7 Changes (especially the ones that may affect backward compatibility like
this path change) should go at the top of the NEWS file. None digs 1200
lines in the NEWS to read about some path change.
2005-03-11 23:05:43 +00:00
dan
5cfc565bbd Fixed paths, because mr Alex "Big Mouth" Perez was unable to get them right
in the first place in his trivial 10 line patch which only attempted to
replace one path with another.
He must be a big time user of his own patch, to not have noticed where the
paths pointed after his change.
2005-03-11 22:57:40 +00:00
dan
c8406b640c fixed cvs to compile again 2005-03-11 21:59:06 +00:00
kojima
53db5fc4a5 eq 2005-03-11 21:51:49 +00:00