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

2449 Commits

Author SHA1 Message Date
Tobias Stoeckmann
72546aab81 Get rid of NEW definition.
The NEW definition merely calls wmalloc now, therefore it is not needed
anymore.  Pointed out and requested by Carlos R. Mafra.
2012-05-07 20:36:10 -03:00
Tobias Stoeckmann
cc30444dda No need to call memset after wmalloc
memset is the last function call in wmalloc, just before it returns the
newly allocated memory.  Therefore it is not needed to call it again
after wmalloc call.  Although I would prefer to switch wmalloc to a
calloc-based wcalloc function, the compatibility of WINGs for old apps
should be kept.
2012-05-04 18:41:01 -03:00
Iain Patterson
aee0ad45f2 More intuitive maximization handling.
Avoid some pitfalls with window maximization and make it behave more
intuitively.  We now treat a window's vertical and horizontal
maximization as separate properties and only remember its original
geometry in a particular direction when it actually changes.  We also
deliberately do not remember a window's geometry when it changes from
one maximized state to another.  As a result windows can be more
reliably restored to their original size.

For example the "Maximize active window" hotkey followed by the
"Maximize active window vertically" hotkey will now result in the window
being maximized horizontally only, whereas previously the second hotkey
would have no effect because the window was already maximized
vertically.  In addition selecting the Unmaximize window menu in the
same example will now result in the window being restored to its
original size.  Previously the unmaximize attempt would have no effect
because the vertical maximization would have remembered the window's
"original" geometry when it was fully maximized.

Maximus is handled separately.  The "Maximus" hotkey will now toggle
Maximus mode regardless of the window's current maximization state.  For
example if two unmaximized windows are on screen and one is Maximusized
it will fill the space left by the second window, as before.  But if the
first window is maximized and the "Maximus" hotkey is pressed the window
will now fill the same space as if it were Maximusized from its original
size.  Previously the window would not change size from its fully
maximized state because the Maximus algorithm would consider
fully-maximized to be a valid Maximus size.
2012-05-04 18:39:21 -03:00
Tobias Stoeckmann
e6e3e1aa49 Avoid memory leak on error path in constructMenu. 2012-05-04 18:39:21 -03:00
Tobias Stoeckmann
753f44c4b7 Fixed memory leak in wHideAll. 2012-05-04 18:39:21 -03:00
Tobias Stoeckmann
2755b1e45d Use proper (w)free functions for (w)malloced data. 2012-05-04 18:39:21 -03:00
Tobias Stoeckmann
975d4becf1 Fixed some typos. 2012-05-04 18:39:21 -03:00
Carlos R. Mafra
95c68d2b10 Scare people away from --enable-xrandr
Xrandr support is currently very primitive and stupid, but people
do not seem to be aware of its problems and still enable it in distros.

Try to scare them to not do that.
2012-04-30 15:07:02 -03:00
Tobias Stoeckmann
1bcfb89cd1 Adjust OpenBSD-specific code to match OpenBSD-current
Also fix null pointer dereference by NOT calling strlen on a possible
null pointer.
2012-04-30 14:50:17 -03:00
Tobias Stoeckmann
e83eeb15cc Include assert.h to avoid linker issues if -DDEBUG was not supplied. 2012-04-30 14:48:20 -03:00
Tobias Stoeckmann
f25464c792 Avoid GNUism in Makefiles for *BSD support
Variable abs_srcdir will always point to proper source location.
With this patch, there is no need to call gmake on OpenBSD anymore.
2012-04-30 14:46:54 -03:00
Carlos R. Mafra
8311058a16 Revert "Inotify: Reload keyboard shortcut definitions when configuration changes"
This reverts commit cbe2f4e61a.

The reason for the revert is the regression reported here:
http://marc.info/?l=openbsd-ports&m=133151145814675&w=2

  I've been able to reliably reproduce the double-spawning of
  xterms I've been seeing. The bad news is that it still happens
  even with a fresh configuration directory.

  To reproduce:
  0) Create a keyboard shortcut if one does not already exist (I'm
  using <ctrl>+u set to spawn an xterm)
  1) Open WindowMaker's preferences.
  2) Click on "Applications Menu Definition" (it's the icon
  immediately to the left of the keyboard icon)
  3) Click save, and then close.
  4) Keyboard shortcuts will spawn two applications.

  I use keyboard shortcuts to spawn xterms, browsers, and filemanagers.
  All of them spawn twice after performing the above.  To fix it,
  <F12> or <right-click> -> Exit -> Restart.

  If I repeat steps 1-3, three windows will spawn.  Repeat again and
  four windows will spawn etc.  (I stopped after getting five to
  spawn at once).
2012-04-30 14:36:43 -03:00
Carlos R. Mafra
4e2ee27bfa Fix wrong wfree() use
There is a bug which happens when one modifies the "Initial Workspace" in the
"Attributes..." menu. Upon saving the change wmaker segfaults.

Commit ad373ef0dd ("WindowMaker: New function wGetWorkspaceNumber")
used wfree() in variables which were not wmalloc'ed. Fix this.
2012-04-26 11:11:32 -03:00
Christophe CURIS
39fdb451ba Fixed wrong structure declaration
The declaration of the structure actually also created an unused variable. This
variable was not used anywhere, and lead to symbol defined in multiple objects.
These symbol are silently merged by GCC, thus no problem was reported.

The issue was raised by Yves de Champlain when trying to compile with LLVM/clang
which is a bit stricter there.
2012-04-21 09:33:27 -03:00
Rodolfo García Peñas (kix)
244b63e6b5 WindowMaker: New get_texture_image function
The new function get_texture_image includes the common code of
wTextureMakePixmap() and wTextureMakeTGradient()
2012-04-20 20:36:07 -03:00
Rodolfo García Peñas (kix)
1b0ed30b9b WindowMaker: Header files clean code
Changes:
  - Spaces replaced by tabs in the structs
  - Removed unused variables:
    - has_titlebar, never used
  - Functions sort by return type
2012-04-16 09:33:39 -03:00
Rodolfo García Peñas (kix)
0db76b822d wIconStore(): do not save the icon if it exists
The function wIconStore() doesn't write a new file overwriting the
previous icon if the icon file exists.
2012-04-16 09:32:24 -03:00
Rodolfo García Peñas (kix)
21fb6db616 WindowMaker: New function wIconCreateCore()
The new function wIconCreateCore do the common work to create a WIcon.

This code was before in wIconCreateWithIconFile() and wIconCreateWithIconFile().
2012-04-15 23:15:47 -03:00
Rodolfo García Peñas (kix)
219315aa58 WindowMaker: Check iconPath variable only if needed
The variable iconPath should only checked inside the if block,
because outside is never initialized.
2012-04-15 23:15:47 -03:00
Rodolfo García Peñas (kix)
ad373ef0dd WindowMaker: New function wGetWorkspaceNumber
The new function wGetWorkspaceNumber returns the workspace number
for a given workspace name.

The code of this function is already used in session.c and wdefaults.c
and now is moved to workspace.c

In wSessionRestoreLastWorkspace the char value is checked before
calling the function, because without string, the function don't do
nothing.
2012-04-15 23:15:20 -03: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
Rodolfo García Peñas (kix)
afe2e5d9d6 WindowMaker: appicon.h clean code
Changes to appicon.h:

- Spaces replaced by tabs in the struct
- Removed unused variables:
  - client_machine, never assigned
  - gnustep_app, never used
- Functions sort by return type

Then, in dock.c, the block with client_machine is never true,
then can be removed. The host variable then is never used.
2012-04-15 23:15:20 -03:00
Iain Patterson
b3afad67ff Use noreturn attribute in Exit() declaration.
Use the gcc-specific noreturn attribute to advise the compiler that
Exit() doesn't return.  This is safe because we already use preprocessor
rules to hide __attribute__ from other compilers.

Suggested independently by Christophe Curis and Brad Jorsch.
2012-04-11 23:56:31 +01:00
Iain Patterson
bca60318ca Compiler diet.
Don't feed the compiler.  RelaunchWindow() is declared to return Bool so
Bool it shall proudly return.
2012-04-11 23:55:58 +01:00
Iain Patterson
0601e0f002 Style consistency.
Approved style is not to write a single-operation for loop in a single line.
2012-04-11 23:55:47 +01:00
Rodolfo García Peñas (kix)
391a8edb9c Turn wApplication{Activate,Deactivate} into real functions
The functions wApplicationActivate and wApplicationDeactivate are now defined
as functions, not as preprocessor functions.
2012-04-05 12:26:25 +01:00
Rodolfo García Peñas (kix)
517cd6a8be Remove unused functions
These functions are not used:

- wDefaultsDestroyDomain
- PropWriteGNUstepWMAttr
- wSessionSendSaveYourSelf
- wXDNDClearAwareness
- clearWaitingAckState
- wSessionSaveClients
2012-04-04 19:44:40 +01:00
Iain Patterson
ba786015b7 Describe relaunching in the NEWS file. 2012-04-04 14:07:42 +01:00
Iain Patterson
aaf934eb2f Compiler food.
main.c: In function ‘RelaunchWindow’:
main.c:461:1: warning: control reaches end of non-void function
[-Wreturn-type]

Actually we can't reach the end of the function because the three
possible cases are Exit(-1), return False and return True.  Of course if
Exit() were ever changed the above statement might become incorrect.
Some compiler food silences the warning.
2012-04-04 13:02:58 +01:00
Iain Patterson
056a290a7d Also relaunch from appicon with Ctrl + DblClick.
Zoltan Balaton points out that Control + Doubleclick on docked app will
launch a new instance.  For consistency with that behaviour we now allow
Control + Doubleclick on an undocked appicon to invoke the new
relaunching functionality.

We also now restrict doubleclick handling to the left mouse button in
order to avoid relaunching the application twice when the middle button
is used.
2012-04-04 12:15:20 +01:00
Iain Patterson
51c9f2a852 Also allow relaunching from appicon.
Allow relaunching an application with a middle mouse click to its
appicon or the Launch option of its appicon menu.
2012-04-04 12:15:09 +01:00
Iain Patterson
3d01e5c879 Also allow relaunching from the window menu.
Allow relaunching an application from its window menu.
2012-04-04 12:14:46 +01:00
Iain Patterson
8352c9ef60 Allow relaunch with shortcut key.
Use the WindowRelaunchKey shortcut to examine the WM_COMMAND property of
the active application's main window and launch a new instance of the
application using the retrieved command line.
2012-04-04 12:12:12 +01:00
Rodolfo García Peñas (kix)
528d97b597 canReceiveFocus() should check no_focusable first
The function canReceiveFocus should check if the window is no_focusable first.

If the window is not focusable but is miniaturized, the window is shown in the
switchpanel.

How to reproduce the problem:

- Open an application
- Open the window properties, advanced options
- Set that the application can not get the focus and save
- Test the switchpanel (Alt+Tab) the window doesn't appear
- Minimize the window
- Test the switchpanel (Alt+Tab), the window appears
- If the window is selected (restored), and test again the switchpanel, the window doesn't appear!
2012-04-04 11:49:23 +01:00
Christoph Soehngen
42a78ee73f wmgenmenu: Add more apps to our nice menu 2012-04-02 17:52:14 +01:00
Rodolfo García Peñas (kix)
aab9028fc2 Coding-style cleanup
Code style cleanup in multiple files. Tabs, spaces, curly brackets,...
2012-03-30 19:50:10 +01:00
Rodolfo García Peñas (kix)
1a0e665e58 WindowMaker: icon.c comments added
Some comments added to icon.c file.
2012-03-16 09:04:03 +00:00
Rodolfo García Peñas (kix)
1bec2efba0 WindowMaker: icon.c goto removed
The goto "make_icons" in icon.c was removed.
2012-03-16 09:03:11 +00:00
Rodolfo García Peñas (kix)
72f359be44 WindowMaker: New function get_pixmap_icon_from_user_icon
The new function get_pixmap_icon_from_user_icon() splits the
function wIconUpdate().
2012-03-16 08:59:45 +00:00
Rodolfo García Peñas (kix)
cf9f0ec67e WindowMaker: New function get_pixmap_icon_from_wm_hints
The new function get_pixmap_icon_from_wm_hints() splits the
function wIconUpdate().
2012-03-16 08:57:35 +00:00
Rodolfo García Peñas (kix)
3adc058421 WindowMaker: New function get_pixmap_icon_from_icon_win
The new function get_pixmap_icon_from_icon_win() splits the
function wIconUpdate().
2012-03-16 08:55:50 +00:00
Takeo Hashimoto
ebe9a27e8d Japanese translation updated 2012-03-11 02:41:53 +01:00
Rodolfo García Peñas (kix)
6cbdebb84b WindowMaker: New get_wwindow_image_from_x11 function
A new function is created to get the image from the X11 window.

The function updateIconImage is splitted in two blocks, one is moved
to get_wwindow_image_from_x11 with the X11 code, and other is used
to update the Application and Window icons (kept in the same function).
2012-03-08 23:31:32 +01:00
Rodolfo García Peñas (kix)
9079b904d6 Little simplification in makeIcon() 2012-03-08 23:19:05 +01:00
Rodolfo García Peñas (kix)
f550333474 Coding style cleanup in wmspec.c
This commit cleans the source a bit and adds some comments.
2012-03-08 23:18:55 +01:00
Rodolfo García Peñas (kix)
fe3cbb0dc4 Fix technical drawing+opaque resize
Doug Barton reported that using "Technical drawing-like" for "Size display"
under WPrefs "Miscellaneous Ergonomic Preferences" together with opaque
resize would lead to artifacts left on screen when resizing.

This patch fixes it (and it also fixes some minor coding style issues
in the surroundings).
2012-03-05 16:34:34 +01:00
Rodolfo García Peñas (kix)
a3c99bddc8 debian: Small updates in menus etc
The file "clean", which contains "WindowMaker/Defaults/WMRootMenu"
can be removed, because this file was included to be cleaned in
the commit 01907f9983

The Application/* items are moved to the root menu, removing the
"Applications" submenu. The files from /etc/X11/WindowMaker moved
to /etc/GNUstep/Defaults
2012-03-04 16:33:35 +00:00
Rodolfo García Peñas (kix)
4f4ea569a0 Coding style cleanups 2012-03-04 09:08:52 +00:00
Alexey I. Froloff
e819818eeb Options for limiting window/menu title height
(Window|Menu)Title(Min|Max)Height defaults options allow to set
minimum and maximum titlebar height.

For example, to force all titlebars to 24 pixels execute
following commands:

$ wdwrite WindowMaker WindowTitleMinHeight 24
$ wdwrite WindowMaker WindowTitleMaxHeight 24
$ wdwrite WindowMaker MenuTitleMinHeight 24
$ wdwrite WindowMaker MenuTitleMaxHeight 24

Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2012-02-27 14:19:49 +00:00
Carlos R. Mafra
99aad55425 wmgenmenu: Fix name for FSViewer 2012-02-27 02:11:14 +00:00