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

3406 Commits

Author SHA1 Message Date
Christophe CURIS
74dc2d2cc0 WPrefs: use length of array instead of hard-coded constant for sample colours
In the panel for Appearance configuration, there are some sample colours
proposed to users; the code used to have a bunch of constants hard-coded
to handle these colours.

This patch replace all constants with the macro wlengthof to use the number
of element in the array determined by the compiler, so modifying the list
won't cause hidden bugs. This include a somehow smarter code to dispatch
the colours in the window to automatically arrange them cleanly whatever
their number is.

Took opportunity to de-CamelCase the name of the array as it did not add
complexity in the patch.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:20 +01:00
Christophe CURIS
efe0da4618 WPrefs: grouped items related to the possible window placement algorithms in a single place
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:20 +01:00
Christophe CURIS
8522283d68 WPrefs: grouped items related to the behaviour of moving a maximized window in a single place
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.

Took the opportunity to de-CamelCase the name of the variable to comply
with project's coding rules.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:20 +01:00
Christophe CURIS
d02d362295 WPrefs: grouped items related to the AppIcon bouncing configuration in a single place
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:20 +01:00
Christophe CURIS
e73c3e84de WPrefs: grouped items related to the help balloon configuration in a single place
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync. It also makes the code simpler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:19 +01:00
Christophe CURIS
454c7bec5d WPrefs: grouped items related to the window title alignment in a single place
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:19 +01:00
Christophe CURIS
c0d4c16336 WPrefs: grouped items related to the menu style in a single place
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:19 +01:00
Christophe CURIS
4bb93d3dab WPrefs: replaced a few constants by the macro 'wlengthof'
This reduce the risk to miss something in case the array they refer to gets
updated, because with the macro the proper number of element will be
evaluated by the compiler automatically.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:19 +01:00
Christophe CURIS
6ac27ba842 WPrefs: created macro 'wlengthof_nocheck' for the cases were wlengthof cannot be used
Because the macro wlengthof preforms a check of validity of its argument
with static_assert, there is a use case where it fails with a compiler
error. This patch introduces an alternate macro without the check, to be
used only for this specific case.

To be able to use the size of the array, a few of those array declaration
have to be moved before the structure in which their size is used.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:13:19 +01:00
Christophe CURIS
7d09b2c04f wrlib: add support for release 5.1.0 of the libgif
As reported by Andrew, the compilation of the WRaster broke because
there was an API change in libgif v5.1 versus the v5.0 (something had been
forgotten for DGifCloseFile to be easily used in wrappers for dynamic
languages).

Now, if we have detected that we're in 5.x release, we use the GIFLIB_MINOR
macro to see what the function prototype is (this macro was introduced only
in 4.1.6 so we cannot fully rely on it to detect the version of the
library).

The possible error code is not used because at the place we use the
function we would not be able do do anything more meaningful with it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:08:59 +01:00
Christophe CURIS
3de5b8fb42 util: removed usage of external '__progname' because it is not portable
As reported by Milan Čermák, using this variable breaks compilation on
Solaris, because it is a hack which is not standard. To ensure portability,
we now rely on main's argv[0] which is always available.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:08:59 +01:00
Christophe CURIS
ff8fc10a65 configure: add detection for 'nanosleep' function with appropriate headers
As reported by Milan Čermák, Solaris needs extra library 'rt' to have
access to that POSIX function, so we properly check for it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:08:59 +01:00
Milan Čermák
484c880fd0 wmaker: remove call to internal X11 header
The header 'Xarch' is not part of the standard, it is an internal header
that is already included by the other headers; furthermore it is not needed
directly by the code in wmspec.c.

As it breaks compilation on some platforms (namely Solaris 10), its call is
removed.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:08:59 +01:00
Milan Čermák
1748a18380 wrlib: fix usage of deprecated attribute for gcc 3.x
It seems that the argument to the attribute 'deprecated' is a novelty of
gcc 4.x, the attribute introduced in gcc 3.x did not take any parameter.

As Solaris 10 is providing gcc 3.4.3, this patch updates the detection in
the public API header to make it compile properly.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:08:59 +01:00
Christophe CURIS
461214d870 util: clarify error message in "wmaker.inst" in case of directory creation failure
Previously, the directory was expected to already exist, but as now it is
automatically created it is a good idea in case of problem to have the
message clearer.

Took opportunity to indent properly that part of code.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-02 13:04:14 +01:00
BALATON Zoltan
cb3702559a wmaker: Restore multi screen functionality by reverting wrong commits
Revert patches that moved variables from WMScreen to global level
because this broke X displays with multiple independent screens and
caused dock and clip icons to become mixed up. When managing multiple
screens each screen used to have it's own state/dock and clip. This
commit restores that by reverting mainly the commits listed below (and
those that are invalidated by reverting these) and fixing up later
commits to apply after the revert.

Reverted commits:
f60e65001b Moved 'workspace_name_font' from the Screen to a Workspace object in the global namespace
9e103a46e9 Variable workspace_count moved to the workspace object in the global namespace
e5ae684d02 Variable last_workspace moved to workspace object in global namespace
c610b8d7ce Variable current_workspace moved to workspace object in global namespace
f0c5073600 Array of workspaces moved to the workspace object in the global namespace
9c252988f8 Variable workspace_menu moved to workspace object in global namespace
e86b8dcb2f Clip, Dock and Drawers menu moved to appropriate global namespace
074092f319 Removed WScreen args not used
4a7daf2322 AppIcon list moved out of WScreen
2103fe390b Variable clip_icon moved to clip object in the global namespace
014bc52531 wClipIconPaint appicon argument removed
40e1ea08b8 Varible session_state moved to global namespace
6987d4aa40 Removed WScreen argument
0de3e590ce shortcutWindows moved to w_global
2e64831fb6 Removed unused variable wapp_list
b6423a7b4f wmaker: Moved variable Screen Count into the global namespace

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 13:04:14 +01:00
Khaled Hosny
e3dcadde30 WINGs: Add optional Pango text layout support
Currently WINGs renders text using Xft directly which does not support
any advanced text layout that is needed for scripts like Arabic or Indic
scripts (or even things like automatic ligature support for Latin
script).

With Pango we also get text fallback for free, so no more square boxes
for characters not supported in the current font (unless no font on the
system supports the specified character, of course).

This patch introduces support for using Pango to render the text (though
its Xft backed), to avoid forcing the additional dependency to everyone
it is made off by default.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 13:04:14 +01:00
David Maciejak
1485233292 wmaker: fix maximizing window in multiple screens env
This patch is fixing the maximize window feature.
As it was reported by Miikka Veijonen, in multiple
screens env wmaker is reserving some space for the dock
even on screen that are not displaying it.

This patch is only adjusting the working area for the head
that is displaying the dock.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 13:04:14 +01:00
David Maciejak
870a73ff32 WINGs: add function to get button caption
This patch is adding a new function WMGetButtonText to get the button caption.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 13:04:14 +01:00
David Maciejak
65f8cb7a4b wmaker: fix arbitrary shell command injection
Workspace background pref can be tricked to run arbitrary cmds.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:04 +01:00
Doug Torrance
a307b9f867 Update ChangeLog, from version 0.92.0+ to most recent commit.
Generated by the new update-changelog.pl script.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:04 +01:00
Doug Torrance
d3f9c2cd75 Add script to update ChangeLog from git log.
This patch adds update-changelog.pl, a script which adds the subject line and
author of every commit since ChangeLog was last touched by git, in a style
consistent with the entries up to version 0.92.0.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:04 +01:00
Doug Torrance
4546065276 wmaker: Consistent whitespace in WindowMaker.h.
Previously, the whitespace in WindowMaker was inconsistent, with some
indentation using spaces and some using tabs, and a mixture of tabs and spaces
used to align comments at the ends of lines.  As a result, patches that touched
this file would often result in warnings from checkpatch.pl.

This patch fixes this so that indentation uses tabs and all other alignment uses
spaces.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:04 +01:00
Doug Torrance
47ec274760 wmaker: Add more directions for window snapping.
This patch adds the ability to "snap" a window to the top, bottom, or any of the
four corners of the screen.  It uses three new helper functions, drawSnapFrame,
getSnapDirection, and doSnap, to reduce code duplication and increase
readability.

It also updates NEWS to indicate the additional directions.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:04 +01:00
Doug Torrance
da940a1e4d NEWS: Add note about dragging maximized windows.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:04 +01:00
Doug Torrance
b20a58d592 WPrefs.app: Add ability to set behavior when dragging a maximized window.
You can now set the behavior when dragging a maximized window, i.e., the
"DragMaximizedWindow" option from ~/GNUstep/Defaults/WindowMaker, from the
"Window Handling" tab of WPrefs.app.

Note that to make room for the pop-up button required to set this option, the
switch button to set the "OpenTransientOnOwnerWorkspace" option has been moved
to the "Expert User Preferences" tab and the "Edge Resistance" frame has been
made slightly smaller.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:04 +01:00
Doug Torrance
9937566ec4 wmaker: Add new options for dragging maximized windows.
You can now configure the behavior when dragging a maximized window by setting
DragMaximizedWindow in ~/GNUstep/Defaults/WindowMaker.  The options are:
- Move: Move the window and retain its maximized status and geometry (the
  current behavior and the default).
- RestoreGeometry: Move the window and unmaximize it, restoring its original
  geometry.
- Unmaximize: Move the window and unmaximize it, retaining its maximized
  geometry.
- NoMove: Don't move the window.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Amadeusz Sławiński
81e2b42746 fix maximize when dock is set 'on top' and it should be covered
Window Maker was not correctly maximizing windows in some cases

"... do not cover dock" enabled with "Dock postion":
Normal             - maximizes ok
Auto raise & lower - maximizes ok
Keep on Top        - maximizes ok

"... do not cover dock" disabled with "Dock postion":
Normal             - maximizes ok
Auto raise & lower - maximizes ok
Keep on Top        - maximizes not covering dock

Reported-by: Johann Haarhoff <johann@haarhoff.org.za>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Doug Torrance
3d7e271d3b NEWS: Add note about window snapping.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Doug Torrance
4d82f9efde WPrefs.app: Add ability to enable or disable "unmaximize on move" feature.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Doug Torrance
12fa7b2203 wmaker: Add "unmaximize on move" feature.
This patch adds the ability to completely unmaximize, i.e., clear the maximized
flag and return to the original geometry, a maximized window that is moved.
This behavior mirrors that of other common desktop enviroments, e.g., GNOME,
Unity, and Windows.

To enable this feature, set "UnmaximizeOnMove = YES" in
~/GNUstep/Defaults/WindowMaker.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Doug Torrance
38b58112ac wmaker: Clear maximized flag of a maximized window when moved.
If a user moves a window which is currently maximized, the current behavior is
to keep the window geometry and maximized status unchanged.  This can lead to
peculiar behavior.  For example, suppose a user maximizes a window to the
right half of the screen (either through the window menu, keyboard shortcut, or
new snapping feature), then moves it, and then attempts maximize it to the
right half of the screen again.  Instead of the expected result, the window is
unmaximized and returned to its original geometry.

This patch changes the behavior by clearing the maximization flag when a
maximized window is moved.  Then, when a window is maximized and then moved, it
can be maximized again without issues.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Doug Torrance
a8f0b68eaf WPrefs.app: Add ability to enable or disable window snapping.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Doug Torrance
df49061865 wmaker: Add window snapping feature.
This patch adds the ability to "snap" a window to one side of the screen by
dragging it to that side.  It is enabled by setting WindowSnapping = "YES" in
~/GNUstep/Defaults/WindowMaker.

Note that window snapping is automatically disabled if DontLinkWorkspaces =
"NO", as this feature also involves dragging a window to one side of the
screen.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
5f6f73e178 util: create custom GNUSTEP dir if needed
This patch is creating the missing custom GNUSTEP dir.
Patch found on vinelinux.org as WindowMaker-0.95.6-GSDIR.patch.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
5b42f6d090 wmaker: add clip mouse wheel action to change workspace
This patch is adding mouse wheel action on clip to switch from
one workspace to another. It's a modified version of the vinelinux.org
(WindowMaker-0.95.6-wheel.diff) which was setting the action on the entire dock.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
334e2cc5f4 wmaker: improve windows listing in switchpanel
This patch is updating makeWindowListArray function,
as it crosses the whole window focused list each time
we don't have to bother on checking previous and then next
focused windows, so saving some cycles here.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
Doug Torrance
1497bc354b wmaker: Remove dead links from BUGFORM.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
0d0169a413 WPrefs: add new mouse actions configuration
This patch is adding GUI configuration for new mouse actions:
-Previous Workspace
-Next Workspace
-Previous Window
-Next Window
-Switch Windows

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
f40095ac9e wmaker: add new button and wheel mouse actions
This patch is adding atomic mouse actions to mouse buttons to:
-focus on previous or next window
-move to previous or next workspace

and adding wheel action to
-switch between windows

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
39f6130a28 wmaker: use defined wWindowSingleFocus() function
This patch is cleaning focuswindow() local function to call
wWindowSingleFocus() global function.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
36b9f6cb23 wmaker: add next and previous window focus functions
This patch is adding a wWindowFocusPrev() and wWindowFocusNext() functions.
And copying switchmenu.c focusWindow() as wWindowSingleFocus().

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
7082561a42 WPrefs: set default to 1st color in gradient texture
This patch is updating the gradient texture user experience
by auto selecting the first color in the list when possible
and fixing the autoselection after a delete action.

In fact what that is called gradient colors is just a list of colors
with hue/saturation/brightness value.
That patch is loading the first one from the list (color, hue,
saturation, brightness) and setting the 3 sliders according to that
value instead of using some default hardcoded values.
The default color value on the top-right is never modified.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
10e0bdf39b wmaker: update NEWS for 0.95.6
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
88d9deea83 wrlib: merge gradient duplicate code
This patch is adding a new static function named renderGradientWidth
to factorize some code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
Alwin
bec572ea8b Make two text strings translatable
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
Alwin
a392c30b0d Catch-up and some improvements of the Dutch .po files
Recently added msgid's were translated, and some existing translations
improved. As development is done in git 'next', strings from wmaker-0.95.6
will be remained at the end of the files, so they are backward compatible.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
0399d70868 wmaker: merge reading menu duplicate code
This patch is adding a readMenu function to be called from
readMenuPipe and readMenuFile, saving about 20 lines of code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
09761a75f0 WINGs: merge bagtree duplicate code
This patch is adding a new static function treeDeleteNode to factorize some code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
2a3c11e202 WINGs: merge hashtable duplicate code
This patch is adding a new static function hashGetItem to factorize some code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00