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

101 Commits

Author SHA1 Message Date
Christophe CURIS
c5d4c27a90 WINGs: to not allocate memory for a short lived array (Coverity #50136)
As pointed by Coverity, the array created to temporary store the list of
Atoms used in the function 'requestHandler' was leaked.

Because this array is very short lived, there is no need to allocate memory
for this, it just participates in memory fragmentation. Instead, we use now
memory on the stack which is more efficient.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-29 18:44:47 +00:00
David Maciejak
238b8ed3ca WINGs: merge duplicate code from wtext
This patch is saving about 30 duplicate code lines from
WMPrependTextBlock and WMAppendTextBlock to create
a static fct called prepareTextBlock.
2014-08-24 02:27:30 +01:00
Christophe CURIS
ca9dd144ae WINGs: removed unnecessary gotos in handleTextKeyPress
When the condition can be simply checked in an if, it is better to do that
than to use a flow breaking goto.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Christophe CURIS
e65f527ad4 WINGs: fix incorrect usage of direction variable in updateStartForCurrentTextBlock (Coverity #50192)
As pointed by Coverity, the variable 'dir' is passed by reference because
the function may update it; as it is never NULL (the function is local)
checking for that does not make sense. From the actual usage, it seems
logical that the check should have been on the value, not on the pointer.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Christophe CURIS
482d8d3583 WINGs: fix memory leak in requestHandler (Coverity #50135)
As pointed by Coverity, the data returned by WMGetTextSelectedStream are
actually a newly allocated buffer, so we need to release it when we're done
with it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Christophe CURIS
6831daf427 WINGs: fix memory leak in getStreamObjects (Coverity #50119)
As pointed by Coverity, the array used to build the result for the
function 'getStreamObjects' could leak in case of early return.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Christophe CURIS
0134720621 WINGs: fix memory leak in WMCreateTextForDocumentType (Coverity #50118)
As pointed by Coverity, a temporary WMArray was not freed after use.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Christophe CURIS
42febe3cec WINGs: fix check for NULL pointer in WMText selection (Coverity #50067)
As pointed by Coverity, there is a small check for NULL pointer when
handling triple-click selection in a WMText, however this check is only
partially implemented so the code would crash later anyway.
This patch implement an appropriate skip to avoid crash, and includes a
log message to help debug if the case happens.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:01:43 +01:00
Amadeusz Sławiński
3b71662011 WINGs: actually assign variable
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-05-17 15:59:48 +01:00
Amadeusz Sławiński
c1031965e9 WINGs: Value stored to 'pos'|'_w'|'done' is never read
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-05-17 15:59:48 +01:00
Amadeusz Sławiński
f41880cf05 WINGs: Value stored to 'scroll' is never read
it is assigned after doing switch() {}
so values assigned in switch() are dropped anyway

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-05-17 15:59:48 +01:00
Christophe CURIS
9f1207342a WINGs: Marked args as unused for compiler in WINGs API code
There are a few function in WING's API that take parameter for consistency
reason and for possible future evolution, but actually do not need the
argument.

As they are case we know about, this patch adds the appropriate stuff to
tell the compiler we are ok with this to avoid a false report.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-19 18:01:36 -03:00
Christophe CURIS
bd58625a3f WINGs: Marked args as unused for compiler in a few more callback functions
As callback have a fixed prototype, it is correct to not use all the
arguments, so this patch adds the appropriate stuff to avoid a false
report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-19 18:01:36 -03:00
Christophe CURIS
ea74fe8871 WINGs: Marked args as unused for compiler in event callback code
The WINGs toolkit dispatch events on widgets using callbacks, which means
having a fixed argument list for the handling function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-19 18:01:36 -03:00
Christophe CURIS
702764a7b0 WINGs: Marked args as unused for compiler in widget resize callback code
WINGs dispatches window resize events using callback functions, which
means having a fixed argument list for that function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-19 18:01:36 -03:00
Christophe CURIS
0d8a530bc3 WINGs: Marked args as unused for compiler in XDND callback code
The drag-n-drop mechanism is managed by WINGs through callbacks, which
means having a fixed argument list for the handling function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-19 18:01:36 -03:00
Christophe CURIS
4b89104aca WINGs: Added a few missing 'static' attributes to functions
Some functions are not meant to be visible by user; the use of the
attribute avoid risk of name clash with user functions at link
time.
2013-05-12 01:01:20 +01:00
Christophe CURIS
a622197faa Added explicit 'void' to function that takes no argument
This is the correct way to tell that a function takes no
arguments, because an empty parameter list tells the compiler
that it is not yet defined, and is tolerated only for
compatibility with very old C compilers for whom prototypes
were not yet a defined language element.
2013-05-12 01:01:20 +01:00
Christophe CURIS
75a0beffeb WINGs: Added 'const' attribute to functions in dragdestination, wtext
This makes both the API and local function const-correct on their
input parameters.
2013-05-09 16:56:28 +01:00
Rodolfo García Peñas (kix)
9a67c55fa0 WINGs: removed prev_y variable not used 2011-10-28 15:55:58 +01:00
Carlos R. Mafra
f43aa47d68 Revert "WINGs: Remove wruler and wtext"
This reverts commit f4890b17e6.

It turns out that I needed some functions from wtext.c to develop
a WINGs front-end to my comic book collection MySQL database.

Conflicts:

	WINGs/Makefile.am
	WINGs/WINGs/WINGs.h
2011-08-24 19:18:06 +02:00
Tamas TEVESZ
f4890b17e6 WINGs: Remove wruler and wtext
Apparently not used (not by wdm either).

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
a71a604ab1 WINGs: Make wmalloc() intialize allocated memory to 0
- Accordingly remove individual memsets, for now from WINGs only.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
62f4eff7ae Add missing initializers 2010-04-12 11:56:00 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
dan
054f954390 Applied some patches from Balaton Zoltan <balaton@eik.bme.hu>
- small fix for compilation in a different directory than the source
- fixed some warnings on 64bit platforms
2006-01-22 15:53:44 +00:00
dan
c0317ddae5 eliminated gcc-4 compilation warnings 2005-08-22 23:58:19 +00:00
dan
ca61675597 added preliminary X Input Methods support 2004-10-28 04:17:18 +00:00
dan
193a63511d - Fixed all // comments
- Final cleanups
2004-10-23 03:30:03 +00:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00
dan
9aca0d5f6e - Check whether libXft is at least version 2.1.2 else refuse to compile.
- Fixed bug in icon chooser dialog that could cause a segmentation fault
  in some cases (Pascal Hofstee <caelian@gmail.com>)
- Fixed crash in asm code in wrlib, with new versions of gcc.
- Fixed bug in the x86_PseudoColor_32_to_8() function which incorrectly
  used the r, g, b fields in the conversion.
- Fixed x86 ASM code in wrlib to work on 64 bit architectures.
- Fixed the focus flicker seen with some apps (notably gtk2)
  (Alexey Spiridonov <snarkmaster@gmail.com>)
- Fixed all crashing bugs that were generated by wmaker starting with the
  WMState file missing.
- Added NetWM support (a modified version of the patch originaly written
  by Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied patch to enhance the Virtual Desktop behaviour, and to integrate
  it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied a few xinerama and placement fixes (Peter Zijlstra
    <a.p.zijlstra@chello.nl>)
- Fixed memory leak in dock code.
- Fixed and enhanced the text wrapping in WINGs.
- Fixed the layout of some elements in WPrefs.app
- Added workaround for aplications that don't set the required hints on the
  client leader window, but they set them on normal windows (observer with
  KDE 3.3.0 mainly). This will allow these apps to get an appicon again.
  (they should be fixed still)
- Added workaround for applications that do not set a command with
  XSetCommand(), but instead they set the _NET_WM_PID property. This works
  with operating systems that offer a /proc interface similar to what linux
  has. (This also is to fix problems with KDE 3.3.0 apps, but not only them).
- Fixed bug with autostart and exit scripts not being executed if user
  GNUstep path was different from ~/GNUstep (when setting GNUSTEP_USER_ROOT)
- Added utf8 support in WINGs (removed old X core font code)
- Added utility to convert old font names to new font names in style files
2004-10-12 01:34:32 +00:00
dan
e7d0c5d9e9 - Added xdnd v3 support in WINGs (Sylvain Reynal <sreynal@nerim.net>)
- CVS should compile again
2004-04-07 02:50:52 +00:00
dan
fdeb749da7 Autoarrange icons after unhiding an application that has miniaturized
windows, else they may cover other icons which are now in the positions
they have occupied before hiding
2003-02-27 07:42:46 +00:00
dan
c0442b1c59 - WMGetTextDefaultColor() won't retain the returned color anymore, and you
shouldn't release it. It is just a reference to the internal WMText color.
  This should make all the functions returning colors from widgets behave
  consistently
2002-11-30 03:00:34 +00:00
dan
0fe70d2b4e - Fixed a bug with empty frame titles (Alexey Voinov <voins@voins.program.ru>)
- Added WMGetWidgetBackgroundColor()
- Code cleanup in wtext.c
- Renamed WFANonBold and WFANonEmphasized to WFANotBold and WFANotEmphasized
2002-11-25 04:46:00 +00:00
dan
4f80ec9178 - removed unnecessary include of WINGsP.h in some places
- smaller space between rows of text in WMText
2002-11-04 20:29:47 +00:00
dan
a2b404b5b3 - API change in WINGs for WMDraw*String().
WMDrawString() and WMDrawImageString() now take WMColor instead of GC as
  arguments. WMDrawImageString() receives 2 colors (text & background).
  This is to allow easy extension for Xft/Xrender and hide X low level details
- Added alpha channel to WMColor. 2 new functions also:
  WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- Removed obsoleted acconfig.h and implemented its functionality using
  AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
  This will definitely enforce the need to use autoconf 2.5x
2002-10-08 08:26:06 +00:00
dan
750917986e - Added WMGetTextFieldDelegate()
- Fixed a problem with drawing the return arrow on buttons when disabled
2002-04-03 00:51:36 +00:00
dan
6e72c20248 - Added WMSetButtonImageDimsWhenDisabled() and WMGetButtonEnabled()
- Cleaned-up the header files of functions/vars declared but not implemented
2002-03-29 01:24:12 +00:00
dan
4f84c48ccb updated de.po and fixed a typo 2002-01-10 06:03:06 +00:00
dan
28793346ab removed some C++ style comments 2001-05-10 22:24:35 +00:00
dan
ddde229665 - fixed speckles (white dots) on dithered images (bug still present on the
PowerPC architecture, because on LinuxPPC char is unsigned by default, not
  signed like on the other platforms).
  Bug fixed by Philip Derrin <philipd@student.unsw.edu.au>
- miscelaneous bug fixes

We would like people with cvs access experimenting the white 'speckles' on
images to test if they still have the problem.
2001-05-10 00:16:28 +00:00
dan
648d75c299 - put back wmksize(), wmkrange() and wmkpoint() as functions instead of macros
- fixed some compilation warnings with -Wall
- some code cleanup
2001-04-19 01:04:48 +00:00
nwanua
f8e94406df restoring copy of wtext.c to cvs (wif ssh) 2001-03-10 04:58:18 +00:00
dan
012d995ab1 Fixed uninitialized pointer in wtext.c 2001-02-28 05:40:45 +00:00
nwanua
9451aae632 now when a button click "links" to another page, instead of it
being destroyed right away, a timer handler queues it for 10 seconds
later (hopefully enough time for the buttons callback to have returned).
... 10 seconds may not be enough for ALL widget callbacks...
2001-02-22 07:48:28 +00:00
nwanua
6684492033 more cursor motion and text entry fixes, esp. for graphic blocks...
also added stipple overlay for selected graphics
2001-02-19 07:22:38 +00:00
nwanua
bc7d29d46e fixed arrow navigation quirks and color mem leaks 2001-02-12 06:09:08 +00:00
nwanua
e4ce88e7f1 fixed reqBlockSize... sometimes X%Y was zero... very bad 2001-02-09 17:06:15 +00:00
kojima
bb886be82e added responder chain alike stuff for relaying kbd events from widget to widget 2001-01-18 02:00:56 +00:00