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

47 Commits

Author SHA1 Message Date
Martin Frydl
914d4e06ef Added option to ignore minimized windows during cycling.
Added CycleIgnoreMinimized configuration option settable on Expert page in WPrefs.
When option is set, switch panel cycling ignores minimized (grayed) windows. They
are still visible and can be selected using left/right arrows or mouse click.
2012-11-28 00:07:13 +01:00
Rodolfo García Peñas (kix)
658597b889 wDefaultGetImage renamed to get_icon_image
The function wDefaultGetImage is renamed to get_icon_image.
2012-11-10 19:47:40 +00:00
Rodolfo García Peñas (kix)
af41673dbf Removed scaleDownIfNeeded function (dup code)
The function scaleDownIfNeeded's code is duplicated with the code of
wIconValidateIconSize(), then this function can be removed. The icon
size in the switchpanel should be ~48 pixels, to allow the frame around
the icon. Then, we always should resize the icon to this size. The standard
icon size is specified in WPreferences.icon_size (usually 64 pixels).
2012-07-16 02:06:36 +02:00
Rodolfo García Peñas (kix)
44c9ee694d switchpanel default icon removed
The default icon (defIcon) is never used because the function wDefaultGetImage
always returns a icon (it searches the default icon). So we can remove the
defIcon variable, its creation and remove code.
2012-07-15 16:28:02 +02:00
Rodolfo García Peñas (kix)
829830c010 New function create_default_icon
The function create_default_icon sets the panel's default icon. This
is interesting to have a "cache" icon and don't search the default
icon more than one time if the icons don't have icon associated.

The code of create_default_icon was included in the addIconForWindow()
function, this patch only moves it to get a better (clear) code.
2012-07-15 16:23:54 +02:00
Rodolfo García Peñas (kix)
6d08aa22d8 switchpanel.c code clean
Some code clean in the file switchpanel.c, like spaces, curly brackets,
tabs, join ifs,...
2012-07-15 16:22:19 +02:00
Rodolfo García Peñas (kix)
d6db53af0b Remove unused argument from wDefaultGetIconFile()
The function wDefaultGetIconFile() doesn't use the argument WScreen,
so it can be removed.
2012-07-04 20:44:40 +02: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
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
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
Iain Patterson
07a0639c93 Don't shrink icons in switchpanel.
Icons in the switchpanel are constrained to the value of the IconSize
preference but the grid in which they are arranged is fixed at 64 pixels.
If IconSize is less than 64x64 the panel will show smaller icons with a
wide spacing, which looks pretty stupid.

Fix it by forcing the switchpanel to attempt to load images at the size
it's going to use.  The icon it actually gets may of course still be
smaller.
2012-02-16 09:13:01 +00:00
Haroldo Santos
c82138eab9 switchpanel: Add skip_switchpanel advanced option
Some applications running in my machine are only background
windows, e.g.: screenlets showing CPU usage.

In current wmaker version all these applications pollute my
switchpanel, so I wrote this patch (thanks Carlos for the helping me).

It includes an additional advanced option for windows "Do not
include in switchpanel" which, if set, allows applications to
not appear in the switchpanel.

Signed-off-by: Haroldo Santos <haroldo.santos@gmail.com>
2011-02-17 19:29:15 +01:00
Andrea Gelmini
7c14c0b14a Remove duplicated #includes 2010-11-29 11:59:22 +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
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
Carlos R. Mafra
fb91e5d67a Do not skip windows in the switchpanel
If a window has the skip_window_list flag set wmaker currently not only skips
this window from the window list (F11) but also from the switchpanel (TAB).

This patch makes skip_window_list-windows appear in the switchpanel and be
skipped only in the window list, strictly honoring what the name of the flag
is supposed to mean.

The motivation for this is that I have lots of workspaces and almost all of
them has a xterm, so that I set the skip_window_list for the xterms not to
overcrowd the window list. But I still want to alt+TAB to xterms on the current
workspace.

In addition to that, now the "internal window" flag is not checked before
appearing in the switchpanel.
2010-04-08 18:38:37 +02:00
Tamas TEVESZ
b59575e709 Add new cycling option
When using Xinerama, make it possible only to cycle between those
windows that are on the currently active head - AFAICT this means
windows that have the majority of their area on the same head as
the pointer.

Patch complete with WPrefs integration, alas this being quite
unusable - for a lack of a better idea, I tucked the option on the
expert panel, making the item list too tall - making it scrollable
would be a nice addition.

The default for the new option (CycleActiveHeadOnly) should be NO,
that is, no change in default behaviour.
2010-04-08 15:53:50 +02: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
Carlos R. Mafra
2ba803ad98 Remove unused arguments from a few functions
gcc 4.4.1 was warning (among others):

switchpanel.c: In Funktion »getTile«:
switchpanel.c:321: Warnung: unbenutzter Parameter »panel«
switchpanel.c: In Funktion »makeWindowListArray«:
switchpanel.c:377: Warnung: unbenutzter Parameter »scr«
switchpanel.c:377: Warnung: unbenutzter Parameter »workspace«
2009-12-09 21:04:29 +01: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
Daniel Déchelotte
3f7110b120 Fix focus issues with the switch panel and auto-focus
1. Setup two windows in a workspace, one at the center and the
   other at a corner. Move the mouse to the center of the screen, so
   that the focus goes to the center window. Now, with the help of the
   keyboard (with Alt-tab, typically), try and switch the focus to the
   other window. In doing so, the switch panel shows up, gives the
   focus to the other window and then disappears. However, its
   disappearance make it seem to wmaker that the mouse has just
   entered the center window, so wmaker gives the focus to that
   window again.

   2. It is a lit bit more involved. "Raise window when switching
   focus with keyboard" needs to be set. In a given workspace, maximize
   a first window A, then setup "above" window A two windows B and C
   (one in the upper left corner and the other one in the lower right
   corner, for example). Move the mouse so as to give the focus to
   window B. Press the Alt key, hit the key tab once (window A moves
   up to the "top"), then another time (window C is then selected).
   Eventually relase the Alt key: window B is given the focus again.

Correction: it is a matter of ignoring some (EnterNotify) events
when the switch panel is active or has just been used.
2009-08-20 22:07:10 +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
Iain Patterson
bbc52564d0 xinerama switchpanel corruption fix
This is a small patch to fix an issue with the switchpanel and a large number
of windows which happens only on a Xinerama setup.

When the number of open windows is so large that displaying all of them would
cause the switchpanel to be too wide for the screen, the panel is supposed to
shrink and scroll to accomodate them all.

In Window Maker 0.92.0 this works for single head displays but not for
Xinerama. The panel extends to the next head and gets garbled. This patch fixes
the issue by correctly constraining the panel to the head with the cursor.

Submitted-by: Gilbert Ashley <amigo@ibiblio.org>
2009-08-16 00:06:31 +02:00
dan
bacf8229b0 - release colors to avoid issues with the reference count overflowing a
small integer and causing unexpected color releases that can crash
  Window Maker (Martin Frydl <martin.frydl@systinet.com>)
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
  background color of a view (Martin Frydl <martin.frydl@systinet.com>)
2006-01-22 18:19:09 +00:00
dan
e53ddd046f fixed another spot where compiling on solaris with openwin generated errors 2004-10-30 07:17:49 +00:00
kojima
d63a0b4859 added option to disable switchpanel
fixed some bugs
2004-10-27 02:54:32 +00:00
kojima
2ea68b8d2b changed alt-tab behaviour 2004-10-26 17:55:34 +00:00
kojima
92a84fe050 fixed crash bug with alt-tab + run-dialog (or internal windows in general) 2004-10-26 08:00:19 +00:00
kojima
087a16400f updated Makefiles files for po dirs 2004-10-26 01:11:15 +00:00
kojima
12b8b8ba58 bug fix 2004-10-25 00:42:25 +00:00
kojima
f274afdd1d added themable, pixmap background switch panel 2004-10-25 00:07:51 +00:00
kojima
df1228f387 added some netwm support in WINGs 2004-10-23 21:07:13 +00:00
kojima
11b464a002 fix flicker 2004-10-23 01:56:24 +00:00
kojima
663df7b4cb enhacnced mouse alt-tabbing 2004-10-23 01:02:16 +00:00
kojima
b034bb077f added mouse seelction of window to focus 2004-10-22 22:57:14 +00:00
kojima
f6682a9ade fixed bugs, re-enabled circulate raise 2004-10-20 03:31:14 +00:00
kojima
7908c9a66b more bug fixes.. 2004-10-19 01:53:11 +00:00
kojima
f6fb9fbb3e include minimized windows in switch panel 2004-10-19 01:29:34 +00:00
kojima
66ec682107 fixed a crash 2004-10-18 02:36:32 +00:00
kojima
bc6aeab722 fixed a bug with switch panel
added updated de.po
2004-10-18 00:09:54 +00:00
kojima
19c7a99197 only scale down icons (not up) 2004-10-17 05:22:24 +00:00
kojima
9402724e40 fixed crash in empty workspaces 2004-10-15 01:00:36 +00:00
kojima
cd36d73886 fix 2004-10-15 00:27:36 +00:00
kojima
884a3f1647 fixed cycling 2004-10-14 21:24:21 +00:00
kojima
5f4a3f6777 enhanced icon highlighting in window switcher 2004-10-14 19:12:26 +00:00
kojima
62590be0db fixed bug in window switching 2004-10-14 15:53:17 +00:00
kojima
f54f0856c1 - MacOS X style window switching panel (navigate through windows with Alt-Tab or
arrow keys)
2004-10-14 05:02:24 +00:00