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

1882 Commits

Author SHA1 Message Date
Carlos R. Mafra
0a5febcada Remove unused function argument from randomPlaceWindow() 2009-12-09 20:35:13 +01:00
Nicolas Bonifas
41fdb79e28 Maximus: Take border into account
This patch fixes a minor bug in Maximus: the new window size didn't take the
 border into account. This bug was particularly visible with the
 "do not cover dock" option turned on.
2009-12-08 16:14:29 +01:00
Ralf Hoffmann
d74a90d1bf changed behavior when focusing new windows with autofocus enabled
New windows will only get focused if the mouse is on the same screen.
The code doesn't handle multiple heads but since it's just one screen
the function works as usual. Checking the head and assign the focus only
if the window is on the same head might be a good idea. Making the whole
stuff optional might be even better.
2009-12-08 16:14:29 +01:00
Ralf Hoffmann
fe8ab024af fixed wrong env setup when setting background
This patch fixes a problem with restarting Window Maker in multi-screen
environments. The code for setting the background by calling wmsetbg
changes the environment. In multi-screen setups the DISPLAY variable
becomes :0.0 instead of :0 (for example). The restarted Window Maker
process therefore only manages one screen.
2009-12-08 16:14:29 +01:00
Ralf Hoffmann
6c6e832c52 activate XGrabServer again
This patch fixes a small problem which only rarely occurs. If a
window is opened only for a very short time and closed right away, in
some circumstances the frame around it stays opened. It looks like
Window Maker doesn't get the destroy message. The XGrabServer call was
commented in the code so I activated it again which seems to prevent this
from happening. I think it actually make sense since the ungrab calls are
used anyway in the following code.
2009-12-08 16:14:29 +01:00
Carlos R. Mafra
13c2d523e2 Remove DRAWSTRING_PLUGIN reference from wconfig.h.in
DRAWSTRING_PLUGIN never appears anywhere else in the sources.
2009-12-08 16:14:29 +01:00
Carlos R. Mafra
e7cc15df71 Remove unused function getRImages()
Pointed out by Nicolas Bonifas.
2009-12-06 15:35:26 +01:00
Carlos R. Mafra
3db3f179d1 Remove unused src/menureader.c file 2009-12-06 15:35:26 +01:00
Carlos R. Mafra
5fa41941fe Remove unused wHackedUngrabButton()
Pointed out by Nicolas Bonifas.
2009-12-06 15:35:25 +01:00
Carlos R. Mafra
4c4d50c813 Remove unused function wIconSetHighlited()
There is no point in carrying unused functions for so long.

Pointed out by Nicolas Bonifas.
2009-12-06 15:35:25 +01:00
Carlos R. Mafra
8c5a7b287a Remove unused functions from src/pixmap.c
In case someone needs them in the future for some reason,
they can be restored from the git logs.

Pointed out by Nicolas Bonifas.
2009-12-06 15:35:25 +01:00
Carlos R. Mafra
347fbcc87a Remove unused function wWindowCheckAttributeSanity()
As pointed out by Nicolas Bonifas, wWindowCheckAttributeSanity() is
currently unused. Removing it saves 200 bytes:

  text    data     bss     dec     hex filename
  23476       0       8   23484    5bbc src/window.o.new
  23676       0       8   23684    5c84 src/window.o.old
2009-12-06 15:35:25 +01:00
Nicolas Bonifas
a2cb317f11 Remove useless NULL test
If menu is NULL we would have a null pointer dereference when initializing scr.

> Ie, why not move the assignment of 'src' to after the test?

I thought about this, but I checked the 3 different calls to
updateWorkspaceMenu (all in winmenu.c). They must all call
updateWorkspaceMenu with non-NULL pointers, so if we have a NULL
'menu' pointer then we obviously have a major problem and it is
probably better to crash here than to silently return and fail a
little latter.

[crmafra: edit changelog]
2009-12-06 15:32:30 +01:00
Nicolas Bonifas
391d5de79e 2 open() statements were not matched with close() statements in function fetchFile 2009-12-06 13:58:24 +01:00
Carlos R. Mafra
ad4358c605 Update German translation
Based on a patch from OpenSUSE whose author is unknown.
2009-12-01 14:17:50 +01:00
Nicolas Bonifas
2203b229b0 Fix the empty button in titlebar after going fullscreen bug (Debian bug #298873) 2009-11-17 01:42:15 +01:00
Carlos R. Mafra
4932433b95 Remove DEMATERIALIZE_ICON code
This animation is not as cool as the NORMAL_ICON_KABOON, so I don't
think having a choice here is justified. Let's remove this option
(it was not defined in wconfig.h.in by default) and keep using
the nicer NORMAL_ICON_KABOON.
2009-10-17 01:56:28 +02:00
Carlos R. Mafra
f9792a042a Remove SILLYNESS
This code makes wmaker a little bit bigger for no gain at all. I could
undefine SILLYNESS and forget it, but I actually also want a clean
source code to read. And the less code the better.

So now I won't get a different Info dialog on Christmas, but
my wmaker will also not carry around that code in the other 364 days
of the year.

As a result, wmaker gets ~1.7 % smaller

   text	   data	    bss	    dec	    hex	filename
 448043	  17424	   8200	 473667	  73a43	wmaker.new
 455340	  18360	   8328	 482028	  75aec	wmaker.old
2009-10-17 01:38:53 +02:00
Carlos R. Mafra
96b9b22cb2 Remove #ifdef SYS_SIGLIST_DECLARED constructs
SYS_SIGLIST_DECLARED was defined nowhere and it was
clearly some dead code.
2009-10-17 01:05:28 +02:00
Johann Haarhoff
1f1eb393f8 Mod+Wheel resize increment now respects size hints
Thanks to Iains patch which showed me how to access the window hints, I
now propose the following: The resize increment is set to the closest
multiple of the size hints larger than wPreferences.resize_increment.

This should fix Carlos' complaint about fixed-increment windows resizing
too "slowly", and it also fixes my complaint about the blank space below
the last line of an xterm.

Thanks to:
    Iain Patterson <wm@iain.cx>
2009-10-13 12:17:57 +02:00
Iain Patterson
bf88570a5f Respect size hints when resizing with wheel.
Use height and width increment when wheel resizing if size hints are
set on a window and meaningful height and width increments are
specified.
Windows which don't care about their resize increments will have height
and width increments set to 1.  For these windows - and windows without
resize hints at all - use the setting configured with ResizeIncrement.
2009-10-12 15:24:13 +02:00
Carlos R. Mafra
a3246cfe3b Remove remaining sound stuff from WPrefs etc
Let's remove the configuration options about "sound" from
WPrefs (as it was never fully functionall anyway) and from
configuration files.

Remove also the xpm and tiff icons.
2009-10-12 03:02:24 +02:00
Carlos R. Mafra
c5f027d811 WPrefs: trivial coding style fixes 2009-10-12 02:41:27 +02:00
Carlos R. Mafra
af8cec15e3 Remove repeated functions enclosed by #if 0
There are already working versions of these functions,
so let's remove these copies.
2009-10-12 01:02:19 +02:00
Carlos R. Mafra
15e37ff942 Remove #ifdef NETWM_HINTS constructs
NETWM_HINT is always defined in src/wconfig.h.in, so
let's remove it from there too.
2009-10-12 01:00:19 +02:00
Carlos R. Mafra
347e804bb6 A few trivial code style cleanups 2009-10-11 23:30:41 +02:00
Johann Haarhoff
a063338175 Mod+Wheel Window Resize
This patch adds the ability to resize windows with the mouse wheel
while holding the Mod key. This currently ignores wWindowConstrainSize
until I can figure out a way to repeatably resize windows with
fixed size increments (like xterm) using this method.

This also adds a slider to WPrefs to choose the increment with which
the wheel will resize a window.
2009-10-11 22:17:54 +02:00
Carlos R. Mafra
781b663341 HOWTO: The perfect Window Maker patch
This document is a very brief description about how you can
create a patch "the git way", so that it can be applied
easily with 'git am'.
2009-10-11 17:37:18 +02:00
Carlos R. Mafra
09140a82b9 Increase granularity of 'shrink/zoom' animation
Now it is a bit easier to actually enjoy the animation :-)
2009-10-10 19:55:57 +02:00
Carlos R. Mafra
87161c5e0c Remove MINIATURIZE_ANIMATION_DELAY_{Z,F,T} tests
We know that they are non-zero because we set their
values explicitly in wconfig.h.in, so there is no
point in checking them.
2009-10-10 19:30:04 +02:00
Carlos R. Mafra
cda27758bc Add function prototypes in action.h and include it in superfluous.c 2009-10-10 19:29:56 +02:00
Carlos R. Mafra
b014ef2770 Remove 'hiding' parameter from animateResize()
It was a bit pointless.
2009-10-10 19:03:12 +02:00
Carlos R. Mafra
e9309e1e39 Delete WINDOW_BIRTH_ZOOM and default to WINDOW_BIRTH_ZOOM2
WINDOW_BIRTH_ZOOM was a bit lame and it makes sense to not have
it at all. So remove the trailing "2" of WINDOW_BIRTH_ZOOM2 and
make it the only choice (you can #define it in src/wconfig.h.in).

Note that it uses the same algorithm as the animation to resize,
ie zoom, twist or flip. You can choose them in WPrefs.
2009-10-10 18:27:52 +02:00
Carlos R. Mafra
06d3360224 Remove 'ghost window move' code
GHOST_WINDOW_MOVE was not defined anywhere. Let's remove that
code.
2009-10-10 00:05:58 +02:00
Carlos R. Mafra
9d6728d3e7 Remove SPEAKER_SOUND dead code
SPEAKER_SOUND is defined nowhere, so this code was not being used
and I don't want its functionality anyway.
2009-10-09 23:59:37 +02:00
Carlos R. Mafra
2765bec3e4 Remove sound support
Two reasons for removing it:

    1) I won't ever want to hear useless sounds

    2) The sound support is a bit of a joke. The code is there but you have
       to hunt it somewhere else (not in any repository that I know of).
       In my 10 years of using wmaker, I never used it for this reason.
       Now I consider having no sound in Window Maker a feature, and I like
       it that way. So there is no point in carrying useless code around.

PS: There is still the code in WPrefs to be removed.
2009-10-09 20:04:47 +02:00
Carlos R. Mafra
7df49cce14 Clean up contrib/ folder
Let's remove the "single click" patch from there.
2009-09-24 23:53:03 +02:00
John H. Robinson, IV
21eb8456ba Updated documentation
Updated URIs
Removed stale/outdated information
Reformatted for 80 columns
2009-09-24 23:41:36 +02:00
Iain Patterson
bc3995bf6b Fix msgfmt error with Armenian translation.
msgfmt said:

hy.po:685: `msgid' and `msgstr' entries do not both end with '\n'

Fixed by adding newline as in original text.
2009-09-24 23:41:10 +02:00
Norayr Chilignaryan
7f457fa275 Window Maker armenian translation 2009-09-24 23:40:46 +02:00
Carlos R. Mafra
484bdbe7d4 Ansify function declarations
I've just noticed them en passant.
2009-09-24 23:40:39 +02:00
Martin Dietze
ef2f5a6f29 Fix automatic Debian builds 2009-09-24 10:13:44 +02:00
Carlos R. Mafra
12b6be768e swpanel: Fix focus issue when alt-tabbing
The problem was the following. While alt-tabbing from one
window to a xterm, wait for the xterm to be raised but
keep the alt key pressed. Now move the mouse cursor
over the xterm and release the alt key.

The result is a xterm in a zoombie focused state; its titlebar
has the focused color but xterm itself is not focused and does
not accept any input.

Fix this by reinstating the check for a NULL pointer from
wSwitchPanelHandleEvent() before changing focus. That function
detects if the mouse cursor moved over to the same window which
is currently being pointed out by the switchpanel, and returns
NULL in this case (the check for panel->current != focus fails).

Thanks to Paul Harris for reporting it!
2009-09-19 16:07:47 +02:00
Carlos R. Mafra
6a0120f014 Maximus: Some cleanups and bug fixes
Let's ignore hidden windows and also adjust the coordinates
a bit, to avoid ~2 pixels of overlap.

I thank Paul Harris for pointing out these bugs.
2009-09-19 16:07:03 +02:00
Carlos R. Mafra
0a0c2391de Maximus: Avoid a window list order issue
If we compute the maximus geometry in only one pass through
the window list, the order in which the windows appear in
the list can affect the outcome.

That is because before computing the intersections in the
y-projections we update the y coordinates from whatever window
which happened to change the new_y coordinate during the
previous x-intersection computations, but that may not be _the_
blocking window which decides the final positions in the y axis.
Therefore we may find that this "intermediate window state"
has a non-vanishing y-intersection with another one -- and
be blocked by it -- even though that should not be the case for
the final outcome.

So to avoid that we first scan through all the windows to decide
the final maximumized coordinates in the y axis. Only after that we
compute the x-coordinates.
2009-09-19 16:06:48 +02:00
Carlos R. Mafra
7a86f48f73 Fix --disable-verbose-compile
Remove an extra $(QUIET), as that was causing a few annoying
messages during the compilation of libraries.
2009-09-19 16:06:18 +02:00
Alexey Voinov
3953f53680 WINGs shared library generation
This patch modifies the linking of the WINGs libraries
to create a shared library. wmaker used to do this, but
it was dropped around wmaker-0.90/0.91.
The shared .so library is needed when compiling and running
the wdm display manager and any other programs which link
to libWINGs.

Submitted by: Gilbert Ashley
Origin: ALT/Sisyphus Linux
2009-09-19 16:06:05 +02:00
Carlos R. Mafra
92eff967a7 Maximus: Consider the full_maximize window attribute
When maximumizing a window which has the full_maximize attribute
set we have to consider two possibilities:

    1. If the new y coordinate is zero it means that no other
       window blocked its maximumization up to the top of the
       screen, so we want to put the titlebar outside.

    2. If the new y coordinate is not zero it means that another
       window in the current workspace blocked its way to y = 0.
       In this case we do nothing with the titlebar.

Note that there is another possible fine tunning which is not
addressed in this patch, which is to consider the resize bar.
2009-09-17 00:46:14 +02:00
Carlos R. Mafra
eaca92db50 Simplify wMaximizeWindow() a little bit
Let's avoid checking the existence of a border every time
we want to adjust the widths. So we'll always subtract the correction
factor, which is zero in case the window has no border.
2009-09-17 00:46:14 +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