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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>