mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-06 13:54:12 +01:00
c91bb1ba1360006c568db37438779e525868cf17
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>
GNU Window Maker X11 Window Manager <http://windowmaker.info> <ftp://ftp.windowmaker.info> by Alfredo K. Kojima Dan Pascu Web/FTP Master Phillip Smith Congratulations! You have purchased an extremely fine device that would give you thousands of years of trouble-free service, except that you undoubtably will destroy it via some typical bonehead consumer maneuver. Which is why we ask you to PLEASE FOR GOD'S SAKE READ THIS OWNER'S MANUAL CAREFULLY BEFORE YOU UNPACK THE DEVICE. YOU ALREADY UNPACKED IT, DIDN'T YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND FIDDLED WITH THE KNOBS, AND NOW YOUR CHILD, THE SAME CHILD WHO ONCE SHOVED A POLISH SAUSAGE INTO YOUR VIDEOCASSETTE RECORDER AND SET IT ON "FAST FORWARD", THIS CHILD ALSO IS FIDDLING WITH THE KNOBS, RIGHT? AND YOU'RE JUST NOW STARTING TO READ THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU KNOW THAT? -- Dave Barry, "Read This First!" Description =========== Window Maker is the GNU window manager for the X Window System. It was designed to emulate the look and feel of part of the NEXTSTEP(tm) GUI. It's supposed to be relatively fast and small, feature rich, easy to configure and easy to use, with a simple and elegant appearance borrowed from NEXTSTEP(tm). Window Maker was designed keeping integration with GNUstep in mind and is the "official" window manager for it. It is also part of the GNU project (www.gnu.org) Read more about GNUstep further on this file. Hints (information given by applications to integrate well with the window manager) for Motif(tm) and NETWM are also supported (NETWM is used by KDE and GNOME, so they are automatically supported as a result). So you can replace any of the window managers for these environments with Window Maker while keeping most, if not all, of the native window manager functionality. Window Maker was previously called WindowMaker. Window Maker has no connection with Windowmaker, the software for making windows and doors. Documentation ============= Read before asking. * README files all over the source tree have info related to the stuff in the directories. * INSTALL has installation instructions and some troubleshooting tips. You're meant to read it before installing. it was not written just to fill up space in the package... * FAQ: Frequently Asked Questions. READ IT!!! FAQ.I18N is for internationalization related questions. * NEWS: list user visible changes from the previous version. Read it if you are upgrading. * MIRRORS: some alternative places where you can get Window Maker, including platform specific packages of Window Maker. * BUGFORM: use it to send bug reports. Please do use it. * ChangeLog: what changed from the previous version? * BUGS: list of known bugs *** Tutorial There's a tutorial maintained by Georges Tarbouriech at: http://www.linuxfocus.org/~georges.t/ *** User Guide The Window Maker User's Guide can be downloaded from the official ftp or web sites. It can also be viewed in HTML format in: http://people.delphi.com/crc3419/WMUserGuide/index.htm The User Guide explains how to use Window Maker, the configuration files and options. *** man pages Type "man wmaker" in the shell prompt to get general help about Window Maker Directories & Files in the Source Tree ====================================== * Install is a script for configuring and compiling Window Maker in a easy way (not that the normal way is difficult, but...). * AUTHORS: the credits * TODO: plans for the future * contrib/ has some contributed patches that are not supported by Window Maker because they conflict with design filosophies of the developers or some other reason. * util/ has various utility programs. * WPrefs.app/ is the configuration program. * src/wconfig.h has compile time options you can change to select some options/features and other stuff. * WINGs/ NEXTSTEP lookalike widget library * wrlib/ image processing library * po/ has message catalogs wich are the translated versions of the messages displayed by Window Maker. * docklib-x.x.tar.gz a library for writing dockapps HELP ME!!! ========== There is a mailing list for discussing Window Maker at wm-user@windowmaker.info To subscribe to it, send a message containing: subscribe in the subject of the message to wm-user-request@windowmaker.info If you got a problem, ask there (after reading the docs, of course). The people there is more likely to be able to answer your questions than we are. For bug reports use the BUGFORM. If you have a problem with a precompiled version of Window Maker (rpm, deb etc), first ask the person who made the package. IMPORTANT NOTE: when asking for help (in the mailing list or to the developerts, directly) *always* send information about the system you are using. You can use the system information section at the end of BUGFORM as a guideline. Another thing: please don't send HTML mail. There is also a #windowmaker IRC channel at openprojects. To join there, connect your irc client to irc.openprojects.net, irc.linux.com or some other server of that network. GNUstep ======= GNUstep is a complete object-oriented development system, based on the OpenStep specification released by NeXT(tm) (now Apple(tm)) and Sun(tm). It will provide everything one needs to produce cross-platform, object-oriented, graphical (and non-graphical) applications; providing among other things, base system libraries, a high-level GUI application framework that uses a Display PostScript(tm)-like imaging model (DGS), objects for accessing relational databases, distributed objects and a graphical development environment, with tools like interface modeller, a project management system (project center) and other tools. The GNUstep development system will be used to create a user environment, with everything needed for a complete graphical user interface, such as a file viewer, text editors and other applications. Note that the user environment (or "desktop environment") is only a small part of the whole GNUstep project and therefore it does not "compete" with other projects like KDE or GNOME, simply because they are completely different things. For more information on the GNUstep project, visit: http://www.gnustep.org and http://gnustep.current.nu Running multiple instances of Window Maker ========================================== It is not a good idea to run more than one instance of Window Maker from the same user (so that wmaker will use the same configuration files) at the same time. You might get unexpected behaviour when Window Maker updates it's configuration files. If you really desire to do this, try running Window Maker with the command line option --static so that it will not update or change any of the configuration files. Sound support ============= Sound is supported for Linux and FreeBSD systems with the use of a separately distributed module called WSoundServer. There is also a graphical configuration tool for setting up your sounds called WSoundPrefs. You can download these at: http://shadowmere.student.utwente.nl/ Note that you must compile Window Maker with the --enable-sound configure flag and set the DisableSound option to NO. Performance Tuning ================== If you want to diminish Window Maker's memory usage and improve performance, while keeping a nice appearance and good functionality, follow the items bellow: - use solid textures for everything, mainly titlebars and menus. If you want a nice looking desktop, use the Traditional style. - turn NewStyle and Superfluous off - do not bind many shortcuts in the menu and keep only the essential items in the menu - turn on DisableClip - edit wconfig.h and disable the NUMLOCK_HACK and the features you don't use anyway (keep in mind that some of the #defines might not work, as they are not fully supported). Make sure to always keep NumLock and ScrollLock turned off. - turn on DisableAnimations. You can also #undefine ANIMATIONS in wconfig.h - strip down the default IconPath and PixmapPath entries to contain only the paths that you really have in your system. - do not use large images in the root background - remove support for image formats you don't use - to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE environment variable to 0. If you want to increase performance at the cost of memory usage, set it's value to a value like the number of different icons you use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL. Keyboard Mouse Control ====================== Many people ask about adding keyboard control of mouse, like in fvwm, but Window Maker will not have such feature. The XKB extension supports mouse simulation from the keyboard, in a much more powerfull fashion than any simulation done by a window manager. To enable it, hit the Control+Shift+NumLock or Shift+NumLock key combination. You should hear the speaker beeping. To disable it, do the same thing. To control the mouse the numeric keypad is used as follows: - 4 (left arrow), 7 (Home), 8 (up arrow), 9 (PgUp), 6 (right arrow), 3 (PgDn), 2 (down arrow) and 1 (End) move the mouse to the corresponding direction; - holding one of the above keys and then holding the 5 key will move the pointer faster; - / will select the first mouse button (left button); - * will select the second mouse button (middle button); - - will select the third mouse button (right button); - 5 will do a click with the currently selected mouse button; - + will do a double-click with the currently selected button; - 0 (Ins) will click and hold the currently selected button; - . (Del) will release the currently selected button that was previously clicked with the 0 (Ins) key. The above key values work in a XFree86 3.2 (X11R6.1) X server but your milleage may vary. How to make a gdb backtrace =========================== Backtraces can help us fix bugs that make Window Maker crash. If you find a bug that crashes Window Maker, please send a backtrace with your bug report. To make a usefull backtrace, you need a core file with debugging information produced by Window Maker when it crashes. It should have been installed without stripping too. To compile wmaker with debugging information: ./configure make CFLAGS=-g If you get the dialog window telling you that wmaker crashed and asks you what to do, tell it to "Abort and leave a core file". script cd src gdb .libs/wmaker path_to_the_core_file Then, in the gdb prompt type "bt". Quit from gdb by typing "quit" and then, in the shell prompt, type "exit". The file named typescript will contain the backtrace. Copyrights & Disclaimers ======================== Window Maker is copyrighted by Alfredo K. Kojima and is licensed through the GNU General Public License. Read the COPYING file for the complete license. The icons that are distributed with this program and were made by Marco van Hylckama Vlieg, are licensed through the GNU General Public License. Read the COPYING file for the complete license. The icons listed in COPYING.WTFPL and are distributed in this program and were made by Banlu Kemiyatorn (]d), are licensed through the "do What The Fuck you want to Public License". Read the COPYING.WTFPL file for the complete license. NeXT, OpenStep and NEXTSTEP are a trademarks of NeXT Computer, Inc. All other trademarks are property of their respective owners. The authors reserve the right to make changes in the software without prior notice. Authors ======= Alfredo K. Kojima <kojima@windowmaker.info> Dan Pascu <dan@windowmaker.info> ]d <id@windowmaker.info> Please don't ask us questions before reading the documentation (esp. the FAQ, this file and INSTALL files) and about "cool" things you see in people's desktop screenshots. The AUTHORS file contains a list of the people who have contributed to the project. The name of people who have helped with localization (translation) can be found in po/README and Window Maker/README If you have any comments, fixes and bug reports (filled BUGFORMs) send them to developers@windowmaker.info
Description
My personal playground of Window Maker repository (cloned from http://repo.or.cz/w/wmaker-crm.git)
Readme
25 MiB
Languages
C
90%
Shell
2.9%
M4
2.6%
Perl
2.6%
Makefile
0.9%
Other
0.8%