1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00
Commit Graph

1882 Commits

Author SHA1 Message Date
Alexey I. Froloff
5979162878 Fix race condition during workspace changes
When changing workspaces, after focusing new window, wmaker handles all
pending events.  If it receives another change-workspace combination,
you may end up with a workspace without any focused window.

Ctrf-F1 and Ctrl-F2 used to switch to 1st and 2nd workspaces.
Hold Ctrl and press F1 and F2 almost at the same time.

This patch ignores all change-workspace commands while workspace
change is in progress.

See also https://bugzilla.altlinux.org/show_bug.cgi?id=7230

[crmafra: Thanks to Alexey I. Froloff for the above explanation]
2009-09-15 20:14:55 +02:00
Carlos R. Mafra
306165775e Yet another trivial coding style cleanup 2009-09-15 20:06:04 +02:00
Carlos R. Mafra
c7f2a189c4 Fix the call to XChangeProperty() in 64-bit mode
The man page of XChangeProperty() says:

  "If the specified format is 32, the property data must be a
   long array."

And as we call it with format 32, the type of 'data' must
be 'long'. It happens to work nowadays in 32-bit architectures
because sizeof(CARD32) = sizeof(long), but that is no longer
true in 64-bit mode.

This patch was downloaded from
www.openbsd.org/cgi-bin/cvsweb/ports/x11/windowmaker/patches/patch-WINGs_wwindow_c
and I thank Alexey I. Frolov and Vladimir Nadvornik for helping me
to understand it on a wmaker-dev thread.
2009-09-15 12:52:14 +02:00
Carlos R. Mafra
ca2c1f900d Trivial coding style fix 2009-09-15 01:52:35 +02:00
Iain Patterson
18408fff93 Mac OS X-style window cycling.
For those not familiar with the way Macs cycle windows, the Command-Tab
sequence (Alt-Tab elsewhere) switches between DIFFERENT application windows
and Command-Grave (key above tab) switches between windows owned by the
SAME application as is currently focused.  So if you had three Safari and
two Finder windows open, and Safari had focus, Command-Tab would switch to
Finder; Command-Tab would switch back to Safari; Command-Grave would switch
to a different Safari window etc.

This patch implements "something like" the above by only populating the
switchpanel with windows matching the currently-focused WWindow's wm_class
when the new cycling mode is activated.  In practice this means you can
switch to The Next XTerm or The Next Firefox Window using this method.

The configuration names for these new shortcuts are GroupNext and
GroupPrev.  The patch tells WPrefs.app about them.  Of course switching to
The Next Window is still possible with the (unchanged) FocusNext and
FocusPrev keys.
2009-09-14 16:51:26 +02:00
Iain Patterson
5c46f48898 Support Xinerama in wmsetbg.
Allow wmsetbg to revert to pre-0.90.0 behaviour when choosing a
background image that is large enough to span several heads in a
Xinerama setup.  If the -X flag is passed to wmsetbg, the background
image will be stretched to fill the logical screen (as it would be by
default in older versions of wmsetbg) instead of being tiled across
screens.
2009-09-14 16:51:26 +02:00
Iain Patterson
567279b962 Pad workspace name display.
Shift the workspace name, shown when switching workspaces, by 32
pixels.  This is purely for aesthetic reasons.  It just looks better
(IMO) than having the name flush against the screen edge.
2009-09-14 16:51:26 +02:00
Iain Patterson
1a27b34160 Constrain switching workspace name to one head.
When switching workspaces, force the name to be shown entirely within
one head of a Xinerama display. Previously the name would span heads if
set to TOP, CENTER or BOTTOM alignment, and was hence hard to read when
the display comprised an even number of heads.
2009-09-14 16:51:26 +02:00
Carlos R. Mafra
9789cf3154 Add Maximus key back in WPrefs.app
Somehow I had forgotten to include this change in version 2
of the patch.
2009-09-14 16:51:26 +02:00
Carlos R. Mafra
513a509096 Fix the use of uinptr_t
Remove the additional cast to (int), as that makes no sense.
2009-09-14 16:51:26 +02:00
Alexey Voinov
f6645ac564 x86_64 mmx fixes
This patch combines two small patches which fix issues with x86_64 and mmx in
the configure script.

Submitted by: Gilbert Ashley
Author: unknown?
Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>
2009-09-14 02:09:35 +02:00
Nicolas Bonifas
cf0f7d68d5 Un-maximize window inside current head
If the old_geometry coordinates were saved while the window
was in another xinerama head, use current coordinates as
the old ones to avoid making the window jump heads when
un-maximizing it.
2009-09-13 23:33:39 +02:00
Nicolas Bonifas
3106292f4b Maximus: Use unsigned int for width/height variables
And move its prototype to actions.h (and also that of
save_old_geometry()).
2009-09-13 23:32:15 +02:00
Nicolas Bonifas
e42586c712 Remove commented code in xinerama.c 2009-09-13 23:32:09 +02:00
Tamas TEVESZ
0a47a19b3e Remove bundled wrlib stuff
This patch removes bits and pieces of xmu that for some reason
have been bundled with wmaker. I can very well imagine that at the time
they were bundled, xmu was not, was not available everywhere, or
whatever.

I couldn't come across a system that doesn't have these things in its
system-supplied x libs, though i've been carrying this since january,
and my memory is quite flakey at times.

certainly nothing xorg is at danger, nor xfree86 dating back to at
least 3.3. i believe this stuff should be everywhere that calls itself
to be on par with x11r6.3 at the very least.

it would be incredibly useful if people having access to commercial
unixes could check this on things released in the past, say, 15 years.
i believe back then i had solaris 8+and sco openserver 5+ covered.
2009-09-13 21:40:47 +02:00
Nicolas Bonifas
e4fcd515fe Maximizing a resized window
When a maximized window is resized (either using wmaker or because the
application changed the window size), and you want to maximize it again,
you first have to unmaximize it (because wmaker thinks the window is still
maximized), and only then you can maximize it. The following patch
corrects this behaviour.
2009-09-13 19:17:59 +02:00
Carlos R. Mafra
4bce3e3805 Make left/right maximization work again
The patch "Clean up maximization and un-maximization logic" introduced
a regression wrt to the left/half maximization feature, due to a C
operator order precedence issue.
2009-09-13 18:32:43 +02:00
Carlos R. Mafra
cbd13dd95f Ansify function declaration 2009-09-13 16:07:54 +02:00
Carlos R. Mafra
18c7a20136 Delete stale .cvsignore files 2009-09-13 12:59:25 +02:00
BERTRAND Joel
816fee1b68 Fix miniwindows auto-arranging bug
With this patch, minimized windows do not reshuffle anymore.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361241
where Martin Hinsch reported:

"The behaviour of icons (minimized applications) is severely broken when
 automatic placement is switched on.
  * When switching the workspace icons often stick thereby covering (and
    hiding) icons on the workspace one is switching to.
  * After minimizing an application, clicking (singly or doubly) on one of
    the icons causes all of them to reshuffle, usually in a way that the
    icon in question changes its place (which is extremely annoying).
  * Icon placement ignores the dock so that icons disappear behind
    it/cover it.

 All of these suddenly appeared about a year ago (I think with 91.0). The
 problems are not architecture-specific since they occur in exactly the
 same way on my pentium machine. Wiping the complete configuration (rm -r
 ~/GNUstep) did not make a change either."
2009-09-11 10:24:54 +02:00
Andreas Tscharner
5b93254d0f Fix compilation failure
This fixes a compilation failure with gcc-4.3.4, where it complains

nxpm.c: In function RGetImageFromXPMData:
nxpm.c:99: error: expected expression before ] token
...
2009-09-09 22:18:34 +02:00
Alexey Voinov
62bf6d17b5 Fix session saving for apps with shared appicons
This patch comes from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-06 17:12:24 +02:00
Carlos R. Mafra
8efc490361 Reduce the number of simultaneous inotify events
There is no point in having a buffer capable of 512 simultaneous events,
as it will typically be only 1. But increase the value for the length
of the path + filename to 64 (which is a reasonable size for a
typical /home/something/GNUstep/Defaults/WMRootmenu filename).
2009-09-04 15:02:00 +02:00
Alexey Voinov
5f5b1df7d2 Christmas does not last forever
From https://bugzilla.altlinux.org/show_bug.cgi?id=3480

  "If you open "Info Panel" on 25 dec (Christmas), the
   "Christmas tree" is shown. And after that on all days
    Christmas tree is shown. (Until you restart WM, i think)"

Taken from http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-03 23:56:33 +02:00
Carlos R. Mafra
88ab8b74b4 wmrlib: Avoid code duplication
We can put common repeated code into a helper function, and
increase readability a bit.
2009-09-03 23:56:33 +02:00
Alexey I. Froloff
2ccc8e4a79 Remove alloca(3)
And use malloc() instead.

See "Dropped useless use of alloca(3)" from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-03 21:10:48 +02:00
Alexey I. Froloff
8490e31fde Atomic save for session
This patch is part of "Atomic saves for history and session" from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-03 20:20:12 +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
Sebastien Bauer
f8dd3dc49e Add option to allow starting DockApps with a single click
This patch is from the contrib directory. It adds an option to allow starting
DockApps with a single click. It's a handy option that adds only a few lines to
the code.

It is a good feature patch example because it includes modifications
to the WPrefs application so that the feature can be easily enabled or
disabled. The one-click ability allows wmaker to integrate more seemlessly with
programs like ROX-Filer which can be configured to use single or double click
actions.

The README in the contrib/ directory says,

author:
Sebastien Bauer <seb_bauer@bigfoot.com>
John Morrissey <jwm@horde.net>

updated for Window Maker 0.65.0 by:
Daniel Richard G. <skunk@graphics.lcs.mit.edu>

updated for Window Maker 0.80.2 by:
Martial Daumas <martial@nasgaia.org>

update for 0.80.2+ by:
steve lion <steve.lion@verizon.net> and vlaad
2009-09-03 15:19:10 +02:00
Carlos R. Mafra
c04a2caeab Clean up maximization and un-maximization logic
We should not try to un-maximize the windows from inside
the function wMaximizeWindow(), as that makes no sense.

If the window is already maximized then we don't call
wMaximizeWindow() anymore and call wUnmaximizeWindow()
instead, which will use the old geometry regardless
of which maximization is active (horizontal, vertical,
maximus, etc). And the old geometry now is also saved
when we enter wMaximizeWindow().

So when we call wMaximizeWindow() or wUnmaximizeWindow()
we really mean "maximize to the specified state" or
"go back to whatever old geometry coordinates we had before".
2009-09-02 04:42:19 +02:00
Carlos R. Mafra
cf62d1591f Maximus: Tiled Maximization
This patch introduces the "tiled maximization" feature, a.k.a. Maximus.

By pressing the keyboard shortcut associated with Maximus, the focused
window will be maximized to the greatest area satisfying the constraint
of not overlapping existing windows.
2009-09-02 04:42:05 +02:00
Daniel Déchelotte
7857f297ea Fix for omnipresent AppIcon bug at startup
Bug overview: right after start up, omnipresent AppIcons (living in the Clip)
    are displayed but non-functionnal.

    How to reproduce it: place two AppIcons in the Clip, make the first one (A)
    omnipresent and leave the second one (B) as is. Make the Clip "autocollapse".
    Switch to the second workspace and restart wmaker. Wmaker starts in the first
    workspace; the Clip is closed (its text color corresponds to the closed state,
    AppIcon B is not shown). However, AppIcon A is displayed.  Moreover, A does
    not react when the Clip expands or collapses.  Finally, a click on A makes it
    disappear. Fortunately, changing to another workspace fixes the problem
    definitively.

    Explanation and correction: internally, wmaker maintains as many clips as
    workspaces. When the user switches to another workspace, the omnipresent
    AppIcons are moved to the new "current" clip. In the situation above (trying
    to reproduce the bug), when wmaker restarts, the omnipresent AppIcons are
    restored in the second workspace, whereas the first workspace is active. In
    the previous code, a "hack" (calling XMapWindow()) unconditionally displayed
    the omnipresent AppIcons. The proposed patch makes sure the omnipresent
    AppIcons are moved to the first workspace on wmaker startup.
2009-09-02 00:17:27 +02:00
Tamas TEVESZ
b37e065252 Clean up #ifdef mess
Use enum instead of #ifdef maze for enumerating keybindings
2009-09-01 14:31:08 +02:00
Daniel Déchelotte
d7183d33b4 Gobble "spurious" EnterNotify events when moving an appIcon or a dock
This is a bug fix. Bug overview: if an AppIcon is moved rapidly over a Clip
    set to auto-expand, the latter may erroneously auto-expand afterwards.

    How to reproduce it: set a Clip to auto-collapse, and make sure it contains a
    (random) AppIcon, so as to easily visualise its open/close state. Now move
    rapidly an AppIcon over the Clip. Try to move it so fast that the cursor
    sometimes is out of the AppIcon's tile. Then, replace the AppIcon out of the
    Clip.

    Explanation and correction: if, while the AppIcon was being moved, the mouse
    cursor entered at least once in the Clip's tile, the latter is going to
    receive an EnterNotify event (after the AppIcon is replaced) and thus expand
    automatically after the relevant delay. The solution is to simply "gobble"
    (i.e., ignore) all EnterNotify events when moving an AppIcon.
2009-09-01 14:12:55 +02:00
klaasvakie
2ed9c12ee5 Fix half_scr_width calculation
Moved the half_scr_width calculation to after the

usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True);

call. This fixes the problem where windows that get "half screen
maximized" cover the dock or clip.
2009-09-01 13:57:58 +02:00
Carlos R. Mafra
229b6984de Use half_scr_width instead of computing it each time
Let's use

    half_scr_width = (usableArea.x2 - usableArea.x1)/2;

to shorten the expressions in the left/right half maximize
code.
2009-08-30 16:28:23 +02:00
Carlos R. Mafra
a1f35d7f5b Increase the readability of wUnshadeWindow() and wShadeWindow() a little bit
Instead of open coding the animation routines in the function bodies,
put them in a helper function called shade_animate(wwin, what), whose
second argument can be SHADE or UNSHADE.
2009-08-30 00:58:18 +02:00
Carlos R. Mafra
34be9d7816 Trivial coding style changes
Some trivial style changes I made while reading src/placement.c
2009-08-30 00:51:27 +02:00
Tamas TEVESZ
9af6316d1d k&r->ansi some stuff
ansify and "fix" function pointer declarations
2009-08-29 21:49:22 +02:00
Johann Haarhoff
6924454836 Left Half / Right Half Maximize
This adds Left Half / Right Half Maximize capability to WindowMaker.
It allows you to maximize a window to only the left or right half
of your screen.

It is useful on widescreen displays where one might to bring up
two different windows side-by-side.
2009-08-29 21:49:16 +02:00
Carlos R. Mafra
328251c68a Define TITLEBAR_HEIGHT in default configuration file
...and use it in src/placement.c

And while we are at it, clean up a bit the visual of wconfig.h.in
2009-08-28 21:21:03 +02:00
Carlos R. Mafra
2f87d01a41 Make wmaker 0.11% smaller by avoiding code duplication
This patch cleans up an obvious code duplication case in the
different "placement" algorithms.

Avoid this needless repetition by using a helper function,
which in turn lets those functions a bit easier to read and
also makes wmaker 0.11% smaller :-)

[mafra@Pilar:wmaker.git]$ size src/.libs/wmaker.*
   text    data     bss     dec     hex filename
 619824   19160    8544  647528   9e168 src/.libs/wmaker.new
 620552   19160    8544  648256   9e440 src/.libs/wmaker.old
2009-08-28 20:18:18 +02:00
Martin Dietze
22730876e4 Nightly Build script can now deal with testing and unstable branches. 2009-08-28 19:04:29 +02:00
Gilbert Ashley
be08535ab4 Show app name in Kill Application dialog
The "Kill Application" dialog window doesn't always show the
application name when killing DockApps. It shows its wm_class
instead, which is not always the same as the app name.

This patch allows the Kill Application dialog window to show
the application name in the window -- as expressed by using the
basename of the path to the application.

[crmafra: Added wtokensplit() to get only the app name]
2009-08-27 16:35:42 +02:00
Vladimir Nadvornik
108127f0b5 Miscellaneous fixes from OpenSuse
These are some of the fixes sent to the wmaker-dev list by
Vladimir Nadvornik, with minor modifications to address Dan
Pascu's concerns.

Original-post: http://lists.windowmaker.info/dev/msg00293.html
2009-08-27 16:34:44 +02:00
Carlos R. Mafra
6d75291e1d Add config option to supress focus requests across workspaces
In commit d6c134f420 ("Do not switch
workspace to follow new windows in others") the default behavior
was changed, and workspace switching to follow focus requests was
strictly forbidden.

Although that seems to be a sane thing to do by default, that raises
concerns about whether Window Maker could be more flexible in that
respect -- allowing the user to choose which applications are or
are not allowed to do that.

This patch adds such configuration, located in the "Advanced Options"
submenu of the top-level "Attributes" menu.
2009-08-26 17:53:08 +02:00
Martin Dietze
ca60620f50 Adapted nightly build script to coexist with new 'next' branch. 2009-08-26 15:51:13 +02:00
Martin Dietze
a9aeefbe70 Fix NULL pointer dereference
Some weird applications like Safari for Windows running on CXOffice
or some applications running on Wine were causing wmaker to crash.
So let's not rely on a window's `frame' property to be not NULL in
src/wmspec.c.

Original-post: http://lists.windowmaker.info/dev/msg00161.html
See-also: http://lists.windowmaker.info/dev/msg00222.html
2009-08-25 01:10:00 +02:00
Martin Dietze
d6c134f420 Do not switch workspace to follow new windows in others
New windows should only be focused if they are in the current workspace.
Not performing this check can lead to WM switching workspaces if a
window is opened which:

   (a) is configured to appear in a particular workspace

and

   (b) sends a _NET_ACTIVE_WINDOW message to give focus to
       something, e.g. a sub window.

This behaviour was observed with firefox if a session with more
than one tab open was restored at startup because:

 "If a Client wants to activate another window, it MUST send a
   _NET_ACTIVE_WINDOW client message to the root window:"

Original-post: http://lists.windowmaker.info/dev/msg00442.html

[crmafra: Added comment]
2009-08-25 00:47:37 +02:00
Martin Dietze
442e3876c6 Add debianisation code and automatic build script 2009-08-24 11:55:20 +02:00