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

2594 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
b9caaa8729 WINGs: New function W_setconf_doubleClickDelay
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().
2013-01-12 14:45:29 +00:00
Rodolfo García Peñas (kix)
73d75fa848 Don't access to private WINGs info
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.
2013-01-12 14:45:29 +00:00
Rodolfo García Peñas (kix)
cba94da2cf WINGs: Functions to read the Mouse Wheel conf
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.
2013-01-12 14:45:29 +00:00
Rodolfo García Peñas (kix)
68208a01a0 New shutdown.h file
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
2013-01-12 14:37:31 +00:00
Rodolfo García Peñas (kix)
b71f2c30fd Removed XRANDR externs
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.
2013-01-12 13:10:29 +00:00
SJS
c058af6d35 README capitalization fix
Typo fix in the README.
2013-01-08 21:07:53 +00:00
Andreas Bierfert
0b74ae4194 Include LGPL with correct FSF address
(see http://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt)
2013-01-07 21:19:56 +00:00
Andreas Bierfert
085224973a Fix incorrect FSF address 2013-01-07 21:19:40 +00:00
Carlos R. Mafra
3b8c36510f Set mod+wheel to OFF by default
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
2013-01-06 23:27:44 +00:00
Kamil Rytarowski
37677b2ec0 Fix underlinking
libWMaker (wmlib) requires -lX11.
2013-01-05 11:50:51 +00:00
Carlos R. Mafra
a2de2c34ee Window Maker 0.95.4 wmaker-0.95.4 2013-01-03 23:29:16 +00:00
Kamil Rytarowski
0706471a10 Fix build with automake-1.13 and modernize .am files.
The following macro: AM_CONFIG_HEADER is deprecated and replaced with AC_CONFIG_HEADERS. INCLUDES is an old version of AM_CPPLAGS.
2013-01-03 23:27:31 +00:00
Rodolfo García Peñas (kix)
0d441c3b98 Debian changes for final 0.95.4
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.
2013-01-03 22:16:33 +00:00
Carlos R. Mafra
18437e0309 WINGs: Enable cursor blinking in text fields
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...
2012-12-22 20:15:47 +00:00
Carlos R. Mafra
3d47016788 Revert "Maximized windows appear misplaced"
This reverts commit b657f15344.
2012-12-18 18:29:50 +00:00
Carlos R. Mafra
b02a12b8c1 Revert "Prevent windows from drifting on restart."
This reverts commit 3cd382bccc.

Conflicts:
	src/window.c
2012-12-18 18:29:11 +00:00
Carlos R. Mafra
f6f72acbde Revert "Fixed regression when placing windows."
This reverts commit 4e193c172b.

Conflicts:
	src/window.c
2012-12-18 18:20:52 +00:00
Carlos R. Mafra
ff52ef3996 Revert "Prevent border drifting."
This reverts commit df601267e6.

Conflicts:
	src/window.c
2012-12-18 18:18:14 +00:00
Rodolfo García Peñas (kix)
0a461416e3 Avoid icon change to default on winspector save
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.
2012-11-29 09:37:42 +00:00
Rodolfo García Peñas (kix)
c164db31bf winspector: Save iconpath if icon will be 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.
2012-11-29 09:35:51 +00:00
Rodolfo García Peñas (kix)
e206f471fe winspector: Don't use text input if NULL
This patch don't use the text input for the file if is empty.
The function should use the function to get the icon provided
by the client.
2012-11-29 09:30:25 +00:00
Rodolfo García Peñas (kix)
99e5a7a9eb winspector.c: Full clean patch
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.
2012-11-29 09:27:30 +00:00
Rodolfo García Peñas (kix)
bf2f942138 Avoid crash on icon move without command
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.
2012-11-28 00:12:59 +01:00
Martin Frydl
914d4e06ef Added option to ignore minimized windows during cycling.
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.
2012-11-28 00:07:13 +01:00
Amadeusz Sławiński
eae7ef6c59 Fix Maximize/Unmaximize in window menu
Add variable to track window startup size and use it when checking for changes
2012-11-24 11:07:32 +01:00
John H. Robinson, IV
ea7ef65b19 Makefile: Add forgotten .h files
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
2012-11-19 23:57:46 +01:00
Rodolfo García Peñas (kix)
e393c6b61a stacking.h removed white lines
The white lines in stacking.h were removed.
2012-11-19 00:12:46 +01:00
Rodolfo García Peñas (kix)
db6605932b window.c clean code 1
This patch only make some code style clean.
2012-11-18 23:40:13 +01:00
Rodolfo García Peñas (kix)
4111f336d0 create_stdcmap is never used
The create_stdcmap variable is never set, so can be removed.

This patch don't update the translation .po files!
2012-11-18 23:40:12 +01:00
Christophe CURIS
8b6e96ab74 Moved parameters of WPrefs's expert check-buttons to a single place
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.
2012-11-18 17:23:20 +01:00
Rodolfo García Peñas (kix)
2165faec5d applySettings icon set updated
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
2012-11-17 21:10:36 +01:00
Rodolfo García Peñas (kix)
3f2c87fb06 get_rimage_icon_from_wm_hints returns image
The function get_rimage_icon_from_wm_hints now returns an image.
2012-11-17 21:10:24 +01:00
Rodolfo García Peñas (kix)
5bfac9036d wIconChangeImageFile set the file image
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.
2012-11-17 20:38:50 +01:00
Rodolfo García Peñas (kix)
0a06ddd9e3 wIconUpdate wwin checks
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.
2012-11-17 20:38:45 +01:00
Rodolfo García Peñas (kix)
4b4c5513ce update_icon_pixmap don't paint dock icon
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.
2012-11-17 20:38:40 +01:00
Rodolfo García Peñas (kix)
522d84b0ef wIconUpdate image preselected
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.
2012-11-17 20:38:36 +01:00
BALATON Zoltan
faa74a14b1 WPrefs: Fixed handling of options which default to true
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.
2012-11-17 20:32:11 +01:00
BALATON Zoltan
c7e3666e62 Made highlighting the AppIcon of the active app configurable at run time 2012-11-17 20:32:10 +01:00
Iain Patterson
df601267e6 Prevent border drifting.
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.
2012-11-17 11:49:44 +01:00
Iain Patterson
4e193c172b Fixed regression when placing windows.
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.
2012-11-17 11:49:28 +01:00
Iain Patterson
3cd382bccc Prevent windows from drifting on restart.
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.
2012-11-16 08:06:29 +00:00
Christophe CURIS
27d55b3e33 Added option to 'configure' to control debug information for compilation
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.
2012-11-16 08:06:19 +00:00
BALATON Zoltan
2a025b2edd WPrefs: More moving around of options and tweaks to layout
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.
2012-11-15 12:41:44 +00:00
Christophe CURIS
806784e194 Fixed wrong count to release temporary memory
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.
2012-11-15 12:38:25 +00:00
Christophe CURIS
5a3cab3cef Changed handling of quoted strings in the menu parser for consistency
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.
2012-11-15 12:37:16 +00:00
Rodolfo García Peñas (kix)
2eb1107e20 wIconUpdate removed scr variable
The variable scr is not used, so MUST be removed.

This variable can cause a segfault because icon could not exist.
2012-11-14 22:55:45 +00:00
Rodolfo García Peñas (kix)
d8b92c979e get_default_image resize image
The function get_default_image, used to read the default image, now
resizes it to the desired size.
2012-11-14 22:49:42 +00:00
Rodolfo García Peñas (kix)
78ff715d39 wIconValidateIconSize checks the width and height
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.
2012-11-14 22:48:08 +00:00
Rodolfo García Peñas (kix)
5956d71d77 get_wwindow_image_from_wmhints scale image
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.
2012-11-14 22:47:26 +00:00
Rodolfo García Peñas (kix)
ead0fb2e4b Remove dup set icon file to NULL
Remove the icon->file = NULL because was set in unset_icon_image().
2012-11-14 22:40:00 +00:00