1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

60 Commits

Author SHA1 Message Date
Gaspar Chilingarov
8b919b0d33 support moving window between heads using keyboard
Window Maker allows to perform practically all operations with windows
using only keyboard. One of the actions so far which required using
mouse was dragging window from one head (monitor) to another.

This patch introduces support for keyboard shortcuts. These shortcuts
move windows in circular fashion (if you have 3 and more monitors).

In case of 2 or 3 monitors arranged horizontally - window will just move
right/left.

In case of 3x3 setup - it is impossible to move window to central
monitor with keyboard.

- preserves window position and size (if display sizes are same)
- otherwise tries to fit window to smaller display
2018-12-16 10:13:50 +00:00
Doug Torrance
563cda28d3 wmaker: Add keyboard shortcuts for keeping window on top or at bottom.
This closes Debian bug #306808 [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=306808
2016-01-20 08:27:07 -05:00
David Maciejak
ea8f18aff1 WPrefs: add workspace pager configuration
This patch is adding a checkbox in the expert zone to disable
completely the workspace pager and add an entry in keyshortcut
preference to set the shortcut used to open the pager with the
action "Open workspace pager".

The default frame background can be configured by setting an optional
variable "WorkspaceMapBack" from WindowMaker conf file as in:

WorkspaceMapBack = (tpixmap, "/tmp/testme.png", gray20);

or

WorkspaceMapBack = (solid, "#2c2482");
2014-12-10 10:19:18 +00:00
Christophe CURIS
d1e1521a88 WPrefs: fix possible buffer overrun (Coverity #50216)
As pointed by Coverity, if the Keysym name is very long and many modifiers
are used, the function 'capture_shortcut' could overflow its internal
buffer.

As the case is very unlikely to appear, do not increase the size of the internal
buffer (it seems to be already well sized, and we have no know maximum size
for a Keysym name), just use the appropriate function to append the name
at the end.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-23 22:43:38 +00:00
Gaspar Chilingarov
7cb948098a wmaker: Support omnipresent setting toggle from keyboard 2014-11-23 22:42:18 +00:00
Christophe CURIS
7e40a61d16 WPrefs: minor reorganisation in the Keyboard Shortcut panel
The goal was to reduce the risk of truncated lines in the list of actions
(a few of them are a bit long - and need to be!), so it was an opportunity
to align the widgets with consistent spacing.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-08 20:12:04 +00:00
David Maciejak
162cca286d WPrefs: fix key capture
This patch is used to fix the Debian bug #140181

It updates the NumLockMask function to report the mask and
call XFreeModifiermap when needed.
It also modifies capture_shortcut function to be able to use Super keys
and report numeric keypad when pressed (aka now detects correctly
if the numlock is enabled or not).
2014-08-20 23:34:49 +01:00
Doug Torrance
b764a766bf Add keyboard shortcut to run application.
A common feature in several desktop environments is the ability to bring up
a "run application" dialog via a keyboard shortcut (frequently Mod1+F2).  This
feature has been available to Window Maker users only through the root menu.

This patch adds the ability for a user to set up a keyboard shortcut to
accomplish this, either via WPrefs or by editing ~/GNUstep/Defaults/WindowMaker,
e.g., with
 RunKey = "Mod1+F2";

Code from the execCommand function in rootmenu.c has been copied almost directly
into the handleKeyPress function in misc.c to accomplish this.
2014-05-10 10:01:51 +01:00
Christophe CURIS
01c7390be1 WPrefs: Use the macro 'wlengthof' to get the number of element in an array
The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
ce1513f89f WPrefs: Removed unused Screen argument to the 'Init*' functions
The functions that create the different configuration panels were taking
the screen structure as argument, but it turns out that none of them
actually need it.

We just remove the argument to make code simpler and easier to maintain.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-11-01 15:27:11 -02:00
Christophe CURIS
bc5985e824 WPrefs: Marked args as unused for compiler in event callback code
The WINGs toolkit dispatch events on widgets using callbacks, which means
having a fixed argument list for the handling function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-11-01 15:27:10 -02:00
Christophe CURIS
66f6817966 WPrefs: Marked args as unused for compiler in Notification callback code
The mechanism of Notifications in the WINGs toolkit is relying on
callbacks to dispatch notifications, which means having a fixed argument
list for the handling function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-11-01 15:27:10 -02:00
Rodolfo García Peñas (kix)
3957f01293 WPrefs: Ignore NumLock key when capturing keyboard shortcuts
This patch includes the function "NumLockMask", that checks if the
Alt Modifier key is "NumLock". Then we can use this function in the
calls to Capture the key sequence and don't use this modifier.
2013-09-29 12:13:53 +01:00
Christophe CURIS
39ecbc1084 WPrefs: Added XKeycodeToKeysym work-around to all other usage places
To ensure proper behaviour with X servers that do not support the
Xkb extension, implemented call to the fall-back legacy function
to the other places where it is being used, to ensure proper
behaviour in any case.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 18:53:05 +01:00
Renan Traba
c2188d0793 WPrefs: added option to configure new viewports 2013-05-21 11:24:36 +01:00
Renan Traba
e66afb6e18 WPrefs: added option to configure new top and bottom viewports 2013-05-21 11:24:36 +01:00
Christophe CURIS
a4395c5764 WPrefs.app: Added const attribute to local string
Now that the WINGs functions are const-correct, it is possible to
set the attribute on the strings to help the compiler.
2013-05-09 16:56:28 +01:00
Christophe CURIS
0004d38ef8 WPrefs: Added const attribute to statically stored strings
Now that the function handling the configuration dictionnary are
const correct, the key stored in static array can be given the const
attribute.
2013-05-08 15:05:00 +01:00
Christophe CURIS
cacc04d4a2 Move the list of keyboard shortcut texts into the array of their config keyword
The config-file-keyword was defined in an array, but the user displayed
string was defined at another place, thus requiring special care when
modifying the list, to keep the same number of entries, in the same
order, ...

This was an open call for subtle bugs, so the keyword and user string
are now at a single place, making updates on the list easier and the
GUI generation code smaller.
2013-05-02 20:48:10 +01:00
Iain Patterson
124442a811 Allow WPrefs to configure workspace switching keys.
Added MoveToWorkspace*Key, MoveToNextWorkspaceKey,
MoveToPrevWorkspaceKey, MoveToLastWorkspaceKey,
MoveToNextWorkspaceLayerKey and MoveToPrevWorkspaceLayerKey to the
keyboard shortcut panel of WPrefs.
2013-03-28 19:04:03 +00:00
Iain Patterson
cfdf1e92fe Allow WPrefs to configure the last used workspace key.
Added LastWorkspaceKey to the keyboard shortcut panel of WPrefs.
2013-03-28 18:58:23 +00:00
Rodolfo García Peñas (kix)
43c3526d21 WPrefs: XKeycodeToKeysym deprecated function
The function XKeycodeToKeysym is deprecated and should be replaced
by XkbKeycodeToKeysym.
2012-07-15 13:34:37 +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
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)
3ae34b958c WPrefs: Remove duplicated function captureShortcut()
The function captureShortcut() is implemented in both files KeyboardShortcuts.c
and Menu.c, with just a minor difference regarding the conversion to upper case.

To unify them, define a new function which includes a new boolean paramenter to
dictate whether the upper case conversion should be done or not.
2012-01-20 21:50:12 +00:00
Carlos R. Mafra
69d2e51876 WPrefs: Remove trimstr() and use wtrimspace() from WINGs
There's no need to have a private function while there's one in WINGs.

Besides that, it does not remove trailing whitespaces appropriately as I
just tested by adding trailing space in the shortcut captured by WPrefs.
It is not trimmed before saving it:

[mafra@Pilar:Defaults]$ grep CloseKey WindowMaker
  CloseKey = "Mod1+C    ";

Using wtrimspace() fixes that and even saves 208 bytes of code:

[mafra@Pilar:WPrefs.app]$ size KeyboardShortcuts.o.*
   text    data     bss     dec     hex filename
   7703       0       0    7703    1e17 KeyboardShortcuts.o.new
   7911       0       0    7911    1ee7 KeyboardShortcuts.o.old

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2012-01-20 21:43:13 +00: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
afebdb50fa WPrefs: Add MinimizeAllKey shortcut configuration 2010-09-11 17:32:57 +02:00
Carlos R. Mafra
72dfe4aa89 Remove VIRTUAL_DESKTOP code
Even the option to enable "virtual desktop" in configure.ac was
commented out...and I would never intend to use it anyway.

So let's just remove the ~800 lines of #ifdef'ed code to have a
cleaner code base to read when bored.
2010-01-09 13:48:06 +01:00
Carlos R. Mafra
643e49f190 Remove [raise,lower]clip shortcut keys
The raising and lowering of the clip is already taken care of
by the "ClipRaiseLowerKey" shortcut.

wmaker gets a bit smaller for free:
   text    data     bss     dec     hex filename
 449483   17384    8208  475075   73fc3 src/.libs/wmaker.old
 449307   17256    8192  474755   73e83 src/.libs/wmaker.new
2010-01-09 13:47:57 +01:00
Brad Jorsch
b6689a0108 Keyboard shortcut to raise the dock
This patch adds the DockRaiseLowerKey shortcut, which raises/lowers
the dock depending on whether the dock is lowered/raised.

[crmafra: Reformatted Brad's patch against git repo and removed the
 DockRaiseKey and DockLowerKey shortcuts ]
2010-01-07 12:16:17 +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
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
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
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
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
4153e2fde4 - Fixed crashing bug in menu.c
- Updated year from 2002 to 2003
2003-01-16 23:30:45 +00:00
dan
1e92274495 - Updated WINGs/NEWS with info about hw the API changed how how things
are affected. Fixes for old code too.
- Double buffering in WMList. All widgets or apps using WMList and
  having user drawing porcedures in place will inherit this double
  buffering automatically too.
- New functions in WINGs: WMGetColorAlpha(), WMIsAAFont()
- Misc code cleanups in WINGs and src/dialog.c
2002-10-16 04:05:45 +00:00
dan
2b2fecac12 - Added double buffering when drawing a WMFrame title with an AA font to avoid
flickering.
- Added double buffering when drawing WMList items to avoid flickering
- Shared xft drawable
- Renamed AASystemFont and AABoldSystemFont to AntialiasedSystemFont
  respectively AntialiasedBoldSystemFont in WMGLOBAL
- WMCreateFont falls back to normal fonts if antialiased fonts cannot be
  created (even if enabled)
2002-10-13 18:25:36 +00:00
dan
a2b404b5b3 - API change in WINGs for WMDraw*String().
WMDrawString() and WMDrawImageString() now take WMColor instead of GC as
  arguments. WMDrawImageString() receives 2 colors (text & background).
  This is to allow easy extension for Xft/Xrender and hide X low level details
- Added alpha channel to WMColor. 2 new functions also:
  WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- Removed obsoleted acconfig.h and implemented its functionality using
  AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
  This will definitely enforce the need to use autoconf 2.5x
2002-10-08 08:26:06 +00:00
kojima
5db8b5660f cleaning the house today 2002-02-15 21:34:46 +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
96f8ab167f Added "Hide Others" to the window menu 2002-01-04 05:44:20 +00:00
kojima
882b9a8e1c - s/sprintf/snprintf
- updated some po's
- fixed crash bug when removing WINDOWS_MENU or WORKSPACE_MENU from rootmenu
- some other stuff i forgot
2001-07-23 20:31:32 +00:00
dan
86154ba01d A few miscelaneous fixes 2001-04-25 02:03:08 +00:00
kojima
10972f2666 adapted for SetViewExpands... 2001-02-20 23:39:06 +00:00
kojima
f91f2eb173 changed top widget of panels from frame to box 2001-02-08 21:54:12 +00:00
dan
899226207d - Fixed a flickering problem with the scrollview.
- Use of uppercase letters when getting keysyms
2000-11-16 18:07:12 +00:00
kojima
b74fad4bd6 fixed msg texts 2000-11-12 04:03:30 +00:00