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

220 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
0a461416e3 Avoid icon change to default on winspector save
For a icon, the icon image is stored in icon->file_image. If we repaint
the image, we we don't need search the icon again. We can continue using
icon->file_image.

Indeed, if launch the "window inspector" window (winspector), using a
saved icon and "ignore client icon" set, then the database holds the
name of the icon to draw on the screen. If we remove the icon info in
the winspector (removing the file name or un-setting the "ignore client
icon" flag, then the database losts the icon name and then the function
wDefaultUpdateIcons() cannot find the icon to draw for the icon.

In winspector, with this patch, the previous image set by "ApplySettings"
and stored at icon->file_image is used.
2012-11-29 09:37:42 +00:00
Rodolfo García Peñas (kix)
99e5a7a9eb winspector.c: Full clean patch
This patch sets a correct style on winspector.c. It removes some
empty lines, moves variable definitions to the function heads,
moves preprocessor definitions to the top of the file and removes
some extra curly brackets.

The function to create the winspector panel is so big, and is hard
to understand it. This patch split the function createInspectorForWindow
in some extra functions:

create_tab_window_attributes
create_tab_window_advanced
create_tab_icon_workspace
create_tab_app_specific

This functions don't do nothing extra, only the code is moved to them.
2012-11-29 09:27:30 +00:00
Martin Frydl
914d4e06ef Added option to ignore minimized windows during cycling.
Added CycleIgnoreMinimized configuration option settable on Expert page in WPrefs.
When option is set, switch panel cycling ignores minimized (grayed) windows. They
are still visible and can be selected using left/right arrows or mouse click.
2012-11-28 00:07:13 +01:00
BALATON Zoltan
c7e3666e62 Made highlighting the AppIcon of the active app configurable at run time 2012-11-17 20:32:10 +01:00
Rodolfo García Peñas (kix)
cc1503a2f0 wAppIconPaint argument removed
This patch removes the wAppIconPaint() Bool flag, because now it is
always False.
2012-11-11 11:59:41 +00:00
Rodolfo García Peñas (kix)
33ebded4f9 wAppIconPaint paint argument
The function wAppIconPaint has a new argument. This argument is used
to force an icon create if needed.
2012-11-11 11:57:58 +00:00
Rodolfo García Peñas (kix)
ff9f942c47 Better default icon management
This patch replaces the Pixmap icons from screen.h with only one
RImage. This image is not processed yet, therefore could be used
for icons with title or without it (replacing def_ticon_pixmap and
def_icon_pixmap variables).

Now the code is better because the Pixmap is generated and saved in
the icon structure.

See that before this patch, the icon->pixmap was set to None!!
With this patch, the icon->pixmap is saved, using the common
method used in the other functions to create Pixmaps, the function
icon_update_pixmap().
2012-10-28 10:58:43 +00:00
Rodolfo García Peñas (kix)
bef6555b6a noDefault changed to default_icon
The functions wDefaultGetIconFile(), get_default_icon_filename() and
get_generic_value() use the argument noDefault in order to avoid searching the
default icon. This double negation is difficult to read though. This patch
changes it to be True if the default icon should be included or false if not.

This patch changes the noDefault argument to default_icon, then the
True is now False and False is True.

The main change is at get_generic_value():

-       /* Search the default icon name - See noDefault argument! */
-       if (!value && !noDefault) {
+       /* Search the default icon name - See default_icon argument! */
+       if (!value && default_icon) {

Because the functions wDefaultGetIconFile() and get_default_icon_filename()
mainly forwards the noDefault argument to get_generic_value().
2012-07-18 11:12:01 +01:00
Rodolfo García Peñas (kix)
d6db53af0b Remove unused argument from wDefaultGetIconFile()
The function wDefaultGetIconFile() doesn't use the argument WScreen,
so it can be removed.
2012-07-04 20:44:40 +02:00
Rodolfo García Peñas (kix)
6bdc1318c1 Moving header functions to main.h
The functions of main.c should be included in main.h, not in funcs.h.
This patch adds the main.h file and moves the function prototypes to
this file.

The not needed "include funcs.h" are removed.
2012-06-24 12:32:36 +01:00
Yuri Karaban
9d3d34599f Add "Center" window placement strategy
Center strategy: try to put window at the center of the usable area. If
window would overlap with existing windows, fall back to "Auto"
placement strategy.

It's very useful for fresh workplaces.
2012-06-10 18:25:47 +01:00
Rodolfo García Peñas (kix)
1a594de74e Remove code duplication by calling readGlobalDomain()
The code in defaults.c to get the shared database is
included in the same file (function readGlobalDomain).
2012-06-10 12:27:27 +01:00
Rodolfo García Peñas (kix)
21a5f41c08 New function create_logo_image
New function create_logo_image to set the logo image.
2012-06-02 20:58:58 +01:00
Tobias Stoeckmann
cc30444dda No need to call memset after wmalloc
memset is the last function call in wmalloc, just before it returns the
newly allocated memory.  Therefore it is not needed to call it again
after wmalloc call.  Although I would prefer to switch wmalloc to a
calloc-based wcalloc function, the compatibility of WINGs for old apps
should be kept.
2012-05-04 18:41:01 -03:00
Carlos R. Mafra
8311058a16 Revert "Inotify: Reload keyboard shortcut definitions when configuration changes"
This reverts commit cbe2f4e61a.

The reason for the revert is the regression reported here:
http://marc.info/?l=openbsd-ports&m=133151145814675&w=2

  I've been able to reliably reproduce the double-spawning of
  xterms I've been seeing. The bad news is that it still happens
  even with a fresh configuration directory.

  To reproduce:
  0) Create a keyboard shortcut if one does not already exist (I'm
  using <ctrl>+u set to spawn an xterm)
  1) Open WindowMaker's preferences.
  2) Click on "Applications Menu Definition" (it's the icon
  immediately to the left of the keyboard icon)
  3) Click save, and then close.
  4) Keyboard shortcuts will spawn two applications.

  I use keyboard shortcuts to spawn xterms, browsers, and filemanagers.
  All of them spawn twice after performing the above.  To fix it,
  <F12> or <right-click> -> Exit -> Restart.

  If I repeat steps 1-3, three windows will spawn.  Repeat again and
  four windows will spawn etc.  (I stopped after getting five to
  spawn at once).
2012-04-30 14:36:43 -03:00
Rodolfo García Peñas (kix)
761fd37e51 WindowMaker: Clean curly brackets
This patch removes the unneeded curly brackets in multiple files.

It also add some comments in the code. In usermenu.c removes some
variables not used.
2012-04-15 23:15:20 -03:00
Rodolfo García Peñas (kix)
517cd6a8be Remove unused functions
These functions are not used:

- wDefaultsDestroyDomain
- PropWriteGNUstepWMAttr
- wSessionSendSaveYourSelf
- wXDNDClearAwareness
- clearWaitingAckState
- wSessionSaveClients
2012-04-04 19:44:40 +01:00
Iain Patterson
8352c9ef60 Allow relaunch with shortcut key.
Use the WindowRelaunchKey shortcut to examine the WM_COMMAND property of
the active application's main window and launch a new instance of the
application using the retrieved command line.
2012-04-04 12:12:12 +01:00
Alexey I. Froloff
e819818eeb Options for limiting window/menu title height
(Window|Menu)Title(Min|Max)Height defaults options allow to set
minimum and maximum titlebar height.

For example, to force all titlebars to 24 pixels execute
following commands:

$ wdwrite WindowMaker WindowTitleMinHeight 24
$ wdwrite WindowMaker WindowTitleMaxHeight 24
$ wdwrite WindowMaker MenuTitleMinHeight 24
$ wdwrite WindowMaker MenuTitleMaxHeight 24

Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2012-02-27 14:19:49 +00:00
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