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

201 Commits

Author SHA1 Message Date
Giuseppe Gatta
a97699c513 Enable toggling of AppIcons bouncing
I have noticed that in WindowMaker 0.95.2 application icons bounce
when some actions are done, like starting a program, etc.

Disabling Superfluous or Animations also disabled the minimizing
animation which I am used to, so doing that didn't do the job.
Everyone has got his or her own tastes, but I did not like the new
behavior and didn't find any way to disable it without affecting other
things.

So I made a patch to fix just that. It adds a new option in WPrefs.app's
Expert Tab called "Do not make AppIcons bounce" which when enabled,
disables any type of bouncing for Application Icons, restoring the
old behavior.

Bouncing stays the new default behavior.
2012-02-23 11:58:57 +00:00
Iain Patterson
07a0639c93 Don't shrink icons in switchpanel.
Icons in the switchpanel are constrained to the value of the IconSize
preference but the grid in which they are arranged is fixed at 64 pixels.
If IconSize is less than 64x64 the panel will show smaller icons with a
wide spacing, which looks pretty stupid.

Fix it by forcing the switchpanel to attempt to load images at the size
it's going to use.  The icon it actually gets may of course still be
smaller.
2012-02-16 09:13:01 +00:00
Carlos R. Mafra
393a917a4f Remove dead code ifdef'ed by GRADIENT_CLIP_ARROW
GRADIENT_CLIP_ARROW was never defined anywhere and having fancier clip
arrows is not something particularly interesting, so let's simply remove
the code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2012-02-11 19:08:28 +00:00
Iain Patterson
8d7c725b7b Made ARROWLESS_KBD a preference.
Replace the ARROWLESS_KBD #define with the ViKeyMenus preference.

When ViKeyMenus is TRUE, users can type h/j/k/l to scroll around menus.

Since ARROWLESS_KBD was previously undefined by default, ViKeyMenus is
FALSE by default.
2012-02-10 12:39:24 +00:00
Carlos R. Mafra
cbe2f4e61a Inotify: Reload keyboard shortcut definitions when configuration changes
Despite having the inotify mechanism compiled in my WM, everytime I
changed a keyboard shortcut definition in the WMRootMenu via WPrefs
I was required to open the WMRootMenu (eg with the F12 key) for the
change to take effect...annoying.

So explicitly reload the key bindings when a modification inside
~/GNUstep/Defaults/ is detected. As the inotify mechanism calls the
function wDefaultsCheckDomains() when that happens, let's add a call
to rebind_key_grabs() in there.

Now it works fine and changes are automatically in effect once WPrefs
writes the menu.

PS: rebindKeygrabs() renamed to rebind_key_grabs()...
2012-01-22 16:42:31 +00:00
Christophe CURIS
e01d14abe4 Fix possible missing NUL at end of string
There are were a few uses of 'strncpy' that could lead to a missing NUL,
resulting in possible garbage being displayed. As suggested by Tamas,
use 'wstrlcpy' instead
2011-08-08 19:11:22 +02:00
Ambrus Szabo
a750fe03f4 opaque resize
WPrefs:
 WindowHandling page: Mouse opaque resize
 Expert page: Opaque move and resize with keyboard
2011-03-30 23:32:37 +02:00
Tamas TEVESZ
f65b99e615 Remove warnings
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
2011-03-24 16:19:52 +01:00
Brad Jorsch
85f31104cd Display modifiers in window menu
The window menu displays the shortcut key for operations with a
shortcut, but does not display the modifiers. This reduces the utility
of the display as it's hard to know whether "h" means "Mod4+h" or
"Ctrl+Mod4+h" or something else.

This patch prefixes those shortcut displays with the modifier names,
e.g. Ctrl+Mod4+h, and adds a preference ModifierKeyLabels to allow
overriding this, e.g. to "⌃◇h". It doesn't add this preference to
WPrefs, if someone else wants to do that feel free.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-11-17 02:53:04 +01:00
Brad Jorsch
ee1f13da45 Fix wIconUpdate logic
This patch changes the logic for choosing the icon, and gets rid of
wIconChangeImage in favor of wIconChangeImageFile.

Old logic:
* On create, load either NET_WM_ICON or the file from disk.
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. WM_HINTS icon_pixmap
  3. Whatever was loaded on creation, unless wIconChangeImage or
	 wIconChangeImageFile was called.
  4. Default icon.

New logic:
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. NET_WM_ICON
  3. WM_HINTS icon_pixmap
  4. Icon file from disk.
  5. Default icon.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:00:24 +02:00
Tamas TEVESZ
3c408fa179 Update local copy of GPLv2 and FSF address in copyrights
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
1f21919809 Remove wsyserrorwithcode, rename wsyserror to werror
wsyserrorwithcode - Not used, no point either.
wsyserror->werror - qualifying "error" with a "type" hardly makes
sense if there are not at least two "type"s. There are not. Safe trip.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
f206c15fea Repair defaults for new titlebar button style
Originally missed in 17cc7c3c

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
2bc0c1124a Pretty-print for string2index
Turns unhelpful
wmaker: warning: wrong option value for key "NewStyle". Should be one of new, old, next
into helpful
wmaker: warning: wrong option value for key "NewStyle". Got "YES", should be one of "new", "old", "next"

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Brad Jorsch
ece6d213aa Option to raise bouncing appicons
If the appicon is not in the dock/clip, or the dock/clip is not set to
"Keep on Top", there's a good chance you won't actually see the bouncing
because some other window is covering the appicon.

Besides adding the option to raise bouncing windows, this patch adds a
utility method to move a window back into its correct stacking position
after it has been messed with using XRaiseWindow.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-09-17 22:40:42 +02:00
Brad Jorsch
5b24997446 Add a preference for XUrgencyHint bouncing
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-09-17 22:40:42 +02:00
Alexey I. Froloff
790917a8e7 Option to disable clip title
Completely disable clip caption.

Original-patch-by: Alexey Voinov <voins@altlinux.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-12 15:21:05 +02:00
Alexey I. Froloff
17cc7c3c77 New titlebar button style
This patch adds new titlebar button style.

Original-patch-by: Carlos Torres <vlaadbrain@operamail.com>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:32:57 +02:00
Alexey I. Froloff
f41db5b5be Add key binding to minimize all windows
MinimizeAllKey - minimize all windows on current workspace.

Original-patch-by: Pavel S. Khmelinsky <hmepas@yauza.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>

[crmafra: AllMinimizeKey --> MinimizeAllKey]
2010-09-11 15:46:24 +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
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
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
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
Tamas TEVESZ
1a0c8afa80 Remove texture plugins
- leave a note for the unlikely case of such configuration being found,
  the user is notified properly
2010-03-26 21:08:16 +01:00
Tamas TEVESZ
c7868fa405 Make inotify optional
This time keeping the ability to fall back to the old polling method.
2010-03-23 21:50:17 +01:00
Carlos R. Mafra
5178465bb6 Remove DEBUG statements, #if 0 etc
...and some other cleanups.
2010-03-20 18:42:56 +01:00
Carlos R. Mafra
e1d5ce7a51 Cleanup includes of wcore.h, defaults.h and pixmap.h
Several files were including others for no reason, and this slows
down the build time (but probably not measurable on a fast machine).
2010-03-17 11:12:53 +01:00
Carlos R. Mafra
6367bf5234 Remove HEARTBEAT #ifdef's 2010-02-11 10:29:26 +01:00
Carlos R. Mafra
708cf2d2a2 Remove unused stuff from src/defaults.c 2010-02-11 10:29:14 +01:00
Carlos R. Mafra
6723aa55aa Remove old backward compatibility code
Once upon a time (< 2005) the CachedPixmaps directory was located
at ~/GNUstep/.AppInfo/ and that was later moved to
~/GNUstep/Library/WindowMaker. So Dan Pascu introduced this function
in 24519b6292 to make the convertion
automatically to users back then.

As it is highly unlikely that there is an old-timer wmaker user still
running a pre-2005 wmaker which suddenly decides to switch to wmaker-crm
and runs into trouble with his CachedPixmaps folder, let's simply remove it
to make defaults.o 1.8% smaller (596 bytes).
2010-02-11 10:29:14 +01:00
Carlos R. Mafra
72dfe4aa89 Remove VIRTUAL_DESKTOP code
Even the option to enable "virtual desktop" in configure.ac was
commented out...and I would never intend to use it anyway.

So let's just remove the ~800 lines of #ifdef'ed code to have a
cleaner code base to read when bored.
2010-01-09 13:48:06 +01:00
Carlos R. Mafra
643e49f190 Remove [raise,lower]clip shortcut keys
The raising and lowering of the clip is already taken care of
by the "ClipRaiseLowerKey" shortcut.

wmaker gets a bit smaller for free:
   text    data     bss     dec     hex filename
 449483   17384    8208  475075   73fc3 src/.libs/wmaker.old
 449307   17256    8192  474755   73e83 src/.libs/wmaker.new
2010-01-09 13:47:57 +01:00
Brad Jorsch
b6689a0108 Keyboard shortcut to raise the dock
This patch adds the DockRaiseLowerKey shortcut, which raises/lowers
the dock depending on whether the dock is lowered/raised.

[crmafra: Reformatted Brad's patch against git repo and removed the
 DockRaiseKey and DockLowerKey shortcuts ]
2010-01-07 12:16:17 +01:00
Ralf Hoffmann
fe8ab024af fixed wrong env setup when setting background
This patch fixes a problem with restarting Window Maker in multi-screen
environments. The code for setting the background by calling wmsetbg
changes the environment. In multi-screen setups the DISPLAY variable
becomes :0.0 instead of :0 (for example). The restarted Window Maker
process therefore only manages one screen.
2009-12-08 16:14:29 +01:00
Carlos R. Mafra
e7cc15df71 Remove unused function getRImages()
Pointed out by Nicolas Bonifas.
2009-12-06 15:35:26 +01:00
Johann Haarhoff
a063338175 Mod+Wheel Window Resize
This patch adds the ability to resize windows with the mouse wheel
while holding the Mod key. This currently ignores wWindowConstrainSize
until I can figure out a way to repeatably resize windows with
fixed size increments (like xterm) using this method.

This also adds a slider to WPrefs to choose the increment with which
the wheel will resize a window.
2009-10-11 22:17:54 +02:00
Carlos R. Mafra
2765bec3e4 Remove sound support
Two reasons for removing it:

    1) I won't ever want to hear useless sounds

    2) The sound support is a bit of a joke. The code is there but you have
       to hunt it somewhere else (not in any repository that I know of).
       In my 10 years of using wmaker, I never used it for this reason.
       Now I consider having no sound in Window Maker a feature, and I like
       it that way. So there is no point in carrying useless code around.

PS: There is still the code in WPrefs to be removed.
2009-10-09 20:04:47 +02:00
Iain Patterson
18408fff93 Mac OS X-style window cycling.
For those not familiar with the way Macs cycle windows, the Command-Tab
sequence (Alt-Tab elsewhere) switches between DIFFERENT application windows
and Command-Grave (key above tab) switches between windows owned by the
SAME application as is currently focused.  So if you had three Safari and
two Finder windows open, and Safari had focus, Command-Tab would switch to
Finder; Command-Tab would switch back to Safari; Command-Grave would switch
to a different Safari window etc.

This patch implements "something like" the above by only populating the
switchpanel with windows matching the currently-focused WWindow's wm_class
when the new cycling mode is activated.  In practice this means you can
switch to The Next XTerm or The Next Firefox Window using this method.

The configuration names for these new shortcuts are GroupNext and
GroupPrev.  The patch tells WPrefs.app about them.  Of course switching to
The Next Window is still possible with the (unchanged) FocusNext and
FocusPrev keys.
2009-09-14 16:51:26 +02:00
Alexey Voinov
05720d9707 Add history to some dialog boxes
This patch adds history to some dialog boxes. To use it replace %a with
%A in menu file (like in "Run..." menu item). You can specify third
parameter to %A to use different histories for differen dialogs.

All history files is kept in ~/GNUstep/.AppInfo/WindowMaker/ and the number of
history lines controlled by DialogHistoryLines parameter (one for
all dialogs) defaults to 500 lines.

It also adds Tab completion.

Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>
2009-09-03 15:44:11 +02:00
Sebastien Bauer
f8dd3dc49e Add option to allow starting DockApps with a single click
This patch is from the contrib directory. It adds an option to allow starting
DockApps with a single click. It's a handy option that adds only a few lines to
the code.

It is a good feature patch example because it includes modifications
to the WPrefs application so that the feature can be easily enabled or
disabled. The one-click ability allows wmaker to integrate more seemlessly with
programs like ROX-Filer which can be configured to use single or double click
actions.

The README in the contrib/ directory says,

author:
Sebastien Bauer <seb_bauer@bigfoot.com>
John Morrissey <jwm@horde.net>

updated for Window Maker 0.65.0 by:
Daniel Richard G. <skunk@graphics.lcs.mit.edu>

updated for Window Maker 0.80.2 by:
Martial Daumas <martial@nasgaia.org>

update for 0.80.2+ by:
steve lion <steve.lion@verizon.net> and vlaad
2009-09-03 15:19:10 +02:00
Carlos R. Mafra
cf62d1591f Maximus: Tiled Maximization
This patch introduces the "tiled maximization" feature, a.k.a. Maximus.

By pressing the keyboard shortcut associated with Maximus, the focused
window will be maximized to the greatest area satisfying the constraint
of not overlapping existing windows.
2009-09-02 04:42:05 +02:00
Johann Haarhoff
6924454836 Left Half / Right Half Maximize
This adds Left Half / Right Half Maximize capability to WindowMaker.
It allows you to maximize a window to only the left or right half
of your screen.

It is useful on widescreen displays where one might to bring up
two different windows side-by-side.
2009-08-29 21:49:16 +02:00
Martin Dietze
3f6ae395ce Add GLOBAL_DEFAULTS_SUBDIR and fix a syntax error in wmlib/Makefile.am 2009-08-24 11:55:20 +02:00
Carlos R. Mafra
fe736e849c Remove LITE config option
Why?

     1. The reason for its existence is to "Disable some stuff that are
        duplicated in kde", and I don't think I will ever need that.
        Furthermore, even the description in the configure script reads
        "disable some stuff (dont use it)".

     2. It makes the code uglier at some places, e.g.,

         #ifdef LITE
                {
         #if 0
                }
         #endif
         #else

                if (!wRootMenuPerformShortcut(event)) {
         #endif

        which by the way is the ugliness which motivated this patch.

     3. Does not even compile anymore. It fails with

          CC dockedapp.o
          CC event.o
       event.c: In function 'executeButtonAction:
       event.c:711: error: WScreen has no member named root_menu
       event.c:712: error: WScreen has no member named root_menu
       event.c:713: error: WScreen has no member named root_menu
       event.c:715: error: WScreen has no member named root_menu
       event.c:720: error: WScreen has no member named switch_menu
       event.c:721: error: WScreen has no member named switch_menu
       event.c:722: error: WScreen has no member named switch_menu
       event.c:724: error: WScreen has no member named switch_menu
       make[2]: *** [event.o] Error 1
       make[1]: *** [all] Error 2
       make: *** [all-recursive] Error 1

       But instead of fixing this (it would be trivial), let's get
       rid of the whole ugliness altogether.
2009-08-23 18:45:30 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
Carlos R. Mafra
e2d8cbe238 Remove unsigned type from 'mask'
gcc-4.3.2 warns:

    defaults.c: In function 'getModMask':
    defaults.c:2586: warning: comparison of unsigned expression < 0 is always false

    The line in question is

        if (mask < 0)

    and 'mask' is the return of wXModifierFromKey() which is an 'int' and can
    indeed return a negative value (see src/xmodifier.c), so let 'mask' be
    an 'int' too.
2009-08-18 16:28:43 +02:00
Carlos R. Mafra
cb31fd374c Sanitize calling sites of wDefaultsCheckDomains()
There is no point in having parameter in wDefaultsCheckDomains() and
not using it, so let's simply remove the parameter altogether and
avoid silly-looking things like

    wDefaultsCheckDomains("bla");
2009-08-18 16:20:18 +02:00
Carlos R. Mafra
f4fd88b8a9 Make loop variable be unsigned int
gcc was complaining in a few places things like:

defaults.c:890: warning: comparison between signed and unsigned

so let's just make the loop counting variables be unsigned, as
the never get negative anyway.

I also spotted other two variables which can be unsigned too.
2009-08-18 16:19:48 +02:00
Carlos R. Mafra
f36ab39680 Fix variable shadowing
gcc-4.3.2 warns:
defaults.c:3136: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:309: warning: shadowed declaration is here

and in a few other places too. Fix this by renaming 'index' to 'widx'.
2009-08-18 16:17:28 +02:00
Carlos R. Mafra
0c469de04f Fix gcc warnings
This patch fixes the following warnings (with gcc 4.2.3)

    defaults.c:980: warning: unused variable 'replace'
    main.c:504: warning: 'watchPath' may be used uninitialized in this function
    main.c:504: note: 'watchPath' was declared here
    startup.c:616: warning: implicit declaration of function 'XrmUniqueQuark'
2008-11-10 01:42:50 +01:00