1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00
Commit Graph

3887 Commits

Author SHA1 Message Date
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
Christophe CURIS
95ee539d6d Configure: Added explicit check for math library header
Compilation will not work if the header is missing, so make sure
it is present and compilable first. This can highligh sooner if
a user forgot to install the corresponding dev package.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-17 01:54:06 +01:00
Christophe CURIS
f68ec6c913 Configure: Moved check for Math lib to a dedicated M4 macro
Took the opportunity to rewrite the check using autoconf macros
to generate a more compatible configure script.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-17 01:16:51 +01:00
Christophe CURIS
a6410d61e5 wmaker: Added 'const' attribute to local variables
A number of these variable are not meant to be modified, so we
show this to the compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
c9b816de75 wmaker: Added 'const' attribute to remaining functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
c7ab9d34f7 wmaker: Added 'const' attribute to function 'wWindowUpdateName'
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
9b5db31d95 wmaker: Added 'const' attribute to most global functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
f0c1dc9fc3 wmaker: Added 'const' attribute to most local functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
69b6848187 wmaker: Added 'const' attribute to function 'wDefaultsInitDomain'
This has a few side effects which are properly handled by this patch

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
062ff99fac wmaker: Added 'const' attribute to function 'GetShortcutString'
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
1c4ad880d1 wmaker: Added 'const' attribute to local function 'drawMultiLineString'
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
a092d8848a wmaker: Added 'const' attribute to local function 'getMaxStringWidth'
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
f429055b4f wmaker: Added 'const' attribute to function 'ShrinkString'
The function contained an internal statement that would have
discarded the const attribute, but as this statement is actually
useless it have been simply removed.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
a61f6c2484 Hide some compiler warning that are known and accepted
Because we have to use some X functions marked as deprecated to
ensure portability, we prefer to hide the warnings from standard
users, and keep them only for dev team.

[crm: Add -Wno-deprecated-declarations too]

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:03:24 +01:00
Christophe CURIS
39ecbc1084 WPrefs: Added XKeycodeToKeysym work-around to all other usage places
To ensure proper behaviour with X servers that do not support the
Xkb extension, implemented call to the fall-back legacy function
to the other places where it is being used, to ensure proper
behaviour in any case.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 18:53:05 +01:00
Christophe CURIS
0382dd5dd7 WPrefs: Fixed empty list of Mouse Grab Modifier problem
The original code was assuming that the Xkb extension is available
everywhere, which is not the case. This resulted in all modifiers
to be seen as NoSymbol, thus the empty list.

Now we initialize properly the Xkb extension at the start of the
program, and provide a work-around with the historical function in
the case the ext would not be available.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 18:53:05 +01:00
Christophe CURIS
5d2fb4ec97 WPrefs: Fix crash when switching to mouse settings panel
Apparently, there is some exceptional case when the 'Mouse Grab
Modifier' list can be empty, in which case the program would
crash.

This patch makes sure the program will not crash (that's a bad
behaviour), but does not solve the empty list case

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 15:02:55 +01:00
Christophe CURIS
ebac6e7c83 Fixed incorrect format specifier
As reported by clang, the format used was %hi which is expecting
a short-typed argument, but the parameters are actually defined
as ints in the structure, so use only %i.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-11 08:22:47 +01:00
Christophe CURIS
1e76a78604 Fixed structure declaration syntax
As reported by Iain Patterson, the clang compiler is (by default)
strictier on having clean C syntax. A few structure definition
did not comply, now they do.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-10 22:34:59 +01:00
Christophe CURIS
528955c447 Added explicit prototype for callback function and fixed code accordingly
Using an unspecified prototype function for a callback is calling
for problem. Added an explicit prototype for the 2 callback
functions in WDefaultEntry, and fixed the functions used to match
it. The new code should be a lot safer.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-09 22:20:57 +01:00
Christophe CURIS
6dda67bc51 wmaker: Added attribute 'noreturn' to appropriate functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-09 18:46:56 +01:00
Christophe CURIS
34089d7661 Configure: Added check for compiler attribute 'noreturn'
This attribute for functions was not standard until recently, so
there are a few different possible syntax. With this patch, the
configure script will search for the proper syntax, and define what
is needed to have the attribute compile correctly.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-09 18:46:56 +01:00
Christophe CURIS
3c2fc82b6e WUtil: Avoid memory leak and misbehaviour on internal function 'getuserhomedir'
If the function was called more than once with different usernames
it would always return the path for the user on the first call,
which is not what would be expected.

Furthermore, if the function succeeds it allocated memory to save
this path but it was never freed.

The good thing is that the use case for this function is so rare
that it is improbable it was ever called, which explains why it
was never seen.

The new code always behaves as expected, and does not allocate
memory anymore to avoid wasting time and memory for such small
things, which is acceptable because this function is local.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-09 16:51:16 +01:00
Christophe CURIS
7889c50c36 Configure: Use automake's conditional to handle icon installation
The previous method was to use a custom install procedure, which
is a bit complex when automake can handle this for us, and as a
side effect it made 'distcheck' fail on uninstall procedure check.

The new method is to use a simple conditional and autoconf/automake
will do all the work for us.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-09 13:52:26 +01:00
Iain Patterson
587a37dc60 Maximization regression
wMaximizeWindow() was previously rewritten and simplified.
Unfortunately the rewrite introduced a regression with windows which
were horizontally maximized or Maximusized, whereby they would be too
small after the maximization.

The bug is easy to see by opening a standard 80x24 terminal and hitting
the maximize horizontally shortcut.  The terminal shrinks to 21 lines.
Pressing the shortcut key again correctly restores it to 80x24.

The fix is to refrain from shrinking the final window height, which is
done to account for its frame border and titlebar, for the affected
maximization styles.
2013-06-09 13:52:06 +01:00
Iain Patterson
70909f4d5d funcs.h regression
funcs.h was previously removed.  Unfortunately usermenu.c still
attempted to #include it.
2013-06-09 13:51:53 +01:00
Iain Patterson
ae91ee4b0a Handle Return in switchpanel.
Explicitly match a Return keypress in the switchpanel, so that the
currently selected window is focused without the keypress event being
handled elsewhere.

Pressing Return to commit the window selection is intuitive but other
shortcuts may bind Return.  Any keypress not explicitly handled in the
switchpanel code will be passed through to other shortcut processing.
If, for example, alt+return were mapped to Select Window and the
switchpanel is open, pressing return while holding alt would both commit
the window change AND select the window, which is not intuitive.
2013-06-07 19:54:07 +01:00