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

2713 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
f60e65001b Moved 'workspace_name_font' from the Screen to a Workspace object in the global namespace
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.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
4ac65ab260 wmaker: code style
This patch removes some extra curly brackets, some empty lines,
extra spaces, ... to follow wmaker's coding style
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
29ccfbbf20 Avoid loop in keybinding check
This patch changes the keybinding check in cycling keyrelease.

Now, the variable binding contains the keypressed, so we can
check if the key pressed is the same than the keybinding. If
the keybinding is different (user press other key) then finish.

Without the loop, the code is faster.

Then, the keybinding variable is not used anymore, and can be removed.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-05 01:29:41 +02:00
Rodolfo García Peñas (kix)
1d09b9fdcd StartWindozeCycle uses ease variable
The function StartWindozeCycle() uses now the variable WShortKey
to store the shortcut key.

The code is the same, but now the hasModifier variable is calculated
in only one place.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-05 01:29:41 +02:00
Iain Patterson
e0697c9162 Fixed scoping error in wSwitchPanelSelectFirst().
We were using wwin as the temporary variable in WM_ITERATE_ARRAY() but
wwin was already set to the result of WMGetFromArray() and was due to be
returned from the function.  As a result of this oversight, wwin was
always set to NULL.

The bug could cause a problem in the - admittedly rare - case where all
windows were minimised at startup, causing the first invocation of the
switchpanel to highlight the first minimised window but then fail to
raise it.

Reported by Yury Tarasievich.
2013-10-02 12:23:28 +02:00
Rodolfo García Peñas (kix)
6366aeef3a wIconChangeImageFile removed error variable
This patch removes the error variable, because is not changed
after their initialization.

This patch also removes the if check to wfree the path variable,
because this variable never is NULL.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-01 08:40:05 +02:00
Rodolfo García Peñas (kix)
cc01ca5c6b wIconChangeImageFile get image block swapped
This patch swaps the if and the else blocks for the
image value. Now, if the image doesn't exist, and because
error is always "0" (is not changed after the definition),
we can exist from the wIconChangeImageFile function.

Before this patch, if the image was NULL, the error variable
was set to "1", so we must return !error, then return "0".

Because the "path" variable is not NULL, we must wfree it.

Now, the "Set the new image" block is moved out the if block.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-01 08:40:05 +02:00
Rodolfo García Peñas (kix)
3250144b94 wIconChangeImageFile find image if block swapped
This patch swaps the "if (path)" block to "if (!path)"
therefore, the true block is now "error = 1" and the
false block is the call to get_rimage_from_file function.

The second change is that the "error = 1" statement is
changed to "return 0", because if "error" is "1", then
only the "return !error" statement is used, then we can
change it for "return !1" that is "return 0".

Then, we can move the get_rimage_from_file call out of the
if block.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-01 08:40:05 +02:00
Rodolfo García Peñas (kix)
d6fe27af15 wIconChangeImageFile returns int
The function wIconChangeImageFile now returns an integer value
instead of boolean.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-01 08:40:05 +02:00
Christophe CURIS
45bfc1d1c5 wmaker: Removed variable for X Context that is not used 2013-09-30 00:53:10 +02:00
Christophe CURIS
ec91b9f68e wmaker: Moved definition of X Contexts into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
e2ce62eb5b wmaker: Moved definition of WMaker-specific XAtoms into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
379f7022bd wmaker: Moved definition of GNUStep-related XAtoms into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
ecfb2dc902 wmaker: Moved definition of WM-related XAtoms into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
32cebb1305 wmaker: Removed notion of 'Default' mouse cursor
A default cursor would make sense if we were talking about an API,
where we would propose a 'I-don't-know' choice to devs, but here
we're talking about WindowMaker's internal, where we're supposed
to provide a consistent interface to the user, so picking a
cursor is not an option (and 'Normal' is actually a decent
looking choice anyway).

Suggested-by: Rodolfo García Peñas <kix@kix.es>
2013-09-30 00:53:10 +02:00
Christophe CURIS
b48b3370e2 wmaker: Moved global var with list of cursors to the preferences variable
As the cursor choice for each action is actually a user choice,
it is logical to put this into the structure, instead of a poorly
defined 'extern' in every file.
2013-09-30 00:53:10 +02:00
Christophe CURIS
2c20413831 wmaker: Moved timestamp variable (#2) to the global variable structure 2013-09-29 16:31:49 +01:00
Christophe CURIS
af6c4ec37f wmaker: Moved timestamp variable (#1) to the global variable structure 2013-09-29 16:31:49 +01:00
Christophe CURIS
577506cbd2 wmaker: Moved the variable for Locale choice (I18N) to the global variable structure 2013-09-29 16:31:49 +01:00
Christophe CURIS
3892f3220a wmaker: Created a global structure to regroup all global variables
Having all the global variables at the same place will provide
better visibility on the code; grouping them in a structure
reduces the risk for name clash; it also offer the possibility
to organise them.

Another BIG benefit is that, when reading the code, an access to
a global variable will now be clearly visible, and distinguished
from a local variable use.
2013-09-29 16:31:49 +01:00
Christophe CURIS
70c6494c46 wmaker: Changed name of parameter in macro WCHECK_STATE
The name will be a problem with next change because it uses a too
common word which will be useful at a better place.
Took the opportunity to rewitre the check in the human logical
thinking order to make it easier to read.
2013-09-29 16:31:49 +01:00
Christophe CURIS
28bbf705eb wmaker: Converted #define to an Enum for the Program State tracking variables 2013-09-29 13:46:50 +01:00
Rodolfo García Peñas (kix)
3957f01293 WPrefs: Ignore NumLock key when capturing keyboard shortcuts
This patch includes the function "NumLockMask", that checks if the
Alt Modifier key is "NumLock". Then we can use this function in the
calls to Capture the key sequence and don't use this modifier.
2013-09-29 12:13:53 +01:00
Rodolfo García Peñas (kix)
709e7654bc Small typo with the word attempts
This patch changes the word attemps to attempts in src/dock.c
2013-09-28 17:24:51 +01:00
Rodolfo García Peñas (kix)
7da7203d91 Debian 0.95.5
This patch includes the changes for the new debian package 0.95.5-1:

Changes are:

- New libwutil library, new version 3:
      - Updated debian/control file, replacing libwutil2 with libwutil3.
      - Files moved in debian folder:
        - libwutil2.changelog-upstream -> libwutil3.changelog-upstream
        - libwutil2.install -> libwutil3.install
      - Removed file libwutil2.symbols
      - New file libwutil3.symbols

- libtiff migrated from version 4 to version 5:
  * "Build-Depends: libtiff5-dev" in packages wmaker and libwraster3-dev,
    since libtiff-dev introduces dependency to libtiff4 which is in oldlibs.

- Small changes:
  * Included the word "WindowMaker" in the wmaker package description,
    to found it easily.
2013-09-28 17:21:46 +01:00
Carlos R. Mafra
e8843b3fed Add some information in the NEWS file 2013-09-28 13:57:56 +01:00
François Tigeot
38e088314a osdep_bsd.c: Fix a typo causing memory to be overwritten
* When compiled on DragonFly+gcc 4.7.3, this out of bounds array element
  initialization causes an important variable to be overwritten and a
  subsequent WindowMaker crash

* It was sheer luck other compilers/environments didn't exhibit any obvious
  issue so far
2013-09-22 17:12:54 +01:00
Charles Philip Chan
267496c54c Display app name in ballon help of GNUstep apps
Make the balloon help of GNUstep apps' appicons show the app name
instead of GNUstep.
2013-09-11 18:16:51 +01:00
Rodolfo García Peñas (kix)
278bf5ee7e get_icon_filename doesn't use WScreen
The function get_icon_filename now doesn't need the
argument WScreen, so can be removed.
2013-09-05 22:44:36 +01:00
Rodolfo García Peñas (kix)
453a0226ad wApplicationExtractDirPackIcon doesn't use WScreen
The function wApplicationExtractDirPackIcon now doesn't need the
argument WScreen, so can be removed.
2013-09-05 22:44:36 +01:00
Rodolfo García Peñas (kix)
4e4d75c55e supports_tiff moved to wPreferences
The flag "supports_tiff" doesn't belong to the wScreen, because all
screens has (or not) the same value. If wmaker supports (or not) tiff
files is global to all wmaker, not to the screens.
2013-09-05 22:44:36 +01:00
Rodolfo García Peñas (kix)
82aea844d0 Removed context argument in jpeg files
The context argumetn is now not used, so can be removed.
2013-09-05 22:44:36 +01:00
Rodolfo García Peñas (kix)
d1f9b80171 Removed optimize_for_speed flag
The optimize_for_speed was used to set the Alpha channel for jpeg.
The alpha channel for jpeg should be used always. The current CPUs/GPUs can do
it without problems and this is an old behaviour.
2013-09-05 22:44:36 +01:00
Rodolfo García Peñas (kix)
f363292d3c gif.c code style
This patch removes some extra curly brackets, some empty lines,
extra spaces,...

This patch is not removing the goto calls. I am not sure if the code
is better without gotos.
2013-09-05 22:44:36 +01:00
Rodolfo García Peñas (kix)
2bdeb693f6 ppm.c code style
This patch removes some extra curly brackets, some empty lines,
extra spaces,...

This source file had some empty if blocks. Now are removed.

This patch also changes some preprocessor macros for C code.
2013-09-05 22:44:36 +01:00
Carlos R. Mafra
cd5e004127 Window Maker 0.95.5 wmaker-0.95.5 2013-08-29 19:36:52 +01:00
Thomas Otto
a268327a48 wmaker: reset "ignore workspace change" flag in all cases
When an application steals focus and switches workspaces autonomously,
"ignore workspace change" does not get reset. Since I didn't want to
track down the exact case I thought it best to reset the flag in all
cases, as it probably should be.

> How did you discover this? What was the behavior you saw?

After saving files in avidemux, the "Done" dialog pops up, and with it the
entire application is moved to the current workspace. After this, using the
mousewheel on the root window or using the appropriate key combination does
not change the workspace anymore, only using the arrows on the clip works.

And, as mentioned on the mailing list, just starting emacs (22.3.1) also
provokes this bug. Using a Debian/Sid system btw.
2013-08-19 19:11:09 +01:00
Lee, Seong-Gu
ca9c57f695 Korean Localization update, etc.
modified:   WPrefs.app/po/Makefile.am
	Ommited .pot messages in Docks.c were recovered.

modified:   WPrefs.app/po/ko.po
	Update Korean Localization of WPrefs.app to 0.95.4

modified:   po/ko.po
	Update Korean Localization of WindowMaker to 0.95.4
2013-08-17 13:28:15 +01:00
Gabriel VLASIU
75654cf43c Proper fix for array == NULL in WMPopFromArray() function. 2013-07-06 11:36:50 +01:00
Christophe CURIS
5fcf15f0d5 wmaker: Changed global constant declaration to use appropriate type
The original type was not as safe as it looked like to be, and led
to more memory usage than necessary.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:13:41 +01:00
Christophe CURIS
60a4121a92 wmaker: Moved function prototype to the appropriate header
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:13:41 +01:00
Christophe CURIS
91529ff1a7 wmaker: Replaced local declaration of system function by proper header call
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:10:09 +01:00
Christophe CURIS
496cb58cea wmaker: Moved function prototype to the appropriate header
It is bad practice to define the prototype of an external function
inside a source file that wants to use it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:10:09 +01:00
Christophe CURIS
74cd836e48 wmaker: Replaced local 'extern' definition of wPreferences by proper header usage
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:10:09 +01:00
Christophe CURIS
3803ae6493 wmaker: Replaced local 'extern' definition by proper header include
It is dangerous to define an extern variable locally because the
compiler is not able to ensure proper type definition, but including
the header that defines it allows a safer situation.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:10:09 +01:00
Ivar Smolin
401a37d924 Estonian translation of Window Maker 0.95.4 2013-06-20 20:57:56 +01:00
Iain Patterson
3966cd2fc2 Don't crash when SwitchPanelImages is None.
The whole changeImage() function in switchpanel.c is a no-op if
wPreferences.swtileImage is set to None because the panel isn't actually
drawn in that case.  As a consequence there are no images to change.

As well as being logically incorrect the existing code causes a segfault
if the user has the SwitchPanelImages preference set to None because
changeImage() would attempt to access the icons and images arrays which
are only initialised in wInitSwitchPanel() when swtileImage has a value.

Bug report and diagnosis by Juan Giordana, Gabriel Vlasiu and Christophe
Curis.
2013-06-19 18:02:15 +01:00
Gabriel VLASIU
527f5f1730 Fix segfault when SwitchPanelImages = None and user press Alt+tab. 2013-06-19 14:45:18 +01:00
Christophe CURIS
7bf8efef54 WRaster: Changed formula for reconverting angle to the (0-360) bounds
There is a dedicaded floating point modulo operator that does a
better job (faster, no precision loss), so we use it instead of the
complicated formula that uses type conversions.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-17 01:54:06 +01:00
Christophe CURIS
e9764aab71 wmaker: Changed math on floating point by integer operation
For this case we happen to already have the same variable as integer
type, so it is better to use them directly for computation.

Please note that the floating point variables do not contain more
precision in this use case, otherwise the change would not be
transparent.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-17 01:54:06 +01:00