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

90 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
c610b8d7ce Variable current_workspace moved to workspace object in global namespace
The variable current_workspace, that contains the current workspace
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_count.
2013-10-09 13:02:44 +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
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
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
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
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
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
Rodolfo García Peñas (kix)
5455a585dc funcs.h removed
The file funcs.h is removed. A new file osdep.h is created to hold
the definition for all osdep_*c files.

The files .c has been adjusted to include the right header files,
removing funcs.h, including osdep.h.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-05-26 19:48:00 +01:00
Christophe CURIS
1da498ff3b wmaker: Removed equality comparison on floating point number
The equality comparison (a == b) is known to be a dangerous trap
when floating-point arithmetics are involved. In the current case
the offending operation can be done with integers directly.
2013-05-11 00:17:27 +01:00
Rodolfo García Peñas (kix)
41da1b30db New file misc.h
This is the new file misc.h, with the function prototypes for misc.c.
This file is created using misc.c and removing the prototypes from funcs.h
2013-04-17 10:13:25 +01:00
Carlos R. Mafra
529ee0bd21 Merge branch 'wmdrawer' into next 2013-04-12 02:14:41 +01:00
Daniel Déchelotte
707ce34a5e Added a SlideWindows function to handle horizontally-aligned array of windows
The existing SlideWindow() function is changed to call SlideWindows() with an array of 1 window
2013-04-12 02:14:10 +01:00
Iain Patterson
cd5382cedf Added GetShortcutKey().
The function getShortcutString() was defined statically in winmenu.c.

Replace it with the new function GetShortcutKey() which calls the
existing function GetShortcutString() so it can be used elsewhere and
cut down on code duplication.

A result of this change is that shortcuts are now labelled consistently.
Previously the format was different in generated menus, which used, for
example, M1 to refer to Mod1 whereas window menus used the full string
Mod1.  Now both use the shorter form.

One could argue that the new function name is more consistent, as now
GetShortcutString() takes a char * argument and GetShortcutKey() takes a
WShortcutKey argument.  That argument assumes that the original
intention behind the name of GetShortcutString() was not to hint that it
returns a String...
2013-03-28 18:47:25 +00:00
Christophe CURIS
139f912e61 Remove dependency to CPP: removed stuff related to CPP calls
Now that the built-in parser has support for all the feature of CPP
being used by WindowMaker's default menu, we can remove the stuff
related to calling CPP:
 - code for preparing and running CPP;
 - compile-time option to de-activate the call to CPP;
 - command-line option
2012-07-14 20:22:21 +02:00
Rodolfo García Peñas (kix)
42cb1291e3 New move_window function 2012-06-25 23:43:39 +01:00
Rodolfo García Peñas (kix)
50765fab84 GetProgramNameForWindow removed
The function GetProgramNameForWindow is no longer used, so it can be removed.
2012-06-18 23:21:07 +01:00
Rodolfo García Peñas (kix)
761fd37e51 WindowMaker: Clean curly brackets
This patch removes the unneeded curly brackets in multiple files.

It also add some comments in the code. In usermenu.c removes some
variables not used.
2012-04-15 23:15:20 -03:00
Tamas TEVESZ
f65b99e615 Remove warnings
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
2011-03-24 16:19:52 +01:00
Tamas TEVESZ
3c408fa179 Update local copy of GPLv2 and FSF address in copyrights
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
1f21919809 Remove wsyserrorwithcode, rename wsyserror to werror
wsyserrorwithcode - Not used, no point either.
wsyserror->werror - qualifying "error" with a "type" hardly makes
sense if there are not at least two "type"s. There are not. Safe trip.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Carlos R. Mafra
0350b8445a Remove unneeded extern's in .c files
They were not being used in those files, so let's remove them.
2010-04-14 18:39:28 +02:00
Carlos R. Mafra
4041278f48 Address some sparse warnings
Plain integer as NULL pointer, non-ANSI function declaration etc.
2010-04-14 18:39:17 +02:00
Brad Jorsch
12de2f319e Fix uninitialized vars
Initialized variables that are conditionally set. In particular, this
construct is dangerous:
  void *p;
  if (something) p = couldReturnNull();
  if (!p) p = fallbackFunction();
2010-04-12 09:58:36 +02:00
Renato Botelho
0f5c36a67e Fix non-I18N build
* Remove directly include of <libintl.h> and include src/wconfig.h, that
already include libintl.h and declare _() function
* Replace some gettext() calls to _()

These changes fixes build with LINGUAS is unset, and removes I18N
support in this case.
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
294ea56d84 Introduce OS-dependent stuff
- move GetCommandForPid() into a separate file
- slightly rewrite it to be more readable along the way
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
61a96e79c4 Trivial format string fixes 2010-03-26 21:08:16 +01:00
Tamas TEVESZ
9f7aaa8aed Some rework on getstyle
- make it use wings functions, remove duplicated code from getstyle
- de-static necessary functions in wings
- add new wrmdirhier to wings
- rename WMMkDirHier to wmkdirhier (fits better)
- remove calling shell from getstyle (what were they thinking?)

i couldn't quite test getstyle (no idea about themes), but it still
basically works.

do back your ~/G dir up... wrmdirhier might eat it!

definitely needs testing, especially by people who have any idea
how themes work.

Some more getstyle

- missed a shell invocation
- maybe copyFile should be in wutils too...?

[crmafra: Folded second patch into the first]
2010-03-23 21:50:17 +01:00
Carlos R. Mafra
5178465bb6 Remove DEBUG statements, #if 0 etc
...and some other cleanups.
2010-03-20 18:42:56 +01:00
Carlos R. Mafra
e1d5ce7a51 Cleanup includes of wcore.h, defaults.h and pixmap.h
Several files were including others for no reason, and this slows
down the build time (but probably not measurable on a fast machine).
2010-03-17 11:12:53 +01:00
Tamas TEVESZ
badecc244b simplify WMWritePropListToFile()
remove the choice of atomic/non-atomic writes. firstly, the only users
of non-atomic writes were getstyle and geticonset; secondly, who in their
right minds would ever want non-atomic writes; thirdly, the file system
will screw you anyway *G*.
2010-03-17 11:12:53 +01:00
Carlos R. Mafra
484bdbe7d4 Ansify function declarations
I've just noticed them en passant.
2009-09-24 23:40:39 +02:00
Carlos R. Mafra
1a85719971 Increase the readability of SlideWindow()
It is easier to read the computations if the variables
have shorter names. At the same time it avoids reading
the struct array elements repeatedly, so as a bonus
misc.o gets 64 bytes (0.5%) smaller

[mafra@Pilar:wmaker.git]$ size src/misc.o.*
   text    data     bss     dec     hex filename
  11125       0    4104   15229    3b7d src/misc.o.new
  11189       0    4104   15293    3bbd src/misc.o.old
2009-09-17 00:44:36 +02:00
Alexey Voinov
05720d9707 Add history to some dialog boxes
This patch adds history to some dialog boxes. To use it replace %a with
%A in menu file (like in "Run..." menu item). You can specify third
parameter to %A to use different histories for differen dialogs.

All history files is kept in ~/GNUstep/.AppInfo/WindowMaker/ and the number of
history lines controlled by DialogHistoryLines parameter (one for
all dialogs) defaults to 500 lines.

It also adds Tab completion.

Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>
2009-09-03 15:44:11 +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
Tamas TEVESZ
e2b6a85e80 Fix buffer overflow in SendHelperMessage()
The following fixes a buffer overflow in SendHelperMessage() which i
started seeing recently on x64.
2009-08-16 01:05:23 +02:00
dan
c0317ddae5 eliminated gcc-4 compilation warnings 2005-08-22 23:58:19 +00:00
dan
684621ecd4 - fixed possible crash bug because a variable allocated on stack was
returned by a function
- removed obsolete macro
2004-11-11 14:14:52 +00:00
kojima
f274afdd1d added themable, pixmap background switch panel 2004-10-25 00:07:51 +00:00
kojima
3088277b1e fixed unclosed file bug 2004-10-13 06:10:36 +00:00
kojima
879b00a57b - Removed legacy OFFIX_DND support code
- Fixed the signal handler for crashes (ie, removed it) and made wmaker
  restarting be made automatically by a monitoring process.
- Made NetWM support be enabled by default
- Removed old code to store/restore workspace state (now relies on netwm)
2004-10-13 05:09:08 +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
847479b886 Fixed bug with incorrect un-escaping if there is a dot in wm_class. 2003-09-03 19:09:20 +00:00
dan
b381674375 - Fixed incorrect focusing of application's windows after an unhide (sometimes
the incorrect window got focus instead of the apps's last focused window)
- Unshade application's shaded windows when Dbl-MiddleClick-ing its appicon.
  (this is to be consistent with deminiaturizing application's miniwindows
  which also happens in this case, since shading is a form of miniaturization)
- misc fixes
2003-02-11 00:32:17 +00:00
dan
4153e2fde4 - Fixed crashing bug in menu.c
- Updated year from 2002 to 2003
2003-01-16 23:30:45 +00:00
dan
efb0090f8c fixed some memleaks (1 serious, 5 minor) 2002-03-01 10:03:35 +00:00
kojima
a8950af8ac fixed segfault with incomplete WM_CLASS 2002-02-20 15:01:44 +00:00
dan
cab71ba6a1 - Fixed text in info panel for multibyte (Seiichi SATO <ssato@sh.rim.or.jp>)
- Separated the font caches for normal fonts and fontsets in WINGs (they can
  have the same names and collide in the cache giving unwanted results)
- Updated the years in the copyright notices
2002-01-04 07:32:37 +00:00
dan
41996df786 - Saving a domain file will first strip all entries that are also present in
the global domain as well and are exactly the same. This fixes a bug where
  settings from the global domain file were merged in the user domain file
  and further changes in the global domain file for those merged values was
  ignored making a system admin unable to set global defaults for all users
  using the global domains.
- Fixed bug with not extracting the icon from the client when using
  shared appicons.
- Added WMSubtractPLDictionaries() to WINGs (opposite for merging, it will
  remove all entries from dest if they are present in source and are exactly
  the same. Unique entries in dest and entries with different values from
  those present in source will be preserved).
2001-12-20 22:16:01 +00:00