Added new option to Window Maker for enabling alternative way for
half-maximized windows movement. Option can be found on Expert section
in WPrefs app.
Added new option to Window Maker preferences to enable half-maximized
windows movement on all available heads. Option can be found in WPrefs
app on Expert section.
This reverts the commits:
311ab6b08c ("Raise fullscreened window")
a504370f3b ("Remove WMFullscreenLevel")
Removing WMFullscreenLevel had the side effect that a dock or panel
having the _NET_WM_WINDOW_TYPE_DOCK type would stack on top of
fullscreen windows, obscuring part of them. This is unwanted. No
other window should cover a focused fullscreen window:.
https://specifications.freedesktop.org/wm-spec/latest/ar01s09.html#STACKINGORDER
Simply raising the fullscreen window to the top of the stack of normal
windows is not sufficient if there are windows with higher stacking
levels present. The separate WMFullscreenLevel is needed.
Cc: Amadeusz Sławiński <amade@asmblr.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
This patch introduces two new configuration values, SnapEdgeDetect and
SnapCornerDetect, which users can set to change the distance from an edge
or corner at which window snapping will begin. The defaults are 1 and 10,
respectively.
Suggested-by: Josip Deanovic <djosip+news@linuxpages.net>
As it is really unlikely that in normal use case someone would need this
feature, it is now conditional code, which is not enabled by default; the
configure scripts now propose a '--enable-wmreplace' option to enable the
corresponding code, as people making package for distributions may want to
enable the feature to provide users the ability to give a try of all the
window managers.
Suggested-by: Carlos R. Mafra <crmafra@gmail.com>
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Use the same logic used by xfwm4, metacity et al to replace an existing
window manager on the screen and allow other window managers to replace
us, as defined by the ICCCM 2.0:
http://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html
Communication with the Window Manager by Means of Selections
By convention those window managers try to become the selection owner of
the WM_Sn atom where n is the screen number. If the atom is owned by
another window manager and the --replace argument was not given to wmaker
we fail to start. If the argument was given we try to become the new
owner and wait for the existing window manger to exit.
After a successful startup we watch for SelectionClear events on the
atom and initiate a shutdown if one arrives, as that implies that
another window manager was started with --replace.
As reported by Nerijus Baliunas and Paul Jakma, the GNOME application,
which use the GTK toolkit, are asking to have no window decoration. This
can be solved by editing the window's attributes in Window Maker, but this
can be tedious when there are many GNOME application used.
This patch adds a configuration option: Window Maker tries to detect for
GTK-based windows and in this case ignore the decoration hints that were
provided by the application.
Suggested-by: Paul Jakma <paul@jakma.org>
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by the new check script, the preference "show_clip_title" is
defined as a Boolean value in the preference loading function, which uses
the callback function "getBool", which expect a variable of type "char",
but the variable was not defined with that type.
This patch changes the type for the appropriate one to avoid possible
problems.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
To be consistent, all place where the not-properly-written "apercu" was
used in the source code (of wmaker and WPrefs) it has been replaced by an
appropriate "minipreview" or similar, to be in line with the new name
suggested by Yuri Tarasievich.
This new name is better understood by contributors who speak usual english,
but not this word which comes From french but is sparsely understood by
british people.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Having an thing whose name requires special UTF-8 character to be properly
displayed is a source of portability problem (including xgettext issue
reported by Alwin);
Considering also that this french word is only understood (sparesely) in
Great Britain, but not by international english speaking community;
This patch then replace it by the "Mini-Preview" suggested by Yuri
Tarasievich, which is more likely to be understood.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As found by Rodolfo García Peñas, this flag is never given a value; further
investigations in the history of the project show that this flag have never
been implemented because its action is totally redundant with the flag
"noupdate".
As the later flag's name is more clear about what the behaviour for the
user is, as opposed to what is being done under the hood, its name is kept
and the "nopolling" flag is removed.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The definition in the local header was not correct; it works because gcc is
tolerant to this kind of errors but other compilers are not. The
declaration was creating a local variable in each file that call header,
and because it is not static gcc's linker will merge them. Other compilers
will at best complain for duplicate symbol, and at worst silently duplicate
the variable so it will not work as expected.
The variable is now moved to the existing structure meant for global
variables, so now the code is really clear about using a global variable
instead of a static/local one.
Took opportunity to add some missing 'static' attributes to some variables.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This path is adding the functions and variables needed for workspace pager preferences.
An option to enable/disable the workspace pager, and one to set a default background image.
There was a probable bug when reading settings, because the function used
was 'getInt' which would try to store the result in a 'char'. As it would
be probably easier for user to have the value directly in pixels, the
storage is now done in an int so there won't be problem anymore.
Changed the behaviour of the constant APERCU_BORDER, which would be assumed
to be the size of the border in pixel, but in previous code it was actually
the sum of the two border (1 on each side). All maths have been changed to
have it as a single border width.
Took opportunity to group variable assignation for titleHeight and
shortenTitle in a single place, because it is not convenient to have them
spread around (one value in the beginning and others later in the code) and
using default values prevents some checks that modern compiler can do to
help produce safer code.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
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>
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>
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>
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>
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 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>
Since the resolution of the Retina display tends to make everything small,
the default apercu preview size (twice the icon size) couldn't be used to
distinguish the window contents without tiring too much my eyes.
Therefore, let's make the apercu size a configurable option. You can set
it through the ApercuSize variable with
$ wdwrite WindowMaker ApercuSize 4
in multiples of the icon size (in this case the apercu size will be four
times the icon size).
The default size remains 2 (twice the icon size).
This patch is adding miniwindow apercu when the mouse
is over the miniwindows.
To enable it you have to run WPref, in Miscellaneous Ergonomic
Preferences, check miniwindow apercus.
Then, you will be able to see a screenshot of the app when the mouse
is over the miniwindow.
This patch is replacing XRandR naming to RandR,
as XRandR is the name of the tool used in X11 and RandR
is the technology WMaker wants to support.
I had to update the info panel too, when many features are
activated not all of them can be displayed properly.
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The default domains were originally defined in different global
variables in C files; This patches groups them in a single
structure placed in global namespace.
The variable session_state, defined in screen.h (WScreen), is moved to
the global variable w_global.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
The appicon list is moved out of WScreen. The reason is because
the appicon list is used to create and remove icons (appicons, dock,
clip,...) on the screen, but these icons are not associated with the
WScreen. These icons are associated with the Workspace.
If we check the WWorkspace struct we can see that the Clip is inside
this struct. The dock, the background, the workspace name are other
items related to the Workspace, not with the screen.
So, we should take out the appicon from the WScreen. But, what is the
better place to hold it? The workspace? NO!, because the icon list
is common to the all workspaces. Probably the better place is hold
as independent list in the global namespace, so this is my option.
In the next patches we can see that this is the better option, because
we can create the icons, without think where we should paint them.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
The clip, dock, workspaces and drawers menus are common for all
workspaces, so they should be included in the global namespace
instead of the screen struct.
The variable workspace_menu, that contains the workspace_menu
is moved to the global workspace properties.
Now the screen is not needed to know the workspace_menu.
This variable is moved to the global workspace struct because it is
related to the workspace system, and not to the screen.
The variable workspaces, that contains the list of workspaces
is moved to the global workspace properties.
Now the screen is not needed to know the workspaces.
The function getWindowState() doesn't need the WScreen argument.
The variable current_workspace, that contains the current workspace
is moved to the global workspace properties.
Now the screen is not needed to know the workspace_count.
The variable last_workspace, that contains the last used workspace
is moved to the global workspace properties.
Now the screen is not needed to know the workspace_count.
The variable name is changed to workspace.last_used because a similar
variable name is also in the WApplication struct.
The variable workspace_count, that contains the number of workspaces
is moved to the global workspace properties.
Now the screen is not needed to know the workspace_count.
The new workspace struct includes the global information
for the workspaces. All information related with the workspaces
should be included here.
The first variable moved is workspace_name_font, included in this
patch. This variable was included in the screen info, but the
screen and the font used in the workspace name don't have any
relationship.