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

3880 Commits

Author SHA1 Message Date
Stig-Ørjan Smelror
1dace5699f Drop support for Imagemagick version < 7
Had to do a few modifications to get WM to build with Imagemagick 7.

Attached is the diff from the latest git checkout.

Cheers,
Stig
2019-02-12 19:14:01 +00:00
Tim Taenny
5a95631091 Added expert option for WrapAppiconsInDock property to WPrefs
In 2013 Daniel added the functionality to wrap icons, which are
attached to the dock, around the screen edges when the dock is
being moved vertically.
This patch adds an expert option to WPrefs.app for setting the
property which enables/disables this feature.

Remark: In my opinion, the default value for that property should
        be changed to NO, as this is also the default behavior in
        NeXTSTEP. It is handy to be able to move all these icons
        out of sight when working with maximized application
        windows.
2019-02-05 21:32:04 +00:00
Tim Taenny
2427200c3e Added feature: automatic scaling of application icons
If the option "Enforce icon margin" is selected, application window
icons will be selected or scaled so that they only use 75% of the
available icon_size.
Even if the feature is not enabled, this change will scale down
large application icons to icon_size, so that icons can be used
that were rejected by the previous implementation of findBestIcon.
(Example: The Qt Creator icon never showed before, because it is
only provided in 128x128 resolution. Now it's visible.)
2019-01-31 17:22:49 +00:00
Tim Taenny
d6c1ac3ecf Added icon feature option to WPrefs: Enforce icon margin
The current findBestIcon function usually selects an icon image
that almost completely fills up the (default) 64x64 pixels of an
icon. As Dan noted in the function, the icon images should use only
75% of the available space, which would result in room for the
miniwindow title and better overall aesthetics.

This feature option provides for enabling such an automatic "icon
shrinking" functionality.

Note: This commit only introduces the new option, not the actual
      image shrinking.
2019-01-31 17:22:49 +00:00
Tim Taenny
9b5eaa3d3e Use popup button for animation style instead of option group in WPrefs
To make some room for an additional icon option (yet to be committed)
the options group for selecting the iconification animation is
replaced by a popup button. This allows for adding at least two more
checkboxes in the options and makes adding new animation styles less
painful.
2019-01-31 17:22:49 +00:00
Tim Taenny
2beb5f2c52 Fixed icon loading during Attribute Inspector startup
When opening the "Icon and Initial Workspace" panel of the Attribute
Inspector, the Miniwindow Image and the corresponding text field were
always empty, even if an icon had been selected, applied and saved
before. The file name was not loaded from the database on startup
of the inspector window.

With this change, the icon and the text field are properly set on
startup of the inspector window.
2019-01-30 23:43:23 +00:00
Carlos R. Mafra
f1809a7786 wmgenmenu: add a few programs 2019-01-22 22:25:06 +00:00
Gaspar Chilingarov
8b919b0d33 support moving window between heads using keyboard
Window Maker allows to perform practically all operations with windows
using only keyboard. One of the actions so far which required using
mouse was dragging window from one head (monitor) to another.

This patch introduces support for keyboard shortcuts. These shortcuts
move windows in circular fashion (if you have 3 and more monitors).

In case of 2 or 3 monitors arranged horizontally - window will just move
right/left.

In case of 3x3 setup - it is impossible to move window to central
monitor with keyboard.

- preserves window position and size (if display sizes are same)
- otherwise tries to fit window to smaller display
2018-12-16 10:13:50 +00:00
Doug Torrance
d13b78bdde configure: Fix pkg-config variable typo.
The variable set by PKG_PROG_PKG_CONFIG which points to the pkg-config
utility is PKG_CONFIG, not PKGCONFIG.  The latter was previously used
when trying to detect the presence of the MagickWand library when Window
Maker was built using --enable-magick.
2018-08-08 08:51:45 +01:00
Gaspar Chilingarov
6668715402 Detect and override illegal window size hints
The problem - when VirtualBox starts virtual machine, window has very
small height (couple of pixels) and it requires some manual fiddling
to resize it to something usable.

See related bugs here:

https://www.virtualbox.org/ticket/14718#comment:19 - small horizontal
line in the middle of the screen is newly opened virtual machine's
window.

https://www.virtualbox.org/ticket/15863

Inspecting with xdebug and xprop reveals that VirtualBox sends wrong hints:

Request(12): ConfigureWindow window=0x0660000a values={x=27 y=559
width=720 height=65512}

Which is interpreted by X server wrongly and shown with xprop as

WM_NORMAL_HINTS(WM_SIZE_HINTS)
:
                user specified location: 27, 559
                user specified size: 720 by -24
                program specified minimum size: 254 by 109
                window gravity: Static

Some part of X11 interprets such large value as signed int and wraps
it to negative value.

The solution will be if program requests such big window - detect it,
ignore requested size and resize it to some reasonable defaults.

Disclaimer - I tested it only on Ubuntu 16.04, but should apply to
another systems as well - see bug reports.
2018-05-21 13:02:22 +01:00
Doug Torrance
100745d356 setstyle: Add support for fpixmap ("fillscale") textures 2018-05-15 19:55:28 +01:00
Doug Torrance
7c89ca2551 menu: Fix broken "Save Theme" option.
This option had been broken for several reasons:
* The getstyle utility does not replace the #usergnusteppath# macro which
  was passed to it by the menu.
* When processing the USER_THEMES_DIR macro, the menu inserts a space
  afterwards, and so the directory and filename were passed to getstyle
  as two separate arguments.
* It used the old, pre-0.50.0 theme format.

By using the -p option to getstyle, we can avoid these issues, as we don't
need to specify the directory *and* it uses the 'new' (since 1999) themepack
format.
2018-05-15 19:43:25 +01:00
Doug Torrance
0c737bc834 Add new Adwaita style to Makefile. 2018-05-15 14:26:51 +01:00
Doug Torrance
b3f8d0997b New Adwaita style which approximates the look of the default GTK theme. 2018-05-15 10:13:48 +01:00
Doug Torrance
673ea18020 Update mailing list links to new Google Groups. 2018-05-14 16:51:23 +01:00
Bad Sector
c89ec25c80 Fixes missing appicons after restarting Window Maker
Fixes the bug where if the icon image is accidentally set to
nothing or the image file is deleted, the appicon keeps losing
its icon (it resets to the default cube icon) when Window Maker
exits/restarts (depending on how the user cleared the icon this
may persist even after redocking the application if information
about the application window is still in the WM).  One way to
easily see this bug is to open the main window's attributes and
press the Save button (no need to do anything else) as this
clears the icon file (this is a separate bug that needs to be
fixed but it is more of a minor UI bug since clearing the image
should simply reset the icon to the application provided one if
the Ignore client supplied icon is not set).  Another way to
see it is to open the properties box in a docked application
that is not running and clear the image field.  After either of
these two actions are performed, restart Window Maker and see
that the icons are missing.

This patch fixes the above bug by calling save_appicon when the
appicon object is created and the application provided icon is
already available (window maker actually tries to save the icon
at an earlier stage but this is done as a side effect of
"painting" the dock icon - which also saves the icon - but this
is done too early, before ownership information is available).

Note that this bug seems to be a regression introduced from
commit 9c4b19d8aa (or one of the
related commits around the same time, they seem to be a bit too
aggressive in not saving icons).  This patch addresses the
concern in that commit about only saving the icon for docked
applications.
2018-04-18 10:09:38 +01:00
Bad Sector
569fbff07c wmaker: Add new advanced option to ignore decoration changes from clients.
This adds an option (IgnoreDecorationChanges in plist) for windows to
ignore any requests from the clients for changing decorations. Since the
default state for any window pre-request is to have all decorations visible
this basically means that applications cannot hide any of the titlebar,
sizing bar, titlebar buttons, etc and any hint that causes these elements
to be hidden will be followed by a restoration if this option is set.

 This is useful for broken clients (e.g. Steam) and clients that force
subpar client side decorations. It is basically a per-window setting of the
global advanced option to ignore Gtk hints, except that it also applies to
non-Gtk applications.
2018-02-14 08:16:55 +00:00
Bernhard M. Wiedemann
36879de261 texi2txt: Use ChangeLog date instead of build date
in order to make builds reproducible. See
https://reproducible-builds.org/
for why this is good.

This date call works with GNU date and BSD date. Without this patch,
/usr/share/doc/packages/WindowMaker/README.i18n will differ in the
line An alternative solution could use the $SOURCE_DATE_EPOCH
variable defined in
https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2017-12-24 11:58:20 -02:00
Alwin
bfd88e07e6 wmaker: Adding copyright year 2017
The Info Panel didn't show the current year.
2017-09-14 21:08:26 +02:00
Alwin
81b89f6a4c wmaker: Fixing a menu typo
There was a typo in background.menu. Although the menu worked fine, it
caused these errors in the logs:

  wmaker(WMReadPropListFromFile(proplist.c:1543)): error: error reading
    from file '/usr/share/WindowMaker/Backgrounds'
2017-09-14 21:08:26 +02:00
Alwin
6cfc71d40a Translations: Frisian language files for WPrefs and menus updated
Compacting two translations to fit the available space; two new strings.
The menus are now split like the English ones, using appearance.menu.fy
and background.menu.fy. A new comment was added to menu.fy.in.
2017-09-14 21:08:26 +02:00
Alwin
ccc676a2bf Translations: Dutch language files for WPrefs and menus updated
Compacting a translation to fit the available space; two new strings.
The menus are now split like the English ones, using appearance.menu.nl
and background.menu.nl. A new comment was added to menu.nl.in.
2017-09-14 21:08:26 +02:00
Doug Torrance
2dbd778ed4 WPrefs: Inform user which menu file is being edited. 2017-08-19 15:59:13 +01:00
Doug Torrance
f63635dd17 WPrefs: Save menu back to the file we read it from.
Previously, we saved any modifications back to WMRootMenu, regardless of
the file we read the menu from.
2017-08-19 15:59:13 +01:00
Doug Torrance
97702618de WPrefs: Display warning when attempting to modify a read-only menu file. 2017-08-19 15:59:13 +01:00
Doug Torrance
b68a1994c2 debian: Remove patch 54_Debian_wmmacros.diff.
This patch is now unnecessary, as we have removed the SETSTYLE and
LOCAL_*_DIR macros and have added the USER_*_DIR upstream.
2017-08-19 11:14:38 +01:00
Doug Torrance
fe459fbab3 menu: Add USER_*_DIR macros.
Inspired by the Debian patch 54_Debian_wmmacros.diff.  These macros are
actually already referenced in appearance.menu and background.menu, but
only Debian installations have taken advantage of them.

We use the new #usergnusteppath# macro to reference the user GNUstep path.
2017-08-19 11:14:38 +01:00
Doug Torrance
5f2dac318c menu: New macro #usergnusteppath# for user GNUstep directory
This macro is used when handling directories with OPEN_MENU, e.g., to list
available image files for setting the workspace background.

When parsing a menu file, we replace any instances of #usergnusteppath#
with either GNUSTEP_USER_ROOT or ~/GNUstep if the former is not set.  In
this way, authors of menu files do not have to worry about whether users
will have this variable set or not.

We also document this feature in WindowMaker/menu.in, which generates the
default English language old-style menu and currently contains the existing
documentation for the Window Maker menu system.
2017-08-19 11:14:38 +01:00
Doug Torrance
bfda22ef1a menu: Remove unused LOCAL_*_DIR macros.
We remove the macros LOCAL_THEMES_DIR, LOCAL_STYLES_DIR,
LOCAL_ICON_SETS_DIR, and LOCAL_BACKGROUNDS_DIR.

They were only referenced in the Debian patch 54_Debian_wmmacros.diff, which
set them to /usr/local/share/WindowMaker/{Themes,Styles,etc.}.

In a default installation, THEMES_DIR, STYLES_DIR, etc. coincide exactly
with these paths.  In a Debian installation (which defaults to /usr/share
instead of /usr/local/share), it seems unlikely that a user would have these
files in both locations.
2017-08-19 11:14:38 +01:00
Doug Torrance
46daa76f77 menu: Remove unused SETSTYLE macro. 2017-08-19 11:14:38 +01:00
Doug Torrance
02cc702029 WPrefs: Edit proplist menus referenced by WMRootMenu.
Previously, WPrefs could only be used to edit the menu specified in
WMRootMenu.

In a recent commit, the ability to specify a menu in proplist format defined
in another file which is referenced by WMRootMenu was added.  However, if a
user attempted to edit such a menu in WPrefs, an error dialog appeared.

We add the ability for WPrefs to read such a menu.  After the user makes any
changes, the result is stored in WMRootMenu, and *not* the original file.
2017-08-19 11:14:38 +01:00
Doug Torrance
6f195b18fc WINGs: WMIsPL* functions return False if proplist is null.
Previously, calls to WMIsPLString, WMIsPLData, WMIsPLArray, and
WMIsPLDictionary would result in a segfault if the argument was null.
This could happen, e.g., if we are checking which type of proplist
was just parsed from a file, but the parsing failed.

These functions now return False in this case.
2017-08-19 11:14:38 +01:00
Doug Torrance
101ef6f28e menu: For consistency, use appearance.menu for English-language menus. 2017-08-18 02:14:11 +01:00
Doug Torrance
5a5595f76c menu: Add WPrefs to appearance.menu.
WPrefs appears under the 'Appearances' submenu of both menu and plmenu.
2017-08-18 02:14:11 +01:00
Doug Torrance
1a5abe9d84 menu: Add Bluemarine to solid background color options.
This color was present in menu and plmenu, but not background.menu.
2017-08-18 02:14:11 +01:00
Doug Torrance
d364afff02 menu: Write data directory during build instead of with wmaker.inst.
Many of the menu files contain the macro #wmdatadir# as a placeholder for
the data directory containing Window Maker themes, styles, background
pixmaps, etc.  This macro is replaced by the the actual path to the data
directory (by default /usr/local/share/WindowMaker) by the wmaker.inst
script, but only when copying WMRootMenu to the user's home directory.

Instead, we replace the macro during the build.  This way, *every* menu
file has the correct path.

Note that several of the files in question were not previously generated
during build.  These have been renamed with a .in extension.
2017-08-18 02:14:11 +01:00
Doug Torrance
273d17a0be menu: Include all aspect ratio options for background pixmap.
The background menu was missing "centered", "maximized", and "filled".

This closes Debian bug #85591 [1]:
  The current default for the scaled backgrounds menu is to use
  scaling without keeping the aspect ratio.

  This very rarely yields to a usable background.

  Could the default be changed to scaling with keeping the aspect
  ratio ?

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=85591
2017-08-18 02:14:11 +01:00
Doug Torrance
d6f754e747 debian: Update with version 0.95.8-2 packaging. 2017-08-15 10:34:03 +01:00
Doug Torrance
b07075aed3 wmaker: Allow WMRootMenu to reference menu files in proplist format.
Previously, WMRootMenu could either be a menu file in proplist format
itself, or it could reference another menu file in the old style format.

If WMRootMenu referenced another menu file in proplist format, this file
was parsed assuming it was in the old style format and thus failed, as
observed by Andreas Metzler [1].

In this patch, we first attempt to parse a referenced menu file as if
it were in proplist format.  If this fails, then we fall back on the old
style format.  This has the disadvantage of spamming the terminal with
various parsing errors if the menu file is in the old style format.

[1] https://www.mail-archive.com/wmaker-dev@lists.windowmaker.org/msg07097.html
2017-08-13 10:34:46 +01:00
Doug Torrance
ad4545b1d8 debian: Update with version 0.95.8-1 packaging. 2017-07-09 22:26:51 +01:00
Doug Torrance
ee36395ddf debian: Update with version 0.95.8-1~exp2 packaging. 2017-07-08 23:18:22 +01:00
Doug Torrance
ff865c31f0 wmmenugen: Sort menu entries with no category into 'Other'. 2017-07-07 09:59:29 +01:00
Doug Torrance
adc1687f98 wmmenugen: Use 'Other' instead of 'Applications' for unknown categories.
From https://standards.freedesktop.org/menu-spec/latest/apa.html:

 Category-based menus based on the Main Categories listed in this
 specification do not provide a complete ontology for all available
 applications. Category-based menu implementations SHOULD therefore provide
 a "catch-all" submenu for applications that cannot be appropriately placed
 elsewhere.

Emphasis on *submenu*.  By using 'Applications', these menu entries were
sorted into the top level.
2017-07-07 09:59:29 +01:00
Doug Torrance
ac0690b324 wmmenugen: Add reserved categories.
From https://standards.freedesktop.org/menu-spec/latest/apas03.html:

Reserved Categories have a desktop-specific meaning that has not been
standardized (yet). Desktop entry files that use a reserved category MUST
also include an appropriate OnlyShowIn= entry to restrict themselves to
those environments that properly support the reserved category as used.
2017-07-07 09:59:29 +01:00
Doug Torrance
c261f8ec35 wmmenugen: Add missing 'Science' menu category.
See https://standards.freedesktop.org/menu-spec/latest/apa.html
2017-07-07 09:59:29 +01:00
Christophe CURIS
e037ae3684 util: fix parsing of XDG menus with multiple groups
The specification for XDG menu files allows having more than one group and
assumes no constraint on their order. The original code assumed that once
the proper group marker was found, everything after was part of it, causing
misinterpretation of some data, like taking the wrong launch command.

This patch stops the parsing of the menu XDG file when a new group is
found, hence implementing the expected behaviour.

Reported-by: Andreas Metzler <ametzler@bebt.de>
2017-07-03 14:45:26 +01:00
Doug Torrance
83f0b764e6 WINGs: Set widget background pixmaps before realization.
Previously, when WMSetWidgetBackgroundPixmap() was called prior to
WMRealizeWidget(), no background pixmap was actually set.

This is because while the CWBackPixmap bit is correctly set to 1, the
CWBackPixel bit remains set to 1.  When XCreateWindow() is finally
called during realization, the background pixel takes precendence over the
background pixmap.

We fix this by setting CWBackPixel to 0 when setting CWBackPixmap to 1 and
vice versa.
2017-03-22 09:26:24 +00:00
Doug Torrance
3140c09240 wmaker: Consistent configuration options.
The default configuration options are given in two places in the source
code:
  - src/default.c
  - WindowMaker/Defaults/WindowMaker.in

The defaults are initially set in the former, but are then overwritten by
the latter.

Ideally, the default options in these two locations should coincide.
However, there are currently several issues.
- Many of the options are missing from WindowMaker/Defaults/WindowMaker.in
- Many of the options have conflicting defaults between the two locations.
- A number of options given in WindowMaker/Defaults/WindowMaker.in no longer
  exist.

In this patch, we bring the defaults in the two locations in line with one
another.  We have given preference to the defaults in W/D/WindowMaker, as
these are the one users have been used to.

Some of the paths in IconPath and PixmapPath have been removed.  In
particular, the various system pixmap paths (/usr/include/X11/pixmaps,
/usr/share/pixmaps, and /usr/local/share/pixmaps) have been removed in
favor of PIXMAPDIR, which is specified by the user at build.  Also,
/usr/share/icons has been removed from IconPath.  The root of this
directory will contain very few icons, as the icons themselves are located
in subdirectories corresponding to XDG icon themes.

We add a comment to src/defaults.c to remind future developers who
add or remove options to change the default values in both locations.

We also take the opportunity to remove the unused DEF_INFO_TEXT_FONT
macro.
2017-03-22 09:26:24 +00:00
Doug Torrance
8fba9945e0 WPrefs: Properly read system fonts in font configuration panel.
Previously, only the user's WMGLOBAL file would be read to determine the
current WINGs fonts (System Font and Bold System Font) in the Font
Configuration panel.  It is quite possible that this information would
not be in the user's WMGLOBAL file, but instead in the system WMGLOBAL
file.

We instead use the WMDefaultSystemFont and WMBoldDefaultSystemFont
functions to get this information.
2017-03-20 18:06:12 +00:00
Carlos R. Mafra
30cd22859a Merge branch 'master' into next
I forgot to add the wmaker 0.95.8 commit back into the next
branch. Doing it now.
2017-03-20 18:03:24 +00:00