The new function W_setconf_doubleClickDelay() sets the value for
WPreferences.W_setconf_doubleClickDelay(), therefore the private
data of WPreferences struct is not used.
This call is used at defaults.c to set the doubleClickDelay().
From the BALATON Zoltan comment:
If the P in WINGsP.h stands for Private then no files outside of WINGs
should include it. If WINGsConfiguration is an internal structure of
WINGs then only accessor methods should be used outside of WINGs.
This patch uses the new functions to read the WINGs configuration, not
using the internal library data.
These new functions:
unsigned W_getconf_mouseWheelUp(void);
unsigned W_getconf_mouseWheelDown(void);
returns the WINGs configuration for the Mouse Wheel Up and Down
values.
The new shutdown.h file includes the shutdown modes and the functions
to shutdown Window Maker.
The function definitios were moved from funcs.h and the struct WShutdownMode
from WindowMaker.h.
Now, externs are not needed, only include shutdown.h
This patch moves the XRANDR variable definitions to screen.h, because
xrandr is related to screen behavior. Then, the definition externs
can be removed.
This patch also changes (in event.c) the ConfigureNotify event processing
to avoid call the "if" block if XRANDR is not enabled. I chose the option of
move the if into the HAVE_XRANDR block instead of include the
ConfigureNotify case inside of the HAVE_XRANDR block (proposed by
BALATON Zoltan) to avoid call the default option if not needed.
Resizing windows with the mouse wheel was introduced in a063338175
("Mod+Wheel Window Resize") and it should be disabled by default
in order to not confuse users.
Users wanting this behavior can enable it through WPrefs.
Bug report: https://bugs.launchpad.net/ubuntu/+source/wmaker/+bug/1082879
These are the final changes for the new version 0.95.4. The main change
is set right the symbols for the new version, that include:
- Changes in debian/libwutil2.symbols from the git version to 0.95.4
- Changes in debian/changelog about the comments for the new version
On the other hand, the new debug schema is using hashes, therefore
the /usr/lib/debug/wmaker folder not longer exists. The new folder
is /usr/lib/debug/.build-id. This folder is auto-created and then
we don't need create it in debian/wmaker-dbg.dirs. Therefore, the file
debian/wmaker-dbg.dirs is empty and can be removed.
Finally, a little comment about folder in debian/README.Debian.
This code was commented out but enabling it leads to no issues AFAICS
and improves the usability of WINGs applications.
The motivation for this patch comes from the need of distinguishing
where the cursor is in the WINGs-based application which handles the
database of my comics collection.
This changes the behavior in all parts of wmaker where there is
a text field entry, e.g. in the settings panel of dockapps. There should
be no issues with a blinking cursor in such cases though...
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.
This patch avoids to save the icon name in the configuration file
if the flag "Ignore client supplied icon" is not selected.
First, when winspector tries to show the icon to the user, it must not search
the default icon. It should use the specific icon or the icon provided
by the client.
When we click in "save Settings", the function saveSettings reads the icon
specified by the user in the text box. If the checkbox "Ignore client supplied
icon" is not selected, then saves the icon too.
Using this behaviour we never recover the initial position (no icon selected,
no ignore client supplied icon flag set). This patch recovers the initial
state of the icon options.
When the user unsets the ignore client the filename provided is not saved in
the configuration file. Now, the configuration is like the initial status.
If the user checks the flag and set the file to use as icon, the file is used.
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.
This patch avoid a crash when moving an icon without command.
To reproduce the problem:
1. Launch an application, for example xeyes, with appicon.
2. Move the appicon to the clip.
3. Close the application.
4. Edit the appicon in the clip, and empty the commands fields.
5. Move the appicon from the clip to the dock. -> Crash.
The crash happends because icon->icon->owner is NULL and then
wwin will be NULL. Then the call of wwin->client_win will crash.
This patch checks if icon->icon->owner is not null (application is
running) and then assign it to wwin. Then get the command from the
running application.
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.
Please find attached a diff to add the missing .h files from src/Makefile.am
One way to find these:
$ git checkout next
$ ./autogen.sh
$ ./configure
$ make dist-gzip
$ tar xzf WindowMaker-0.95.3.tar.gz
$ cd WindowMaker-0.95.3
$ ./configure
$ make
The list of options in the Expert tab of WPrefs.app was filled using
hard-coded list of commands with static indexes and the related
usage were spread accross procedures. This was dangerous because
it could lead to mismatched indexes, the list length being also
variable, so it was hard to update.
This patch proposes to group all the options in a single place (a
static const array), so it is easy to add/remove/reorder the options,
and the code just parses this array based on its auto-calculated
size.
The function applySettings() set now the icons. Updated icons are:
- Appicon: Always, with or without always_user_icon
- Window: If the window is minimized, with or without always_user_icon.
Window must be minimized to see the icon change, else, wwin->icon
doesn't exist and therefore you won't see this change (no icon).
There is a problem if the window is not minimized and is minimezed,
because it will show the icon in the database, not the assigned icon.
This problem must be updated not here, in the wIconifyWindow()
function, at actions.c
The function wIconChangeImageFile set the file_image variable directly,
now the code is faster and the assigned image is used.
Before this patch, the assigned file couldn't be used, because wIconUpdate
serached the icon using different methods.
The variable wwin is only used in one block of the if, so should be moved
inside this block. OTOH, is better check if the variabl exists before
assign it. The code now is more stable and avoid crashes.
The dock applications has their icon image set in icon->file_image
to draw the icon if the application is not running. But if the
application is running, the icon mustn't be show. This patch don't
paint the icon for docks.
The function wIconUpdate can receive a image to setup as icon image.
If image is NULL, then use the original method, using different procedures
to get the image.
Two problems caused Boolean options which default to true to be shown
incorrectly when the option was not already present in the defaults database.
First a typo (Enabled instead of Selected) caused the switch button to stay
off then because GetBoolForKey key returns False also when the option
is not set it would have been turned off while it should stay on to
reflect the default value of the option.
Windows were drifting by FRAME_BORDER_WIDTH pixels when their
borders were toggled on or off.
Windows which had a border before we managed them were drifting
on shutdown and again at startup. It happened because the absolute
upper-left co-ordinates of a bordered window would in fact be the
upper-left co-ordinates of the border itself, whereas we consider
the client window to have no border and co-ordinates offset by the
titlebar and frame border.
The initial fix for the bug reported by Paul Seelig whereby windows
would drift on restart introduced two regressions.
New windows would place higher on the screen than intended, possibly
obscuring the bottoms of other windows with their titlebars, and all
windows would jump vertically at shutdown because we weren't restoring
them to where they were before they had a titlebar and border.
Bug report from Paul Seelig:
"Yet another rather strange glitch:
- open three terminal windows
- repeatedly restart wmaker
- all windows slowly drift to the left and up by just a few pixels
If i remember correctly, this is also a longstanding issue and nothing
new. It is no showstopper either, as one rarely restarts wmaker."
The slight drifting left and up seems to have been due to
wWindowConfigure() accounting for the window border when placing, which
was fixed in an earlier commit.
Windows could still shuffle down, however, because wWindowConfigure()
was moving the window down to make room for its window frame.
We now move it up by the titlebar height to cancel out that movement.
As reported by Amadeusz Sławiński, there were a number of debug-only
information printed by the menu parser, which had no reason to be
in a user package.
This patch removes all the hard-coded DEBUG definitions pointed
by Amadeusz and adds a new (standard-like) option '--enable-debug'
to the configure script, which activates debug stuff for the devs.
The default behaviour is now to not have them.
As a side effect, the option also disable optimisation, which are
generally annoying when trying to run a debugger.
Managed to squeeze two more options from the expert page to the
corresponding pages and also reorganised some widgets to avoid large
now unused spaces in one place and clipped text in the other.
As found by Rodolfo, it looks like there could be memory leak in the
function 'RSmoothScaleImage' because it reserveda given number of
memory blocs but used another count to free them after use.
This patch uses the same count for release as it seems this variable
is not modified in between. Took the opportunity as Rodolfo proposed
to convert a global variable to a local variable - this global
definition seems incorrect.
As reported by Amadeusz Sławiński, the support for (d)quoted string
in the menu file was not exactly the same as in previous versions
of WindowMaker, so we had a regression which is not acceptable.
This patch propose a consistent handling for (d)quoted text instead
of the previous on-the-title-only code; now all (d)quoted strings
are still kept as-is (as expected) but the (d)quotes are always
removed.
As a side note, it also improve the support for \escaped character
to work correctly as mentioned in the example of the default menu.
Note: This reverts b2e7620868 which
was an incomplete solution to the problem.
The function wIconValidateIconSize checks if the width size and height size are
less than the preference size (and left space for the border). If the width
size or height size is greater than the preference, then checks what is the
bigger size of them. Then resize it using the bigger value and holding the
aspect ratio.
Before this patch, wIconValidateIconSize didn't check if height was bigger
than width and always suppose that width was greater than height.
The function get_wwindow_image_from_wmhints returns a image from WM Hints,
but the image could be larger than the desired.
Then, the image can be resized using wIconValidateIconSize(). The resize
should be done in get_rimage_icon_from_wm_hints(), not in the function
get_wwindow_image_from_wmhints(). This is because the function
get_wwindow_image_from_wmhints() is used in wIconStore() too. If we resize
the image before save it to disk, then if we change the icon/dock size, then
the image saved will have a different size than the curren icon size. Is
better resize the image when is painted in the screen, not the image saved.