1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-04-30 12:34:07 +02:00

Compare commits

..

194 Commits

Author SHA1 Message Date
David Maciejak 33fba87ed1 wmaker: add directional window focus
This patch is adding directional window focus
(like in openbox), where the focus can be passed to
the current window neighboors with a shortcut key.
Comparisons are performed using window centres.

New options are FocusWindowLeftKey, FocusWindowRightKey,
FocusWindowUpKey, FocusWindowDownKey.
Other WM are setting those to SUPER+LEFT/RIGHT/UP/DOWN keys
but currently those are not set by default.

CirculateRaise option which is described in WPrefs as
'Raise window when switching focus with keyboard' is also
used to raise/not raise windows that are fully covered by
other windows.
2026-04-03 10:35:39 +01:00
David Maciejak a3c02a22bd NEWS: add new feature descriptions 2026-04-03 10:35:39 +01:00
David Maciejak 0d74066aea wmaker: treat _NET_WM_WINDOW_TYPE property as a list
This patch is treating the _NET_WM_WINDOW_TYPE property as an array
of atoms as defined in X11. Currently, we are only getting the first one,
while the client can set multiple window types ordered from most specific
to least specific.
2026-04-02 08:57:25 +01:00
David Maciejak 26a296db23 wmaker: dynamic vim-like window marking feature
This patch is adding vim-like window marking, like in i3.
A window can be dynamically assigned a mark label.
Then a marked window can be pulled or jumped to.
Or the current focused window can be swapped with a marked window.

The mark label appears in the Window List in between the window
title and the workspace name.

Those new options in WindowMaker conf file are used to control
the actions: MarkSetKey, MarkUnsetKey, MarkBringKey, MarkJumpKey
and MarkSwapKey.

Those actions are set to None by default.
2026-04-02 08:57:25 +01:00
David Maciejak ac1fa7fc6d wmaker: fix client repositioning on frame moves
This patch is preventing X server gravity adjustments from offsetting
the client windows esp when the gravity is non standard as seen
in openoffice with xprop: 'window gravity: Static'.
Also fixing _NET_WM_STATE property query request as in X11 it can
contain multiple atoms simultaneously, acting as an array.
2026-03-29 20:05:17 +01:00
David Maciejak 1f03c13f4d wmaker: improve support for RandR
This patch is improving the support for RandR.
It uses version 1.3 released in March 2009.
Most of the support is done in randr.c/randr.h
It is built on top of the mature Xinerama structure
but Xinerama lib is not required.
Like for Xinerama, RandR is now auto enabled if the
library is found at compiled time.

RandR support can be used in 2 modes:
A static mode (which is the default) is to define manually
your setup with external tools like xrandr or arandr,
like for example what Openbox is doing.

A dynamic mode, which is triggered on hotplug events,
like for example what GNOME is doing.
If a new monitor is detected, it will select the best mode
available and add it to the right on the existing monitors.

The mode can be switched with a new option available in WindowMaker
conf file (or via WPrefs expert panel):

HotplugMonitor = NO;
2026-03-28 10:50:23 +00:00
David Maciejak 8e84264036 WPrefs: add hotplug monitor option in expert panel
This patch is adding a new HotplugMonitor option
to automatically (de)activate monitors on randr hotplug events.
It is disabled by default.
2026-03-28 10:50:23 +00:00
David Maciejak 4b4abf4c50 wmaker: update callback function checks
This patch is adding the check for the getString function
that was added in commit be495bedbc.
2026-03-27 23:30:05 +00:00
David Maciejak a631e3060e wmaker: remove apercu struct check artefact
This patch is removing the check for the legacy_minipreview_config struct
which was removed in commit fa8121ee61
Without it we can see the error below when running make check:

Error: structure "legacy_minipreview_config" was not found in ./defaults.c
2026-03-27 23:30:05 +00:00
David Maciejak 6c5c3e6181 wmaker: fix wire frame drawing when snapping
This patch is fixing the wire frame dimension which
was computed wrongly when FrameBorderWidth was set
and the window snapped top half or bottom half.
In such case, drawTransparentFrame was passed the
width and height of the screen while it should have
used an inner frame size (meaning without frame border).
The result bug was that the wire frame width was too large
and the right edge displayed out of the monitor head.
2026-03-27 23:30:05 +00:00
David Maciejak 329f82f6e7 WPrefs: set the PID of the application to the window
This patch is setting the _NET_WM_PID atom for WPrefs
to report its PID.

Before the patch, the PID reported is unset (0)
$ wmctrl -lp|grep 'Window Maker Preferences'
0x00a000b0  0 0      Linux Window Maker Preferences

After the patch, the PID is set (20110 in the example below)
0x00a000b0  0 20110  Linux Window Maker Preference
2026-03-23 20:43:42 +00:00
David Maciejak 60a900be28 wmaker: make sure reloaded saved window position is in visible space
This patch is checking if the session saved window positions fall
in dead space, for example when a monitor no longer exists.
If it's the case the window position is moved to the nearest active
head.
2026-03-22 22:21:00 +00:00
David Maciejak c7c736e283 wmaker: set proper group window class when hint is empty
This patch is a follow up of commit
073235ada4
as it appears there is the same issue with the WMState
configuration file when a session state is saved.

For example, with terminator, the file will contain:
  ...
  Applications = (
    {
      Dock = Dock;
      Maximized = 0x0000;
      Name = terminator.;
      ...

After the patch:
  ...
  Applications = (
    {
      Dock = Dock;
      Maximized = 0x0000;
      Name = terminator.Terminator;
      ...
2026-03-20 10:11:02 +00:00
David Maciejak 752a949492 wmaker: fix window position issues with dockapps
The patch with commit 839061a25a
introduces an issue with dockapps that are creating their main
windows with size 1x1. That new patch is moving the existing
code further below in the wManageWindow function to be able
to check if the window flag is_dockapp is set.
Issue was seen with wmsystemtray and wmmemload.
2026-03-20 10:11:02 +00:00
David Maciejak be495bedbc wmaker: allow the screenshot filename template to be set
This patch is adding a new option ScreenshotFilenameTemplate for users
to change the default strftime format "screenshot_%Y-%m-%d_at_%H:%M:%S".
For example, Teams is not allowing the ':' char in the filename of file
to be shared so I always have to rename the file.
2026-03-20 10:11:02 +00:00
gryf 412b3eace2 Make border opaque.
When composite manager (like picom or xcompmgr) is used together with
Window Maker, some of the windows (i.e. terminator) might have
transparent border. This patch will prevent from such situation.

Closes: https://github.com/window-maker/wmaker/issues/58
2026-03-20 10:11:02 +00:00
David Maciejak 0aeba6064b WPrefs: improve capture_shortcut function
This patch is improving the capture_shortcut function to be able
to capture a sequence of multiple key pressed.
2026-03-14 16:20:49 +00:00
David Maciejak ec115fedf7 wmaker: revamp titlebar language button
This patch is replacing the modelock legacy hardcoded language dropdown
icons with a compact titlebar button based on the current locale.
(it adds also a detection to xkbfile library which is required to get
the short name of the locale).
Now supports up to 4 layouts, clicking on the language button will cycle
through them (XKB officially supports up to four groups).
2026-03-14 16:20:49 +00:00
David Maciejak 29177f94ed wmaker: extend default keybinding for multikeys support and add sticky-chain mode
This patch extends the existing keybindings to support multiple keys and
add an optional "sticky chain" mode that lets a prefix remain active until users press
a cancel key so users can enter the continuation key without re-pressing the prefix.

The idea is to bring Emacs shortcuts keybinding to wmaker.

Normal (existing and enhanced) mode:

Prefix behaves like a one-shot release before the next key if any.
For example: Mod1+h -> hide the active application, that is still working as usual.
But if you want for example to have all your window management keys under the same leader key
you can now do something like that:
"Mod4+w h" which is pressing the Super key with w, releasing them and pressing h.
You can assign that key sequence to an action.

Sticky chain mode:

Pressing a configured prefix enters a short-lived sticky state.
Sticky state expires on timeout or when explicitly canceled (with KeychainCancelKey).
For example, you can define:
"Mod4+a x" -> run xterm
"Mod4+a b f" -> run firefox
"Mod4+a b c" -> run google chrome

In sticky mode, "Mod4+a x x b f", then KeychainCancelKey or KeychainTimeoutDelay, will launch 2 xterm and firefox.

New options for WindowMaker conf file:

KeychainTimeoutDelay: timeout in milliseconds (can be set to 0)
Default: 500
Example: KeychainTimeoutDelay = 500;

KeychainCancelKey: explicit keybinding used to cancel an active sticky chain.
If set to None the feature has no dedicated cancel key and the chain only ends by timeout
or naturally if the keybind pressed is not defined.
Default: None
Example: KeychainCancelKey = Escape;
2026-03-14 16:20:49 +00:00
gryf ae050ceb40 Respect user defined icons.
Currently, when switchpanel is invoked (usually by alt-tab), icons are
taken with the order from higher priority to lower:

* appicon
* user defined icon
* net_icon
* default icon

Using appicon, when no net_icon nor user icon is defined is good,
although it will provide another confusion with user defined icons,
which will be ignored for all apps which provide appicons. With this
patch order of selecting icon for an app is:

* user defined icon
* appicon
* net_icon
* default icon

Note, that even, if there is icon defined for certain application,
usually it need to have "Ignore client supplied icon" checkbox ticked,
especially for the apps like Firefox.
2026-03-13 13:40:37 +00:00
David Maciejak b27b44db72 wmaker: filter inotify events only to expected config files
This patch is checking if the notification wmaker is receiving
from the Defaults directory is coming from a proper expected config file.
Until now, using vim for example to open any of the files,
for example WMRootMenu would reload the configs, even before saving
the file.
You would see in the logs:
warning: Inotify: Reading config files in defaults database.

because vim by default is creating a .swp file in that same directory.
2026-03-05 09:03:58 +00:00
gryf c6f029c946 Make mouse wheel window focus configurable.
With commit e45a3bc07d a behavior change
was introduced that may disrupt the workflow of a user who may
intentionally want to give focus to a window without bringing it to the
front. Using the scroll wheel is less intrusive compared to the left,
right, and especially the middle (in the case of a terminal) mouse
buttons.

This commit introduces the ability to change the behavior by enabling or
disabling the ability to focus a window with mouse wheel in the expert
panel.
2026-02-26 10:04:15 +00:00
David Maciejak 66bf19c1e0 wmaker: add new ModifierKeyShortLabels option
This patch is adding a new ModifierKeyShortLabels option to the
WindowMaker file to let the user specify the modifier key labels
used in the shortcuts like those appearing in the root menu.
For example, to overwrite the default labels, a user can set
the new option value to:

ModifierKeyShortLabels = (
  "\342\207\247",
  "\342\214\203",
  "\342\214\245",
  "\342\207\255",
  "\342\207\263",
  "\342\214\230",
  "\342\207\252",
  "\342\227\206",
  "\342\214\245"
);

Which is using the same symbols as defined in macos.
For example, instead of printing M4+, "\342\214\230"
will print the ⌘ (Command) symbol.
2026-02-25 07:54:55 +00:00
David Maciejak 073235ada4 wmaker: set proper group window class when hint is empty
This patch is setting a proper class hint internally
when the app is not setting any.
That issue can be reproduced with terminator 2.1.3,
where the window itself is setting a proper WM_CLASS

$ xprop|grep WM_CLASS
WM_CLASS(STRING) = "terminator", "Terminator

But the window id # of group leader: 0x1000001
is setting only the instance name not the class name.
$ xprop -id 0x1000001|grep CLASS
WM_CLASS(STRING) = "terminator", ""

The issue is that wmaker is using those 2 string values
for the dock apps and to identify linked launched apps.
Those strings are concatenated and used in WMWindowAttributes.
Without the patch, that entry below is created:

  terminator. = {
    Icon = terminator..xpm;
  };

If wmaker is warm restarted, a new entry appears in WMWindowAttributes:

  terminator. = {
    Icon = terminator..xpm;
  };

  terminator = {
    Icon = terminator..xpm;
  };

and the opened window is not linked anymore to the dock app as the
WM_CLASS is different.
So you can launch the app as many times as you want from the dock,
the dock icon will
always have the 3 dots on the bottom left corner showing no window
apps are linked to it.

In case if the group window is not defining a CLASS but the client window
has one, the patch is setting the group window CLASS to the value of the
client window CLASS, or as a fallback, as seen in PropGetWMClass function,
setting it to "default".

With the patch, in WMWindowAttributes, we have now:
  terminator.Terminator = {
    Icon = terminator.Terminator.xpm;
  };

and a warm restart is not creating another entry.
2026-02-22 09:23:40 +00:00
David Maciejak 1b8eb63376 wmaker: add check in getSize function to prevent X error
This patch is checking if the passed Drawable exists before calling
XGetGeometry on it, as seen when using Steam and trying to change
the attributes of the 'Friends & Chat' popup window, wmaker is
generating such error in the logs:
warning: internal X error: BadDrawable (invalid Pixmap or Window parameter)
	Request code: 14 X_GetGeometry
	Request minor code: 0
	Resource ID: 0x0
	Error serial: 32091
2026-02-22 09:23:40 +00:00
David Maciejak 75a8299d18 wmaker: set the color pixel for TrueColor display
As mentioned in commit 67e2f5e1ca,
for TrueColor display it's not necessary to allocate a color but
it is required to set the pixel property of the XColor.
2026-02-20 08:47:50 +00:00
David Maciejak cc0a652ea8 WPrefs: add mouse wheel action to the expert panel
This patch is adding the mouse wheel action to be performed
on the expert text frame panel.
2026-02-16 17:55:21 +00:00
David Maciejak 80079cd343 WINGs: improve wlist widget
This patch is adding keyboard control to the wlist widget
(up/down/pgup/pgdw/home/end) and typeahead list search.
That component is for example used in the wmaker icon chooser,
and WPrefs keyboard shortcut, font conf panels.
2026-02-16 17:55:21 +00:00
David Maciejak 955c6793a6 WINGs: fix memory leaks and potential buffer over-read in wfont
This patch is fixing memory leaks when pango structures are used
but not freed.
Also according to commit 4f050ebab9,
previous_text string in WMWidthOfString can be not NULL terminated,
the same construct is used in WMDrawString and WMDrawImageString
functions, so to be safe better to also check for the length
of the string.
2026-02-16 01:41:16 +00:00
David Maciejak 189679b49c wmaker: don't exit wmaker if app child process errored
This patch is fixing a possible memory corruption and abnormal exit
of wmaker when a created child process errored.
This had been kind of mentioned at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040643
and I also experienced it with especially Steam.
At first, I also thought it was a crash or a memory corruption,
but gdb or valgrind are not reporting anything.
In fact, Steam is not setting properly some hints and that is bringing
some issues. More patches will be needed to support that app properly.
For example, WM_COMMAND is not set properly and when you are trying to
relaunch the app from the appIcon the child process is generating an error
and the actual code is calling Exit(-1) which is entirely exiting wmaker,
that's why from gdb you can see the message
[Inferior 4 (process 567278) exited normally] and no crash.
2026-02-15 20:38:59 +00:00
David Maciejak e45a3bc07d wmaker: ignore mouse wheel when giving window focus
This patch is fixing a window focus issue by ignoring mouse wheel
up/down buttons. How to reproduce the issue:
open 2 xterm with one window overlapping the other, in 1 xterm list
files with ls to have the scrollbar to appear, click the other xterm
to give focus to its window, now mouse wheel up or down on the other
xterm, at that point the window is focused but under the other xterm.
Try to click left button to get it to appear on top, it will not work
cause the focus is set already on it. With that patch the click to
focus is working.
2026-02-14 16:10:30 +00:00
David Maciejak bc16a03722 WINGs: fix compiler warnings on fontl example
The patch is fixing some compiler warnings about missing
noreturn keyword.
2026-02-14 16:10:30 +00:00
David Maciejak 260415eb42 wmaker: treat empty icon name hint as unset
This patch is treating empty _NET_WM_ICON_NAME as unset,
thus the code is falling back to set the appicon title
to the window title. Case seen with virtualbox where
the _NET_WM_ICON_NAME(UTF8_STRING) is set to empty string.
2026-02-13 09:06:07 +00:00
David Maciejak c8174a4b2e wmaker: add room for the modelock option in winspector
This patch is conditionaly adding some extra room in the window
inspector advanced options frame if modelock is enabled to fit
the extra option. Without it the option text is truncated.
2026-02-11 22:02:05 +00:00
David Maciejak 2901b418ad wmaker: add window app icon to the window list
This patch is adding the app icon in between the flags icon and
the window name from the window list.
Feature request from https://github.com/window-maker/wmaker/issues/19
It is disabled by default, it needs WindowListAppIcons to be
set to YES manually in the conf file or "Show app icons in window list."
enabled from WPrefs expert panel.
2026-02-10 09:35:23 +00:00
David Maciejak ae6b03e50f wmiv: fix default window size
Set default windows size to 10x10 as 1x1 is unmanaged since
commit 839061a25a.
2026-02-09 09:23:07 +00:00
David Maciejak 128ba2ddc7 wmaker: use appicon icons in the switchpanel when existing
This patch is making sure the icons shown in the switchpanel
are also those used for the appicon. For example, for xterm
the icon used in the switchpanel is the default app and not the
icon provided by xterm app.
Seems that issue is also present in vanilla wmaker 0.96.
2026-02-09 09:23:07 +00:00
David Maciejak 7ca96b9ed6 wmaker: fix titlebar glitch issues with modelock
This patch is fixing 2 issues with the modelock language pixmap
located in the titlebar.

If wmaker is compiled with modelock support but modelock is disabled
from the expert preferences, dialog windows like run command or exit
will not show the language pixmap but will show empty frame borders.

When modelock is enabled from the expert preferences, it needs a
warm restart for the titlebars to be updated with the language pixmap.
If afterwards, modelock is disabled from the expert preferences,
any old windows that is gettting focus will be repainted and the language
pixmap will be destroyed but the empty frame borders will still be
present. Now to fully disable modelock for existing opened windows,
wmaker needs a warm restart.
2026-02-09 09:23:07 +00:00
David Maciejak 839061a25a wmaker: fix window position issues
This patch is fixing some initial window position issues
as seen for example with virtualbox.
Now wmaker is not trying to manage the 1x1 app internal windows
which was resulting on some position issues (stacking the window
app on the left side).
It also fixes some window jitters issues when the app is trying
to negotiate some tiny position adjustments.
Related to bug at https://github.com/window-maker/wmaker/issues/26
2026-02-07 20:39:24 +00:00
David Maciejak 1e63c590b6 wmaker: factorize duplicated code
This patch is factorizing is_same and getBool functions in misc.
is_same is renamed to WMStrEqual
getBool is renamed to WMPLGetBool
to prevent name collision issues.
2026-02-07 20:37:46 +00:00
David Maciejak 92e1e9fb0b WPrefs: fix some truncated texts
This patch is fixing some text truncation in the ergonomic and
hot corner preference tabs.
2026-02-07 13:33:40 +00:00
David Maciejak ddf0b20367 wmaker: refactor get_corner()
This patch refactors get_corner() for better readability
and performance.
2026-02-07 13:33:40 +00:00
David Maciejak d303317a31 wmaker: handle keybinding change notifications
This patch is to fix an issue seen on FreeBSD 15 where
keybinding are mixed up at the cold start of wmaker.
It is mentioned at https://github.com/window-maker/wmaker/issues/43
Seems that issue is not happening on Linux.
A warm restart ("restart window maker") from the root menu
is getting rid of that issue temporarily.

To solve that issue, now wmaker is reloading the keyboard mapping
via the new wReadKeybindings function when a XkbNewKeyboardNotifyMask
event is received.
It means xkb, which is part of X11 core,
is now used by default and not conditionally with modelock.
I tried to delay reading the keybinding as late as possible but
it did not solve the issue as seems X is started with a improper
keyboard by default.

Here some debug trace when the bindings are loaded by wmaker on FreeBSD:

Keybind F12: keycode=96 modifier=0x0   <--- cold starting wmaker
Keybind F11: keycode=95 modifier=0x0
Keybind Escape: keycode=9 modifier=0x4
Keybind M: keycode=58 modifier=0x8
Keybind H: keycode=43 modifier=0x8
Keybind Up: keycode=98 modifier=0x8   <--- keycode is wrong, provided by X11
Keybind Down: keycode=104 modifier=0x8
Keybind Tab: keycode=23 modifier=0x8
Keybind Tab: keycode=23 modifier=0x9
Keybind Right: keycode=102 modifier=0xc
Keybind Left: keycode=100 modifier=0xc
Keybind 1: keycode=10 modifier=0x8
Keybind 2: keycode=11 modifier=0x8
Keybind 3: keycode=12 modifier=0x8
Keybind 4: keycode=13 modifier=0x8
Keybind 5: keycode=14 modifier=0x8
Keybind 6: keycode=15 modifier=0x8
Keybind 7: keycode=16 modifier=0x8
Keybind 8: keycode=17 modifier=0x8
Keybind 9: keycode=18 modifier=0x8
Keybind 0: keycode=19 modifier=0x8
Keybind Print: keycode=111 modifier=0x0   <--- keycode is wrong, 111 is UP key

/usr/ports/x11-wm/windowmaker/work/WindowMaker-0.96.0/src/.libs/wmaker(execInitScript(main.c:531)):
error: /root/GNUstep/Library/WindowMaker/autostart:could not execute initialization script   <--- warm restart from wmaker
Keybind F12: keycode=96 modifier=0x0
Keybind F11: keycode=95 modifier=0x0
Keybind Escape: keycode=9 modifier=0x4
Keybind M: keycode=58 modifier=0x8
Keybind H: keycode=43 modifier=0x8
Keybind Up: keycode=111 modifier=0x8   <--- UP key keycode is correct
Keybind Down: keycode=116 modifier=0x8
Keybind Tab: keycode=23 modifier=0x8
Keybind Tab: keycode=23 modifier=0x9
Keybind Right: keycode=114 modifier=0xc
Keybind Left: keycode=113 modifier=0xc
Keybind 1: keycode=10 modifier=0x8
Keybind 2: keycode=11 modifier=0x8
Keybind 3: keycode=12 modifier=0x8
Keybind 4: keycode=13 modifier=0x8
Keybind 5: keycode=14 modifier=0x8
Keybind 6: keycode=15 modifier=0x8
Keybind 7: keycode=16 modifier=0x8
Keybind 8: keycode=17 modifier=0x8
Keybind 9: keycode=18 modifier=0x8
Keybind 0: keycode=19 modifier=0x8
Keybind Print: keycode=107 modifier=0x0   <--- Print keycode is correct

Alternatively, to mitigate the issue, .xinitrc can be set to:

setxkbmap -layout us
exec wmaker

or whatever layout you are using.
2026-02-07 13:33:40 +00:00
David Maciejak c620b354b5 wmaker: fix some truncated texts in the info panel
This patch is fixing some text truncation especially
for displaying the total memory allocated in debug mode
and the image formats (when the JXL support is enabled).
2026-02-07 13:33:40 +00:00
David Maciejak ebac2bbcd8 wmaker: fix compiler warning in properties.c
This patch is fixing a compiler warning for the implicit
conversion of int to char changes value from 255 to -1
when at the line *ptr++ = 255 the code is trying to store
the value 255 into a char.
2026-02-07 13:33:40 +00:00
David Maciejak 3281349f8d WINGs: remove unnecessary warning in wtextfield
Since commit 77db6dc649
("WINGs: fix right and center aligned wtextfield"),
right and center alignments are working in wtextfield.
2026-02-07 13:32:27 +00:00
David Maciejak 3f5280987e WINGs: refactor wlist
This patch refactors wlist to bring some improvements
to not count the list of entries at each loop iteration.
2026-02-07 13:31:28 +00:00
David Maciejak 6d0953bc22 wmaker: add support for _NET_WM_MOVERESIZE
This patch adds support for _NET_WM_MOVERESIZE hint as defined in EWMH
which allows a window without decorations to manage itself (moving/resizing).
The purpose is to fix the issue mentioned at https://github.com/window-maker/wmaker/issues/20

Tested with VS Code, Google Chrome, Steam and Discord.

Specs are available at https://specifications.freedesktop.org/wm/1.5/ar01s04.html#id-1.5.4
2026-02-03 18:05:20 +00:00
David Maciejak ef1a504898 wrlib: alpha combine speed improvement
This patch is improving the alpha combine function by using int
instead of float. That function is used for example in the
switch panel to merge the transparency mask.
The change is practically indistinguishable to the human eye
for a single-pass blend but the performance gained is huge.

I've been doing some benchmark of wrlib and even implemented AVX2 support.
But the gain compared to the complexity of AVX2 is not worth,
while having int usage in that specific function is a really good trade-off.

Here the result:

Alpha Blending Performance Test
Image size: 1024x768 (786432 pixels)
Iterations: 100

AVX2 support: YES

=== RGBA Source Test ===
Original (float):     2.540 ms/frame  (393.8 FPS)
Optimized (int):      1.983 ms/frame  (504.2 FPS)  [1.3x speedup]
AVX2 optimized:       1.843 ms/frame  (542.6 FPS)  [1.4x speedup]

By using int, the alpha blending in that use case is 28% faster.
2026-01-27 10:56:30 +00:00
David Maciejak 474b23344a wrlib: change default scaling interpolation to Catmull-Rom
This patch is implementing a new default Catmull-Rom filter
to resize images.
Catmull-Rom is a special case of cubic interpolation with B=0 and
C=0.5 (in the Mitchell-Netravali formulation).
It provides slighlty sharper results than Mitchell with the same
performance.
Catmull-Rom is a better choice for a window manager as it prioritizes
sharpness, making small elements feel crisp.
2026-01-27 10:53:34 +00:00
David Maciejak 77db6dc649 WINGs: fix right and center aligned wtextfield
This patch is fixing some issues in how right and center aligned
wtextfields are handled.
-text selection with mouse was not working properly especially
setting and identifying the cursor position
-middle button paste was only working for left aligned text
2026-01-27 10:52:04 +00:00
David Maciejak b09ac30233 WINGs: add case to wtextfield test
This patch adds a wtextfield center aligned to the unit test.
2026-01-27 10:50:58 +00:00
David Maciejak 6e14b6142b wmaker: fix _NET_WM_NAME window manager's name
xterm is not working properly (it's not advertising its internal icon)
if the window manager's name contains a space, seems to be specific
to xterm as xeyes and xpaint are working fine.
2026-01-27 10:47:58 +00:00
David Maciejak 7778df2fc5 wmaker: add keyboard control to crash window
This patch is allowing to control the wpopupbutton entries
via keyboard up/down arrows.
It happens to me a few weeks ago during development,
wmaker crashed and I lost the mouse control.
I was stuck on that dialog box without a way to select another entry.
2026-01-25 01:28:53 +00:00
David Maciejak 156841f80e WINGs: wpopupbutton add two functions to change the displayed item
This patch is adding WMSelectPopUpButtonPreviousItem and
WMSelectPopUpButtonNextItem functions to the widget.
The WINGs lib version is bumped.
2026-01-25 01:28:53 +00:00
David Maciejak c82e6dad5c wmaker: set the window manager's information
According to EWMH specification, the active window manager is supposed
to set some information. Those can be gathered for example with
'wmctrl -m'.

Before the patch:
$ wmctrl -m
Name: N/A
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF

After the patch:
$ wmctrl -m
Name: Window Maker 0.96.0
Class: wmaker
PID: 6866
Window manager's "showing the desktop" mode: OFF
2026-01-24 14:24:03 +00:00
David Maciejak 95c68fe26d configure: add optional --enable-native option to compilation flags
This patch adds an option to enable native CPU optimizations
by adding -march=native to the compiler flags, tuning the
generated code for the build machine at the expense of portability.

In some tests, especially on wrlib I saw 8% perf improvement.
Should be used by developers or those who recompile wmaker for their own usage.
2026-01-24 14:24:03 +00:00
David Maciejak 77c3b95fd5 Doc: fix wmiv man page
Sort out the argument order or else 'make check' will complain.
2026-01-24 00:52:25 +00:00
David Maciejak b662d0827c WINGs: wfont fallback to default font when font is not found
This patch is fixing the issue reported
at https://github.com/window-maker/wmaker/issues/62
where wmaker is crashing if the font specified in WMGLOBAL is not found.
Now by default it will failsafe to DEFAULT_FONT.
2026-01-22 22:46:10 +00:00
David Maciejak a542934e67 WINGs: fix cursor ghosting issue in wtextfield
The cursor is moved using right/left arrows but as it's blinking
and a XOR function is used to hide/unhide it, it happens the cursor
can be not hidden properly from its previous position.
Better to refresh the view to avoid such issues.
2026-01-22 22:46:10 +00:00
David Maciejak d2b2c3238b WINGs: fix cursor position in wtextfield
In case the cursor is positioned out of the textfield view
after a delete and more chars are entered, wmaker process
will reach 100% and become unresponsive.

How to reproduce:
in the run command window enter an overly long text (longer than
the current input field view). Then, press home to go back to the
beginning of the string. Then, shift-End to select all the text,
then del to delete all the text. At that point the cursor is still
out of the view and if you enter more text wmaker process will be stuck.
2026-01-22 22:46:10 +00:00
David Maciejak d37a3162e0 WINGs: fix TARGETS request return type
According to the ICCCM, a reply to a TARGETS request must be a list of atoms.
Took the chance to also fix variable naming consistency between wtext and
wtextfield which are using the same kind of code.
2026-01-22 22:46:10 +00:00
David Maciejak 9ddacfc29b Fix typos and some appicon consistency in the FAQ 2026-01-18 14:54:28 +00:00
David Maciejak 7e21785710 wmiv: add support for archive files and a new option to ignore unknown image format
This patch adds optional support for compressed files and a new --ignore-unknown option
to ignore unknown image format. It also adds local filename drag-and-drop support.
And a copy current image to clipboard feature with ctrl+c shortcut.

It also fixes:
- fullscreen issue on multi monitors setup by using randr
- app icon advertised via _NET_WM_ICON
- fix UTF-8 filename usage in window title
2026-01-17 22:03:09 +00:00
David Maciejak 7cfdf6bd68 WRaster: add function to save image in memory
This patch adds the RSaveRawImage() function to the WRaster lib
to be able to save image structure in memory.
The WRaster lib version is bumped.
2026-01-17 22:03:09 +00:00
David Maciejak 72942267aa Prevent wrong UTF-8 window title truncation
The patch is fixing a UTF-8 truncation issue that could happen with the window title
when it was shrinked to be displayed in the window list (F11), leading to
an infinite loop.

Issue was reported at https://github.com/window-maker/wmaker/issues/61
2026-01-15 15:56:20 +00:00
Balló György ac19c4bc07 Don't set X-GDM-SessionRegisters to true
Window Maker does not call the RegisterSession() method on GDM's D-Bus
interface, causing that GDM doesn't know that the login was successful,
which leads to problems. If X-GDM-SessionRegisters is not specified or
false, GDM registers the session itself.

I noticed this when I logged out from Window Maker, and tried to log
in into another session with GDM, it doesn't work, because the login
screen hangs as the previous session was not entered into registered
state within GDM.

If X-GDM-SessionRegisters=true is specified, GDM expects that the
session will be registered via D-Bus:
https://gitlab.gnome.org/GNOME/gdm/-/commit/1c061b84ffc3e874da825982d18d970556ff74bb

E.g. GNOME Shell calls RegisterSession() method after login:
https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/0e37cd2ec92c5fbbc0870272e5e00fc07a705eba

Older versions behave the same way as would be X-GDM-SessionRegisters
not set or false.

Currently X-GDM-SessionRegisters=true is used only by GNOME Shell. All
other sessions omit this property, because they don't call the
RegisterSession() method on GDM's D-Bus interface after login.
2026-01-13 13:11:21 +00:00
David Maciejak 14bd13b1be Doc: fix spelling errors 2026-01-04 14:57:50 +00:00
David Maciejak afe13d3e72 New expert option: cycle all windows from all workspaces
Mentioned on the WMaker user mailing list, option disabled by default.

https://groups.google.com/g/wmaker-user/c/pR8P-ZYCDFo/m/Wo42U_xqBgAJ

So basically the patch is adding a new expert option in WPrefs (disabled by
default) to allow the switch panel to cycle over all the windows from all
workspaces. I believe it's useful if you are using a lot of fullscreen apps
each on different workspaces.
2026-01-03 19:23:34 +00:00
Carlos R. Mafra e356ef8c05 Revert "Prevent unnecessary RandR wmaker restart"
This reverts commit 3579c85af1.

As pointed out by David Maciejak himself, this patch triggers
an odd behavior:

 "Now I cannot do a rectangular selection on the desktop with the left
 click of the mouse like I used to do.
 Seems the XRRQueryVersion call to get randr version is messing up with the
 X events. I tried to move up the call in src/startup.c and src/main.c
 instead to the point where the bug cannot be reproduced if I am putting the
 XRRQueryVersion code just before the call to wDefaultsInitDomain
 "WMWindowAttributes" (in src/startup.c) which is really weird."
2025-12-30 20:25:46 +00:00
David Maciejak 3d993a7323 Fix UTF-8 usage in icon title
When pango is enabled and a window title contains UTF-8 chars,
there is a chance the miniaturized icon title will cut in 2 an UTF-8 char
leading to a glitch in the title.
2025-12-29 16:10:24 +00:00
David Maciejak a4a6e65ca9 Fix for ignore client supplied icon attributes
As mentioned on the WMaker user mailing list some time ago
https://groups.google.com/g/wmaker-user/c/95M_pb_Qlbs/m/6qJLJSqoAwAJ
The Ignore client supplied icon from the windows attributes is not working.
That's especially visible with firefox and thunderbird when they are using
NET_WM_ICON to push the embedded icon.
That patch is making sure to ignore the embedded icon if the user defined one.
2025-12-29 16:10:24 +00:00
David Maciejak 4392fdc291 WRaster: Add optional support to JPEG XL
Detect if libjxl is intalled, and build-in support in raster lib.
Feature can be disabled/enabled at configure time.
2025-12-27 19:48:37 +00:00
David Maciejak 67e2f5e1ca Prevent XAllocColor() call on TrueColor display
As reported in bug https://github.com/window-maker/wmaker/issues/50
X11 XAllocColor() call from wGetColorForColormap() in src/resources.c is returning some errors
especially seen when running GZDoom.

TrueColor display has been the dominant standard for well over a decade, meaning almost all modern X servers default to a TrueColor visual.
The default colormap is predefined and read-only, making allocation with XAllocColor() unnecessary (and meaning no need to free it too).
The patch is checking the display visual, and in case the display is truecolor, it does not allocate or free the color, just looking up for it.
Once the patch applied, GZDoom is not reporting warnings anymore.
2025-12-25 23:22:57 +00:00
David Maciejak 3579c85af1 Prevent unnecessary RandR wmaker restart
As reported in bug https://github.com/window-maker/wmaker/issues/34
when RandR is enabled, everytime a monitor is turned on or off wmaker is restarting
(that happens either manually or automatically with DPMS).
This behavior causes issues with xscreensaver.

How to reproduce the issue:
-install xscreensaver and lock the screen
-turn off then on the monitor manually
-you can see that wmaker was restarted and behind the xscreensaver lock window,
the desktop appears, potentially leaking information

Instead of using the RandR event RRScreenChangeNotifyMask which is too generic,
the patch is using RRCrtcChangeNotifyMask defined since RandR 1.2 (released in 2007).
In the recent RandR version, events for output (hardware) changes are propagated via
RROutputChangeNotifyMask while layout changes (like position, size, rotation)
are propagated via RRCrtcChangeNotifyMask.

The patch is purposedly not listening for RROutputChangeNotifyMask,
thus wmaker is not restarting on DPMS events anymore.

Currently, in case a new monitor is added (or removed) wmaker is not discovering it anyway
even after an automatic restart.
Either, wmaker has to be exited and restarted fully or an external tool like arandr
has to be used to configure the new monitor. So after the patch functionality remains unchanged.
2025-12-24 12:37:12 +00:00
David Maciejak 896bbce2e5 Remove default print key grabbing 2025-12-21 21:23:30 +00:00
David Maciejak 8f1ee27595 Remove duplicated code 2025-12-21 21:23:13 +00:00
Страхиња Радић 541947e9ef Update translator's email for Serbian
This patch updates my email throughout the source.

Signed-off-by: Страхиња Радић <sr@strahinja.org>
2025-10-27 20:47:25 +00:00
Страхиња Радић 7bb7d0f4d6 m4/wm_i18n.m4: Make compatible with POSIX sed
Currently, it seems like the script m4/wm_i18n.m4 is passing some editing
commands to sed(1), which are not strictly conforming to POSIX[1]. Namely, the
"grouping" command:

	{ command; command }

needs to have either a semicolon or a newline before the closing brace:

	{ command; command; }

or

	{ command; command
	}

according to POSIX.

On systems which don't use the lax GNU sed by default (like OpenBSD), the
current configuration and compilation goes like this:

$ autoreconf -vif

	...
	sed: 1: "/po$/{s,.po,,;p}": extra characters at the end of p command
	sed: 1: "/po$/{s,.po,,;p}": extra characters at the end of p command
	... (etc)

$ ./configure --without-menu-textdomain CATALOGS=sr.mo LINGUAS=sr \
	LIBS=-lintl MSGFMT=msgfmt --mandir=/usr/local/man

	...

	Translated languages to support     :

	configure: WARNING: No language from $LINGUAS are supported

$ gmake && doas gmake install
	... (no .mo files are generated nor installed)

and so on, since the editing commands in question are affecting the processing
of .po files.

This patch proposes inserting semicolons before the closing brace in the
mentioned editing commands passed to sed(1).

[1]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sed.html#tag_20_109_13_03

Signed-off-by: Страхиња Радић <sr@strahinja.org>
2025-10-27 20:47:25 +00:00
Doug Torrance da676c9e9e Add WPrefs Serbian translation to EXTRA_DIST
Otherwise "make check" fails (script/check-translation-sources.sh).
2024-11-12 10:15:17 +00:00
Doug Torrance 4edf589a5b Remove cruft from autogen.sh 2024-11-12 10:15:17 +00:00
Doug Torrance 709eec4bce Update autogen.sh so that it can be run from build directory 2024-11-12 10:15:17 +00:00
Jeremy Sowden b179803c11 Fix spelling errors
* "unknow" -> "unknown"
* "occured" -> "occurred"

Remove some entries from PO files where these entries contain spelling errors
and there are other entries that are identical except for these mistakes.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
Jeremy Sowden 5cd40deb20 Add missing Language: headers to PO files
msgfmt complains.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
Jeremy Sowden 9db1ea580d Ignore wrlib gettext artefacts
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
Jeremy Sowden 9e56f58742 Remove obsolete autoconf macro
`AC_PROG_GCC_TRADITIONAL` is obsolete and is now just an alias for `AC_PROG_CC`,
which is already defined.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
Страхиња Радић 4b946f69e2 Update Serbian translation from master branch
Signed-off-by: Страхиња Радић <contact@strahinja.org>
2023-11-02 21:03:07 +00:00
Страхиња Радић d55be193b8 Edit leftover automake files and READMEs for Serbian localization
This patch adds sr.po files to Makefile.am files throughout the repository
where needed. It also adds credits for Serbian localization in README files as
needed.

Signed-off-by: Страхиња Радић <contact@strahinja.org>
2023-11-02 19:28:30 +00:00
Strahinya e5b227fe8d Add Serbian localization
This patch adds Serbian localization to Window Maker.

Signed-off-by: Страхиња Радић <contact@strahinja.org>
2023-11-01 19:36:20 +00:00
Страхиња Радић d947095881 util/wmgenmenu.c(main): Close parentheses around vgradient
Currently, menu definitions created by wmgenmenu don't include the closing
parenthesis in vgradient constructs. This patch adds the missing closing
parentheses.

Signed-off-by: Страхиња Радић <contact@strahinja.org>
2023-11-01 13:25:52 +00:00
Carlos R. Mafra 93b049356f Revert "WUtil: Be more strict about base directory for wmkdirhier()"
This reverts commit a0b283a60f,
as it breaks saving the history in ~GNUstep/.AppInfo/WindowMaker/History
by restricting modifications to either ~GNUstep/Defaults or ~GNUstep/Library.

Thanks to Paul Selig for reporting this issue.
2023-08-21 22:22:32 +01:00
Carlos R. Mafra 75f353bef4 Update .gitignore
Since

fc63d72032 (WINGs: Fix incorrect use of macro USE_PANGO in installed header)

and

0e274dc979 (WRaster: Fix incorrect use of macro USE_XSHM in installed header)

the files wrlib/wraster.h and WINGs/WINGs/WINGsP.h are generated by the compilation,
so add them to .gitignore
2023-08-21 21:35:30 +01:00
Christophe CURIS 2264ed9de6 Fix calculation of version number in the library mapfiles
As reported by Andreas Metzler, the latest API change in lib WRaster caused
a compatibility issue because the internal version number was increased.

To correctly handle this situation, this patch does 2 things:
 - do not discard the 2 last number in the "c:r:a" version, because we need them;
 - when calculating the version for the mapfile, use the formula that is
suggested in libtool's documentation.

The purpose of the formula is that when API is changed, if a new function
is added then the version is not incremented to reflect that we are still
compatible with current binaries, it will be incremented only when there
is a break in compatibility.
2023-08-12 21:53:52 +01:00
Carlos R. Mafra d0aa2cefcd Window Maker 0.96.0 2023-08-05 08:46:23 +01:00
David Maciejak a52d13c8b8 Fix autoconf obsolete macros
autogen.sh is reporting some warnings as below

./autogen.sh 2>&1 |grep "obsolete"
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:115: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:115: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:134: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:134: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:135: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:135: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:146: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:146: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:146: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:146: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:373: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:373: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:458: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:681: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:807: warning: The macro `AC_TRY_LINK' is obsolete.

As the minimum autoconf version required is v2.69,
we need to make sure to update obsolete macros as described at
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
2023-04-14 23:45:00 +01:00
David Maciejak 215b6ee2e6 Set proper motif wm hints name
Just a cosmetic change as the variable is currently not in use.
According to the Motif Toolkit API and MwmUtil.h, the last long
variable from the Motif WM Hints struct is currenlty used
for the status.
2023-04-09 10:42:52 +01:00
David Maciejak ab45c6c6c2 Add central position feature for active window
This patch adds a new Central feature under the window menu
"Other maximization" entry.
Shortcut can be configured via WPrefs "Center active window" action.
When called the active window is centered on the screen head.
If the window height or width are bigger than the head size,
the window is resized to fit.
There are some transitions defined as below:
*from fullscreen to center
*from any corner to center
*from top half to center top half
*from bottom half to center bottom half
*from left half to center left half
*from right half to center right half

Undoing the action is done via the window menu "Unmaximize" entry
or the shortcut.
2023-03-31 09:11:38 +01:00
David Maciejak 3344f2b040 NEWS: Hot corners feature description
Add an entry in the NEWS to describe the Hot Corners feature.
2023-03-26 10:35:33 +01:00
David Maciejak ecef2b2890 WPrefs: Hot corner preferences
Add a new "Hot Corner Shortcut Preferences" section to WPrefs
to configure the Hot Corners feature.
2023-03-26 10:35:33 +01:00
David Maciejak 802cbc0d75 Hot corners feature core
Add mouse pointer position detection to trigger the corner actions.

Screen corners can be assigned an external command to be
executed when the mouse pointer is entering those areas.

In WPrefs, "Hot Corner Shortcut Preferences" can be used
for configuration or by manually adding a "HotCorners" key
and value to "YES" in the ~/GNUstep/Defaults/WindowMaker file.

Actions are specified by the "HotCornerActions" and are defined
as a four entries list ("top left action", "top right action",
"bottom left action", "bottom right action").
A screen corner area is a cube shape defined by the "HotCornerEdge"
which is a number of pixels from 2 (by default) to 10.

To lower the risk of triggering that feature accidentally a
"HotCornerDelay" key can be used which is the time before the action
is triggered while the pointer is in one of the screen corner.
Default value is 250 ms.

Hot Corners feature is disabled by default.
2023-03-26 10:35:33 +01:00
David Maciejak 157d1ba85f Fix internal function name typo
The patch is to fix a typo in the fct name movePionterToWindowCenter
2023-03-23 12:57:58 +00:00
David Maciejak 91e7f37074 WPrefs: fix keyboard shortcut sorting order
That patch is fixing some Actions entries that are not sorted properly.
One is using some upper/lower cases.
And the other one, is displaying numbers while alphabetic sorting is not
working properly on numbers. For example:
Shortcut for window 1
Shortcut for window 10
Shortcut for window 2
...
2023-03-21 15:20:19 +00:00
David Maciejak 18a539b372 Add some more cases to handle window unusual size request
As discussed on the ML, the test to check for CARD16 limit is probably innacurate.
Check instead for maxH and maxW which are set by default to twice the size
of the screen or to the max values passed by the window normal hints property.
2023-03-16 15:02:18 +00:00
David Maciejak eae9200c5d Fix ICCM ConfigureNotify request
According to ICCM specs at [1]

*Not changing the size, location, border width, or stacking order of the window at all.
A client will receive a synthetic ConfigureNotify event that describes the (unchanged)
geometry of the window. The (x,y) coordinates will be in the root coordinate system,
adjusted for the border width the client requested, irrespective of any reparenting
that has taken place. The border_width will be the border width the client requested.
The client will not receive a real ConfigureNotify event because no change has actually
taken place.

*Moving or restacking the window without resizing it or changing its border width.
A client will receive a synthetic ConfigureNotify event following the change that
describes the new geometry of the window. The event's (x,y) coordinates will be in
the root coordinate system adjusted for the border width the client requested.
The border_width will be the border width the client requested. The client may not
receive a real ConfigureNotify event that describes this change because the window
manager may have reparented the top-level window. If the client does receive a
real event, the synthetic event will follow the real one.

*Resizing the window or changing its border width
(regardless of whether the window was also moved or restacked).
A client that has selected for StructureNotify events will receive a real
ConfigureNotify event.
Note that the coordinates in this event are relative to the parent,
which may not be the root if the window has been reparented. The coordinates will
reflect the actual border width of the window (which the window manager may have
changed). The TranslateCoordinates request can be used to convert the coordinates
if required.

In Window Maker, the first case is not implemented: doing a synthetic ConfigureNotify
to notify no changes were done. That's creating some issues with app like Citrix icaclient
when sometime windows are blank and need to be moved to be refreshed.

[1]https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#configuring_the_window
2023-03-16 15:02:18 +00:00
David Maciejak 25cb9d208a Update window.c copyright
Just updating the copyright line in the file header.
2023-03-16 15:02:18 +00:00
David Maciejak 23471b2e21 WPrefs: update maximization feature descriptions
Align the old maximization descriptions to the new visual indicator
names. The internal shortcut names had also been updated, meaning a
reconfiguration of the shortcuts in WPrefs is required.
2023-03-16 11:36:02 +00:00
David Maciejak 258ffc8b97 Window menu: add maximization visual indicators
Add visual indicators for the maximization options in the window menu.
2023-03-14 12:27:16 +00:00
David Maciejak 86b7ec1a58 Restore proper drawer direction when screen was resized
Since 48d4820dee the dock is positioned
dynamically based on the screen midpoint.
The side issue using such method is if in case the screen was temporarily
resized the dock as a chance to be displayed on the other side making
the drawer saved configuration from WMState esp the direction wrong when
wm is started again.
For example, the dock and drawer are displayed on the right of the screen.
Then the screen resolution is downsized temporaily to half or less of
the previous size. The position stored in WMState will be updated and the
direction of the drawer is still opening on the left.
But on next wm start, when reading the conf.
The position of the dock and drawer are corresponding to the
middle or less of the unresized screen. The dock and drawer will be sticked
on the left. But the drawer direction was not updated and still opening
on the left (which is out of the screen).
2023-03-14 12:27:16 +00:00
Doug Torrance 9831e3f72a Move declarations to beginning of switch statements
Several variable declarations were recently added immediately after
labels, but this causes compile errors in GCC versions prior to 11,
e.g.,

    wsmap.c: In function ‘handle_event’:
    wsmap.c:534:4: error: a label can only be part of a statement and a declaration is not a statement
      534 |    WMScreen *wmscr = wsmap->scr->wmscreen;
          |    ^~~~~~~~

We move these declarations to the top of the corresponding switch
statements so that Window Maker can compile on these older versions of
GCC.
2023-03-13 15:33:21 +00:00
David Maciejak 0a55facac0 wmiv: align version with wm
Use wm version for the wmiv util.
2023-03-13 15:32:19 +00:00
David Maciejak 0ecf7d3540 KeepDockOnPrimaryHead: fix drawer direction
When that option is on, swapping drawer does not always mean
swapping drawer direction. For example if drawer is on the left
side of the second head and moving to the left side of the first head,
the direction should be the same.
2023-03-13 15:32:19 +00:00
David Maciejak 4576b5bf1e Info Panel: display proper number of colors in deepcolor env
Instead of displaying a number of unitary colors in 10bit env,
display a more human readable message.
2023-03-13 15:32:19 +00:00
David Maciejak 0526ddfc54 WINGs: Make the Extras examples to compile
There is a table view example which is not compiling cause
of a missing lib, also fixed some warnings.
2023-03-12 09:44:10 +00:00
David Maciejak 4c52232ee7 Window titlebar double click to unmaximize
Commit 6e2075f3df from 2020 added
a feature to maximize window when double clicking on the titlebar.
But unmaximizing is not supported so when double clicking again
on the window titlebar the window geometry was not reverted back.
2023-03-12 09:44:10 +00:00
David Maciejak 43edd37ee2 Update file headers year copyright
Update copyright year for Window Maker Team entries.
2023-03-12 09:44:10 +00:00
David Maciejak e95aea2e30 Workspace pager: display ? on non visited mini workspace
When the workspace pager is displayed it's showing grey mini workspaces
for non rendered/non visited workspaces. That patch is adding an exclamation
mark in the middle of the dummy grey background mini workspaces.
2023-03-11 11:38:25 +00:00
David Maciejak 038a3588d6 WINGs: W_KeycodeToKeysym remove unnecessary if test
min_kc value is always -1 at that point in the code, so need to test it
as it's always true.
2023-03-09 15:05:58 +00:00
David Maciejak 0b2fd6a8c8 WINGs: handle fixed size windows
According to the EWMH specs, windows can indicate that they are
non-resizable by setting minheight = maxheight and minwidth = maxwidth
in the ICCCM WM_NORMAL_HINTS property. That should be for example
the case for WPrefs app which is not resizable.
Window Maker currently is overwriting that flag in src/window.c for
apps that are exposing GNUstepHints instead.
This patch is making sure the apps created with WINGs is removing
the WMResizableWindowMask to hide the resizebar.
2023-03-09 15:05:58 +00:00
David Maciejak 3e991badf7 SwitchPanel: fix app icons opacity combination
For some apps the background is not displayed properly, showing
some kind of shawow around the app icon like for example firefox
or skype. This is due to an issue in combining alpha channels.
2023-03-09 15:05:58 +00:00
David Maciejak ac6d284269 NEWS: add entry for libXRes support 2023-03-09 15:05:58 +00:00
David Maciejak 83b94b1616 Update news and changelog files 2023-03-07 17:31:07 +00:00
David Maciejak d045ffcf7d Add a screenshot capture feature
This patch adds a feature to take screenshots directly from Window Maker.
Having the feature embeded direclty inside Window Maker allows us to take
advantage of how Window Maker is managing and handling Windows.
Three new actions can be bound to a key shortcut from WPrefs.
The screenshot files are saved in ~/GNUstep/Library/WindowMaker/Screenshots/
dir, with a "screenshot_%Y-%m-%d_at_%H:%M:%S" format followed by the
extension. Preferably as a PNG or JPG file if available.
Meaning, to work Window Maker via WRaster needs to support
at least one of those format.

"Capture the entire screen" is quite standard, it takes a screenshot
of the whole screen area (even in multiheads env).
"Capture a portion of the screen" requires the user to draw a rectangle which
will be captured.
Those two first are quite straightforward, just taking a live picture of
the screen.
The last one is "Capture a window" which works in best effort mode,
it catures the focused window. As Window Maker by default is not using
any compositor (like for example Xcompmgr) it can only dump the content
displayed on the screen.
If a window is minimized or out of the screen, there is high chance the
image will be split or some area greyed in case other windows overlapped it.
2023-03-07 17:30:59 +00:00
David Maciejak 6c69dc32a0 WINGs: Make the test examples to compile
Those examples are optional but currently cannot compile properly.
The compiler is reporting some unused variables and missing header file.
2023-03-07 17:24:41 +00:00
David Maciejak 3b1c00ad06 WINGs: comment out wtext unused NOTIFY macro
The compiler is reporting the warning below
wtext.c:171: warning: macro "NOTIFY" is not used [-Wunused-macros]

That macro is only used once within that C file, code which is commented
out already.
2023-03-06 20:16:07 +00:00
David Maciejak dd6fe27858 WPrefs: convert workspacename.xpm X11 color name to hex
On window maker built without libxpm, a simple build-in xpm support is used.
That component does not support X11 color name thus when trying to load
that image we are getting a file corrupted error.
Colors manually converted using ref at
https://www.ehdp.com/methods/x11-colors/x11-colors-rgb-values-05.htm
2023-03-05 00:16:44 +00:00
David Maciejak 45f3f5d0ae Util: fix wmgenmenu memory leak and help msg
Memory allocated from wstrconcat() calls are not freed properly.
Help msg is reporting the wrong directory where to install WMRootMenu.
2023-03-05 00:16:44 +00:00
David Maciejak 7185af15cf Use wtokenfree whenever there is wtokensplit
Whenever wtokensplit is used to split into argv/argc, it's better to
use the built-in function wtokenfree() as a wfree call only on argv
is not freeing the memory properly.
2023-03-05 00:16:44 +00:00
David Maciejak 80e8dd43f7 Convert tile.xpm X11 color name to hex
On window maker built without libxpm, a simple build-in xpm support is used.
That component does not support X11 color name thus when trying to load
that image we are getting a file corrupted error.
Colors manually converted using ref at
https://www.ehdp.com/methods/x11-colors/x11-colors-rgb-values-05.htm
2023-03-05 00:16:44 +00:00
David Maciejak a383074c99 WPrefs: sort alphabetically the key shortcut actions and expert options
There are too many entries now in key shortcut actions and expert options,
better to sort them dynamically.
2023-03-03 14:15:19 +00:00
David Maciejak 52a623729d Coverity: fix WRaster convert uninitialized scalar variable 2023-03-03 14:15:19 +00:00
David Maciejak d4ee17f0b5 Coverity: fix WPrefs workspace negative array index read 2023-03-03 14:15:19 +00:00
David Maciejak 7475bc5d0a Coverity: fix util wmsetbg resource leak 2023-03-03 14:15:19 +00:00
David Maciejak 35f87b5592 WRaster: add new file references for translation
This patch is adding the references for the two newly added files
save_jpeg.c and save_png.c for translation (even if those new
files are not adding any new strings to be translated).
2023-03-03 09:51:24 +00:00
David Maciejak 5e37d13eb6 Coverity: fix wmgenmenu resource leak 2023-03-02 17:04:48 +00:00
David Maciejak 4b1aee3e79 Coverity: fix wmmenugen resource leak 2023-03-02 17:04:48 +00:00
David Maciejak 0ccc5bbde7 Coverity: fix wmspec dereference after null check 2023-03-02 17:04:48 +00:00
David Maciejak 59a686d22e Coverity: fix WPrefs appearance negative array index read 2023-03-02 17:04:48 +00:00
David Maciejak 26d46f6e16 Coverity: fix WPrefs menu negative array index read 2023-03-02 17:04:48 +00:00
David Maciejak ceafbf0629 Coverity: fix WPrefs mousesettings menu negative array index read 2023-03-02 17:04:48 +00:00
David Maciejak cf178d011b Coverity: fix WPrefs preference negative array index read 2023-03-02 17:04:48 +00:00
David Maciejak 682c2767c2 Coverity: fix WPrefs texturepanel negative array index read 2023-03-02 17:04:48 +00:00
David Maciejak 0e00c6b605 Coverity: fix dialog dereference null return value
This patch is making sure defaultPath returns from FindImage() is not null
and freeing the variables.
2023-03-02 17:04:48 +00:00
David Maciejak e9717ed719 Coverity: fix WPrefs appearance time of check time of use 2023-03-02 17:04:48 +00:00
David Maciejak 9e59d19507 Coverity: fix WPrefs editmenu uninitialized scalar variables 2023-03-02 17:04:48 +00:00
David Maciejak 94f98dcd25 Coverity: fix WRaster convert uninitialized scalar variable 2023-03-02 17:04:48 +00:00
David Maciejak 6c7266c338 Coverity: fix session resource leak 2023-03-02 17:04:48 +00:00
David Maciejak b4bd6d0cad Coverity: fix xmodifier uninitialized scalar variable 2023-03-02 17:04:48 +00:00
David Maciejak c7f7c10d7c Coverity: fix wmsetbg string not null terminated 2023-03-02 17:04:48 +00:00
David Maciejak d831766572 Coverity: fix rootmenu structurally dead code 2023-03-02 17:04:48 +00:00
David Maciejak e2ecfbfd54 Coverity: fix wcolorpanel uninitialized scalar value 2023-03-02 17:04:48 +00:00
David Maciejak a8ec32d41a Coverity: fix setstyle resource leak 2023-03-02 17:04:48 +00:00
David Maciejak 1215680b6d Coverity: fix misc resource leak 2023-03-02 17:04:48 +00:00
David Maciejak 77df89396c Coverity: fix menuparser_macro uninitialized pointer read 2023-03-02 17:04:48 +00:00
David Maciejak c8883fdbb0 WRaster: add functions to save image on disk
This patch adds the RSaveTitledImage() function to the WRaster lib
to be able to save file on disk either as a PNG or a JPEG file.
Those two formats depends on optional external libs.
The function can take an optional title/comment which will
be save inside the file.

The WRaster lib and header versions are bumped.
2023-03-02 10:23:47 +00:00
David Maciejak 3cc5808dcd Coverity: fix wmspec uninitialized layer variable 2023-02-28 13:40:48 +00:00
David Maciejak 8ca89f0141 Coverity: fix RContextAttributes uninitialized variable 2023-02-28 13:33:11 +00:00
David Maciejak 76fa91d21e Coverity: fix wmiv resource leak 2023-02-28 13:33:11 +00:00
David Maciejak d2d5297a1e Coverity: fix potential buffer overflow 2023-02-28 13:33:11 +00:00
David 7b317a5fba wmiv: use W_KeycodeToKeysym instead of XkbKeycodeToKeysym
This patch replaces XkbKeycodeToKeysym in wmiv by our
own function W_KeycodeToKeysym.
2023-02-28 03:33:21 +00:00
David Maciejak 9f8dc6f5dc Use W_KeycodeToKeysym instead of XkbKeycodeToKeysym
This patch replaces XkbKeycodeToKeysym by our
own function W_KeycodeToKeysym.
2023-02-27 23:05:27 +00:00
David Maciejak bc56db0776 WPrefs: use W_KeycodeToKeysym instead of XkbKeycodeToKeysym
This patch replaces XKeycodeToKeysym and XkbKeycodeToKeysym
in WPrefs by our own function W_KeycodeToKeysym.
2023-02-27 23:05:27 +00:00
David Maciejak 15d06ff064 WINGs: Add W_KeycodeToKeysym to replace XKeycodeToKeysym/XkbKeycodeToKeysym calls
XKeycodeToKeysym was deprecated some time ago and we replaced
those function calls to XkbKeycodeToKeysym.
Usage of XkbKeycodeToKeysym is not the best as it appears
the XKEYBOARD can be disabled via xorg.conf (at least on Linux).
So just replacing XKeycodeToKeysym() with XkbKeycodeToKeysym()
could cause run-time errors on top of the compilation warning
we may have.
Better fix is to address the problem without introducing a
dependency on XKEYBOARD. W_KeycodeToKeysym is the equivalent
code for XKeycodeToKeysym/XkbKeycodeToKeysym using
XGetKeyboardMapping instead.

As a new function is added to the library WINGs library version
is bumped.
2023-02-27 22:37:44 +00:00
David Maciejak 2dd98666f1 Store window maximize state as hex value
As the maximize state is defined as a bit-field internally.
Better to store the flag in the WMSTATE file as hex value.
2023-02-27 22:37:44 +00:00
David Maciejak d1a7db8aea Compile by default with POSIX 7 revision
Compile by default with POSIX-2008 standard for Linux and FreeBSD.
2023-02-27 22:37:44 +00:00
David Maciejak 64a8ecb390 Code cleaning: removing trailing space
The patch is removing trailing space(s) before
the semicolon ending line. .c and .h files were checked.
2023-02-27 22:37:44 +00:00
David Maciejak a9e336256b Doc: add disable-res description 2023-02-26 11:02:46 +00:00
David Maciejak e9b20b51e9 WPrefs: check if captured keyboard shortcut is not in use
Make sure the captured keyboard shortcut is not already in use
by another action, if it's the case an error popup is shown and
the key is not kept.
2023-02-25 13:31:42 +00:00
David Maciejak 1d8b38b6e0 Fix compiler warnings from texture.c v2
The patch fixes those 2 warnings below from texture.c.
It reverts the previous v1 patch and fixes the compiler warning
by updating the texture.h wTextureMakeIGradient header instead.

texture.c:205:81: warning: argument 3 of type 'const RColor[2]' with mismatched bound [-Warray-parameter=]
  205 | WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[2],
      |                                                                    ~~~~~~~~~~~~~^~~~~~~~~~
In file included from texture.c:33:
texture.h:165:53: note: previously declared as 'const RColor[]'
  165 | WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]);
      |                                                     ^~~~~~~~~~~~~~
texture.c:206:67: warning: argument 5 of type 'const RColor[2]' with mismatched bound [-Warray-parameter=]
  206 |                                      int thickness2, const RColor colors2[2])
      |                                                      ~~~~~~~~~~~~~^~~~~~~~~~
texture.h:165:74: note: previously declared as 'const RColor[]'
  165 | WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]);
      |
2023-02-25 13:31:42 +00:00
David Maciejak 82ad19d420 Fix compiler warnings from texture.c
The patch fixes those 2 warnings below from texture.c

texture.c:205:81: warning: argument 3 of type 'const RColor[2]' with mismatched bound [-Warray-parameter=]
  205 | WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[2],
      |                                                                    ~~~~~~~~~~~~~^~~~~~~~~~
In file included from texture.c:33:
texture.h:165:53: note: previously declared as 'const RColor[]'
  165 | WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]);
      |                                                     ^~~~~~~~~~~~~~
texture.c:206:67: warning: argument 5 of type 'const RColor[2]' with mismatched bound [-Warray-parameter=]
  206 |                                      int thickness2, const RColor colors2[2])
      |                                                      ~~~~~~~~~~~~~^~~~~~~~~~
texture.h:165:74: note: previously declared as 'const RColor[]'
  165 | WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]);
      |
2023-02-24 12:19:38 +00:00
David Maciejak 492b22d975 Fix compiler warning from menu.c
The patch fixes the compiler warning below

menu.c: In function 'restoreMenuRecurs':
menu.c:2450:47: warning: '%s' directive output may be truncated writing up to 510 bytes into a region of size between 509 and 1019 [-Wformat-truncation=]
 2450 |         snprintf(buffer, sizeof(buffer), "%s\\%s", path, menu->frame->title);
      |                                               ^~

The code is taking care of checking properly the string passed to the buffer,
so there is no issue, the change is just to make the compiler happy.
2023-02-24 12:19:38 +00:00
David Maciejak 62405fbb75 Detect and override illegal window size hints v2
The patch is trying to mitigate and properly address the issue described at
https://github.com/window-maker/wmaker/issues/26
A buggy application (in that example virtualbox) is requesting a window size creation
that is way too big and basically at the limit of X11 protocol
(width and height are defined as CARD16).
See details at https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html
During the tests, virtualbox has been seen requesting for window creation of size 843x65508.
Even xprop is reporting incorrect values.

There had been an attempt before with the commit
https://repo.or.cz/wmaker-crm.git?a=commit;h=6668715402a5d8e2ecda6702076a06bf8988721e

But the patch is broken and not implemented at the right place.
As described in the wWindowConfigure function header, the size passed by the client app
should not be trusted and should be vetted with a prior call to wWindowConstrainSize.
wWindowConstrainSize call was missing only once in the wClientConfigure function from client.c
What wWindowConstrainSize doing now is basically setting a failsafe window size fo 640x480
if both width and height are above the size of CARD16.
If only one dimension is oversized, it's setting a default 4/3 window ratio.
Oversized here has not been changed and it's defined in windowmaker as double the screen size.
2023-02-22 20:10:31 +00:00
David Maciejak f1fef40f0d Make window maximize state persistent
Window maximize state is not persistent between windowmaker sessions.
This patch is updating the save and restore workspace state functions
to update the state in the WMSTATE file.
2023-02-21 18:16:35 +00:00
David Maciejak 2fb9308a67 Info Panel: Add libXRes info if supported
If windowmaker was compiled with libXRes,
add XRes info in the "Additional support" section.

Take also the chance to remove the mode +x on the source code file.
2023-02-20 23:07:02 +00:00
David Maciejak d902477efd Set missing WM_COMMAND using pid given from libXRes
For apps which are not setting the window WM_COMMAND property like those old
apps using Motif toolkit (I am thinking of NEdit for example)
it's bringing some issues in windowmaker which is relying on it for a few interactions.
Especially,
*an app without WM_COMMAND will not be saved during the workspace state
(so session restore is not working for them)
*when added to the dock, the settings parameters are empty and need to be filled
*cannot autostart from the dock (even if the settings are manually filled and saved)
*right click on the app titlebar, and choosing Launch has no effect

Most of the time, those apps are also not setting the X11_NET_WM_PID property.
With the pid we could have a chance to find the running program.
To link a window to a pid, there is the X11 Resource extension library (libXRes).
After checking, gnome and xfce are also using the same method to handle such issues.

The patch is checking if the libXRes is present on the system (but it's not mandatory to compile).
Then, it adds a layer on top of wNETWMGetPidForWindow to not only check the window property
but if necessary to get the underlying pid from libXRes if available.
That's solving the points mentioned above.
2023-02-20 15:00:55 +00:00
David Maciejak 5ee19c2308 Allow WM_COMMAND-less app to autostart
For apps which are not setting the window WM_COMMAND property like those old
apps using Motif toolkit (I am thinking of NEdit for example)
it's bringing some issues in windowmaker which is relying on it for a few interactions.
Especially,
*an app without WM_COMMAND will not be saved during the workspace state
(so session restore is not working for them)
*when added to the dock, the settings parameters are empty and need to be filled
*cannot autostart from the dock (even if the settings are manually filled and saved)
*right click on the app titlebar, and choosing Launch has no effect

The patch below allows the workspace state to be saved for those apps without WM_COMMAND
that have been launched from the dock. We are just reusing what have been set in the
Application Path Settings of the dock app (and it does not require extra libs like libXRes).
2023-02-20 15:00:55 +00:00
David Maciejak fabd4252ab Allow exit panel to be bound to a key shortcut
While debugging the save/restore workspace state, I found quite
useful to be able to exit windowmaker using a key shortcut.
2023-02-20 15:00:55 +00:00
David Maciejak 630e9292c2 Factorize duplicate run command code
Run command from the menu and run command from the key shortcut are from two different codes.
Merge them into one function instead.
2023-02-19 10:10:49 +00:00
David Maciejak 14d1b8197a WRaster: Avoid undefined setjmp() behavior with libjpeg
Fix compiler warning:
load_jpeg.c: In function 'RLoadJPEG':
load_jpeg.c:100:17: warning: variable 'image' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]

As it was not working to only set the RImage *image as volatile,
I had to refactor the code by following the example from
https://github.com/libjpeg-turbo/libjpeg-turbo/commit/410c028f3396d1fa9bcc72608079ff4d3d76b03e#diff-e7cb632359a2be17c1008b50f9ec85691cd5d66834d5fe8f63ef65ceb06682ee
2023-02-19 10:10:41 +00:00
David Maciejak 4d658341d2 Add support for _NET_WM_FULLSCREEN_MONITORS
This patch adds the _NET_WM_FULLSCREEN_MONITORS hint as defined in EWMH which is based on Xinerama.
It's allowing a window to be displayed fullscreen on multiple monitors.

Issue mentioned at https://github.com/window-maker/wmaker/issues/8
Specs at https://specifications.freedesktop.org/wm-spec/1.5/ar01s06.html#idm45763309187776
GTK test program used https://bugzilla.gnome.org/show_bug.cgi?id=414476
2023-02-18 08:41:08 +00:00
David Maciejak ac75047aef Fix mini workspace compiler warnings
The patch is to fix warnings like:
wsmap.c: In function "update_mini_workspace":
wsmap.c:451:55: warning: "%d" directive output may be truncated writing between 1 and 11 bytes into a region of size 10 [-Wformat-truncation=]
  451 |                         snprintf(name, sizeof(name), "%d", general_index);
2023-02-17 21:51:06 +00:00
David Maciejak 6d6f9f6ff5 Info Panel: Fix uninitialized posn variable 2023-02-16 11:34:54 +00:00
David Maciejak 370adc94e7 Ignore WM_NORMAL_HINTS resize increment for maximized windows
If you are trying to maximize old apps that are setting a resize increment
in term of WM_NORMAL_HINTS notion the window will not be maximized fully (by a few pixels).
It's easy to reproduce with xterm, ctrl double click on the title bar.
xprop extract sample is giving:
program specified resize increment: 6 by 13

For those maximized windows the patch is just ignoring the resize increment.
Seems the same issue happened on that project
https://github.com/paperwm/PaperWM/issues/106
2023-02-16 01:21:25 +00:00
David Maciejak 532acdc443 WRaster: Avoid types deprecated with libtiff 4.3
This patch is fixing compiler warnings like:

load_tiff.c:42:9: warning: 'uint16' is deprecated [-Wdeprecated-declarations]
load_tiff.c:43:9: warning: 'uint32' is deprecated [-Wdeprecated-declarations]

As starting from libtiff 4.3, released in April 2021, types were moved
from uint16 to uint16_t and uint32 to uint32_t respectively.

See https://libtiff.gitlab.io/libtiff/releases/v4.3.0.html
2023-02-15 11:24:09 +00:00
David Maciejak d7d38aa443 Info Panel: display more OS details
Rely on old utsname and os-release (http://0pointer.de/blog/projects/os-release) when available
to display more underlying OS details in the Info panel.
The idea is when someone creates a bug entry we can request them to copy/paste that screen
to give more info about the context that could help us debug the issue.
For example, on my current system it's displaying:
"Running on: Ubuntu 22.10 (x86_64)"
2023-02-15 09:37:06 +00:00
David Maciejak a6209cc89b Set a better exit panel message
Replace the exit window manager generic message with Window Maker term instead.
2023-02-15 09:37:06 +00:00
David Maciejak 01bd523cee WINGs: allow keypad enter key to validate button
This patch allows the keypad enter key to validate the button click action.
2023-02-15 09:37:06 +00:00
David Maciejak 45ab72a78a InfoPanel: fix out of display text
When debug is enabled, the memory allocated details is supposed to display the free chunks
but as the text length is too long it's getting out of the display area.
This patch is increasing the window width to handle such case.
2023-02-13 13:10:14 +00:00
David Maciejak 437b76812d Info Panel: mallinfo is deprecated use mallinfo2 instead
Replacing mallinfo with mallinfo2.

The fields of the mallinfo structure that is returned by the
older mallinfo() function are typed as int.  However, because
some internal bookkeeping values may be of type long, the
reported values may wrap around zero and thus be inaccurate.
2023-02-11 10:35:23 +00:00
David Maciejak e3ee459a78 Info Panel: use system time to get the current year
Use the system date to get the current year to insert inside the copyright line.
So no need to update that string anymore.
2023-02-11 10:33:22 +00:00
David Maciejak d70b546f2e Fix wrong XKeycodeToKeysym index value
XKeycodeToKeysym was deprecated some time ago and wmaker code was patched to use the definition from XKBlib instead.
(https://repo.or.cz/wmaker-crm.git?a=commit;h=0382dd5dd7ecae2112a0c6366eaf9e6ab68ad354)

Before being deprecated,  XKeycodeToKeysym was prototyped at X11/Xlib.h as
KeySym XKeycodeToKeysym(display, keycode, index)

Now it's available in X11/XKBlib.h as
KeySym XkbKeycodeToKeysym(display, keycode, group, level)

Basically level now which is the 4th parameter is our old index variable (3rd parameter).

On systems which don't have xkb supported the value set for index is wrong.
As seen in old patch at https://repo.or.cz/wmaker-crm.git/blobdiff/139f912e618870cc7fd908099f203450547eb658..43c3526d2120712f72579398b73ef92283d9078b:/WPrefs.app/MouseSettings.c
we should pass the l value to old XKeycodeToKeysym function and not the 0 value which is used for the group in the new XkbKeycodeToKeysym definition.
2023-02-11 10:30:52 +00:00
David Maciejak 812930b7cd Fix icon.c unused variable compiler warning
Just to please the compiler as it's reporting:
icon.c: In function 'get_icon_cache_path':
icon.c:425:13: warning: unused variable 'len' [-Wunused-variable]
2023-02-11 10:30:02 +00:00
David Maciejak 2a14004fc3 SwitchPanel: make sure WMRetainColor and WMReleaseColor calls are even
The number of calls to WMRetainColor for a color in use should the same as the number of calls to WMReleaseColor
to free that color. In case of discrepancy, random crashes can happen and memory is not freed properly.
To debug that issue I checked the retained colors when the switchpanel is opened and then checked if those colors are properly released once the panel is closed.

This patch fixes the issue mentioned at https://github.com/window-maker/wmaker/issues/22
2023-02-10 11:24:55 +00:00
David Maciejak 04e9f33437 WINGs: Fix incorrect findCloseColor exact flag value
In case the color cannot be allocated exactly by createRGBAColor function,
the findCloseColor function is used as a failover function to find a color close to the requested color.
By definition that color is then not exact.
createRGBAColor exact flag should be 1 while findCloseColor exact flag should be 0
2023-02-10 11:24:44 +00:00
David Maciejak 150816c687 Fix missing linefeed on the error message
Just to display the error message properly in case there is no display.
2023-02-08 00:14:48 +00:00
248 changed files with 19125 additions and 1717 deletions
+4
View File
@@ -30,6 +30,8 @@ m4/ltversion.m4
m4/lt~obsolete.m4 m4/lt~obsolete.m4
src/wconfig.h src/wconfig.h
WINGs/WINGs/WINGsP.h
wrlib/wraster.h
# These files are generated by scripts # These files are generated by scripts
INSTALL-WMAKER INSTALL-WMAKER
@@ -131,6 +133,8 @@ WPrefs.app/WPrefs.desktop
/WPrefs.app/po/*.mo /WPrefs.app/po/*.mo
/util/po/*.pot /util/po/*.pot
/util/po/*.mo /util/po/*.mo
/wrlib/po/*.pot
/wrlib/po/*.mo
# Some text editors generate backup files # Some text editors generate backup files
*~ *~
+4 -4
View File
@@ -21,7 +21,7 @@ Changes since version 0.95.7:
- debian: Ignore missing documentation for --runstatedir. - debian: Ignore missing documentation for --runstatedir.
- debian: Use dh_autoreconf. - debian: Use dh_autoreconf.
- debian: Simplify debian/rules. - debian: Simplify debian/rules.
- debian: Fix typo occured. (Thanks, lintian.) - debian: Fix typo occurred. (Thanks, lintian.)
- debian: wmaker manpage moved from 1x to 1. - debian: wmaker manpage moved from 1x to 1.
(Andreas Metzler <ametzler@bebt.de>) (Andreas Metzler <ametzler@bebt.de>)
- debian: Add wmiv to wmaker package. - debian: Add wmiv to wmaker package.
@@ -498,7 +498,7 @@ Changes since version 0.95.6:
- doc: Add manpage for wmiv. - doc: Add manpage for wmiv.
(Doug Torrance <dtorrance@monmouthcollege.edu>) (Doug Torrance <dtorrance@monmouthcollege.edu>)
- wmaker: replaced old email address with the official one - wmaker: replaced old email address with the official one
- WINGs: Updated news with the API changes that occured between 0.95.6 and - WINGs: Updated news with the API changes that occurred between 0.95.6 and
0.95.7 0.95.7
- WINGs: ran spell checker on the NEWS file - WINGs: ran spell checker on the NEWS file
- WINGs: fix non-portable int conversion for printf in font panel size handling - WINGs: fix non-portable int conversion for printf in font panel size handling
@@ -969,7 +969,7 @@ Changes since version 0.95.5:
- WMaker: moved XGrab/XUngrabPointer into the conditional code - WMaker: moved XGrab/XUngrabPointer into the conditional code
- News: created section dedicated to the changes related to 0.95.3 - News: created section dedicated to the changes related to 0.95.3
- News: added description of a change that may be interesting to users - News: added description of a change that may be interesting to users
- News: added section to describe the changes that have occured in 0.95.4 - News: added section to describe the changes that have occurred in 0.95.4
- News: marked the current changes as part of 0.95.5 and describe the drawers - News: marked the current changes as part of 0.95.5 and describe the drawers
feature feature
- News: described the new features for future 0.95.6 release - News: described the new features for future 0.95.6 release
@@ -1103,7 +1103,7 @@ Changes since version 0.95.5:
#50158) #50158)
- WPrefs: fix NULL pointer handling when getting the Modifiers (Coverity - WPrefs: fix NULL pointer handling when getting the Modifiers (Coverity
#50200) #50200)
- WPrefs: add warning when renderTexture encounters some unknow settings - WPrefs: add warning when renderTexture encounters some unknown settings
(Christophe CURIS <christophe.curis@free.fr>) (Christophe CURIS <christophe.curis@free.fr>)
- util/wmiv: add image auto orientation detection - util/wmiv: add image auto orientation detection
(David Maciejak <david.maciejak@gmail.com>) (David Maciejak <david.maciejak@gmail.com>)
+11 -11
View File
@@ -15,7 +15,7 @@ Summary of Contents:
1.2 Where can I get Window Maker? 1.2 Where can I get Window Maker?
1.3 Where are the mailing list archives? 1.3 Where are the mailing list archives?
1.4 Where is more documentation on configuring Window Maker? 1.4 Where is more documentation on configuring Window Maker?
1.5 What is an App Icon? 1.5 What is an appicon?
1.6 How can I get a question added to the FAQ? 1.6 How can I get a question added to the FAQ?
1.7 How do I report bugs? 1.7 How do I report bugs?
1.8 Is there an anonymous cvs server? 1.8 Is there an anonymous cvs server?
@@ -134,7 +134,7 @@ Introduction:
1.1 What is Window Maker? 1.1 What is Window Maker?
---------------------------------- ----------------------------------
Window Maker is an elegant X11 window manger that emulates the Window Maker is an elegant X11 window manager that emulates the
OpenStep desktop with some noticeable enhancements. Look at OpenStep desktop with some noticeable enhancements. Look at
http://wm.current.nu/themes/my-themes.html and http://wm.current.nu/themes/my-themes.html and
http://wm.current.nu/themes/screenshots.html http://wm.current.nu/themes/screenshots.html
@@ -507,7 +507,7 @@ exec wmaker
Things to try if it doesn't work: (somewhat fuzzy and random) Things to try if it doesn't work: (somewhat fuzzy and random)
This should do it although I did have problems sometimes initially which I This should do it although I did have problems sometimes initially which I
fixed by randomly trying absolute pathes for wmaker in .xsession/.xinitrc and/or fixed by randomly trying absolute paths for wmaker in .xsession/.xinitrc and/or
making the dtprofile/.xinitrc/etc executable. It helps logging in on the console making the dtprofile/.xinitrc/etc executable. It helps logging in on the console
(select from CDE login screen) and start X manually using 'X'. (select from CDE login screen) and start X manually using 'X'.
If it works that way it should work when logging into the CDE environment. If it works that way it should work when logging into the CDE environment.
@@ -628,7 +628,7 @@ the last app started by .xinitrc is closed.
the X server will be closed, and your session will end. the X server will be closed, and your session will end.
3.3 How do I "dock" AppIcons on the Clip? 3.3 How do I "dock" appicons on the Clip?
----------------------------------------- -----------------------------------------
Just drag icons near it like you would for the dock. Note that if you place Just drag icons near it like you would for the dock. Note that if you place
the clip near the dock, you may have problems docking appicons in either. the clip near the dock, you may have problems docking appicons in either.
@@ -674,7 +674,7 @@ David Reviejo <dreviejo@arrakis.es> best summed up this answer:
3.7 How do I "undock" AppIcons? 3.7 How do I "undock" appicons?
---------------------------------- ----------------------------------
If the program is not running, just drag the icon to the middle of your If the program is not running, just drag the icon to the middle of your
desktop (away from the dock and clip) and watch it disappear. desktop (away from the dock and clip) and watch it disappear.
@@ -731,7 +731,7 @@ These directories will be listed under the "Search Path" section of WPrefs.
3.11 When I run GNOME application they have no title bar. 3.11 When I run GNOME application they have no title bar.
---------------------------------- ----------------------------------
The GNOME toolkit decided to behave his own way, so it draws its own title bar The GNOME toolkit decided to behave in its own way, so it draws its own title bar
with buttons, and asks Window Maker to not draw anything (title bar, resize bar, with buttons, and asks Window Maker to not draw anything (title bar, resize bar,
close and miniaturise button, ...). close and miniaturise button, ...).
@@ -838,7 +838,7 @@ AlwaysUserIcon=Yes;
}; };
4.6 How do I get a Tile background for my AppIcons (those things in 4.6 How do I get a Tile background for my appicons (those things in
the dock)? the dock)?
---------------------------------- ----------------------------------
You need to change 1 line to your ~/GNUstep/Defaults/WindowMaker file. You need to change 1 line to your ~/GNUstep/Defaults/WindowMaker file.
@@ -868,9 +868,9 @@ Application Icon'' Option then Save, Apply and close the dialog.
This should allow you do dock the program normally. This should allow you do dock the program normally.
Emulate Appicon does exactly the same thing as dockit, a small app Emulate AppIcon does exactly the same thing as dockit, a small app
distributed with ancient versions of Window Maker before the Attribute distributed with ancient versions of Window Maker before the Attribute
Editor existed (now deprecated for the obvious reason). If Emulate Appicon Editor existed (now deprecated for the obvious reason). If Emulate AppIcon
does not work, dockit will not work either. Such applications violate the does not work, dockit will not work either. Such applications violate the
ICCCM (Inter-Client Communication Conventions Manual) and are considered ICCCM (Inter-Client Communication Conventions Manual) and are considered
badly coded for not setting the instance.class hints. badly coded for not setting the instance.class hints.
@@ -898,7 +898,7 @@ NoAppIcon=Yes;
4.9 How do I set a pixmap background? 4.9 How do I set a pixmap background?
---------------------------------- ----------------------------------
Here is the in depth explanation straight from the NEWS file: Here is the in-depth explanation straight from the NEWS file:
wmsetbg now accepts the following options: wmsetbg now accepts the following options:
usage: wmsetbg [-options] image usage: wmsetbg [-options] image
@@ -1476,7 +1476,7 @@ Themes:
8.1 What exactly are themes? 8.1 What exactly are themes?
---------------------------------- ----------------------------------
Themes are a great aspect of Window Maker allowing a user to simply Themes are a great aspect of Window Maker allowing a user to simply
save the entire 'look' of their desktop in a Archive to distribute freely among save the entire 'look' of their desktop in an archive to distribute freely among
friends, fellow users and/or the whole net in general. :) friends, fellow users and/or the whole net in general. :)
See the theme-HOWTO at http://wm.current.nu/themes/theme-HOWTO.html See the theme-HOWTO at http://wm.current.nu/themes/theme-HOWTO.html
+220 -1
View File
@@ -1,7 +1,225 @@
NEWS for veteran Window Maker users NEWS for veteran Window Maker users
----------------------------------- -----------------------------------
-- 0.95.10 -- 0.97.0
Directional window focus
------------------------
The keyboard focus can now be moved in a specific direction (left, right,
up, down) relative to the currently focused window, using window centres
for comparison. The shortcuts can be configured in WPrefs under
"Keyboard Shortcuts", or set directly in ~/GNUstep/Defaults/WindowMaker
via "FocusWindowLeftKey", "FocusWindowRightKey", "FocusWindowUpKey" and
"FocusWindowDownKey" (disabled by default).
The existing "CirculateRaise" option ("Raise window when switching focus
with keyboard" in WPrefs) also controls whether windows that are fully
obscured by others are raised when receiving focus this way.
Vim-like window marking
-----------------------
Windows can now be dynamically assigned a mark label (a key or
modifier+key combination) allowing them to be instantly recalled without
searching. This is inspired by vim's mark-and-jump navigation.
The mark label is displayed in the window list menu between the window
title and the workspace name.
Five actions can be configured in ~/GNUstep/Defaults/WindowMaker
(or in WPrefs under "Keyboard Shortcuts")
"MarkSetKey": assign a label to the focused window (e.g. with the
action bound to "Super+M", pressing "Super+M x" marks the focused
window with label 'x').
"MarkUnsetKey": remove the mark from a labeled window.
"MarkJumpKey": focus and raise the window with the given label.
"MarkBringKey": move the marked window to the current workspace and
focus it.
"MarkSwapKey": swap the focused window with the marked window.
Those are disabled by default.
Marks are persistent across sessions and saved in the WMState file.
Multi-key and sticky-chain keybindings
--------------------------------------
Keyboard shortcuts now support multi-key sequences, similar to
Emacs-style prefix bindings (e.g. pressing a leader key followed by
one or more continuation keys).
An optional sticky-chain mode allows a prefix key to remain active
until a cancel key is pressed or a timeout expires, making it possible
to trigger multiple actions in sequence without re-entering the prefix.
New options in ~/GNUstep/Defaults/WindowMaker:
"KeychainTimeoutDelay" is the timeout in milliseconds after which an
active chain expires. Default is 500. Set to 0 to disable the
timeout.
"KeychainCancelKey" sets a key to explicitly cancel an active chain.
(disabled by default).
Configurable modifier key labels
---------------------------------
A new "ModifierKeyShortLabels" option in ~/GNUstep/Defaults/WindowMaker
allows customizing the labels shown for modifier keys in menus and
keyboard shortcut displays. Unicode symbols can be used in place of the
default text labels. For example to use the same symbol as defined on
MacOS:
ModifierKeyShortLabels = (
"\342\207\247",
"\342\214\203",
"\342\214\245",
"\342\207\255",
"\342\207\263",
"\342\214\230",
"\342\207\252",
"\342\227\206",
"\342\214\245"
);
Configurable mouse wheel focus behavior
----------------------------------------
Scrolling the mouse wheel over a window can now optionally move the
keyboard focus to that window. The option is available in WPrefs under
"Expert User Preferences", or by setting "MouseWheelFocusEnable" in
~/GNUstep/Defaults/WindowMaker (NO by default).
Application icons in the window list
-------------------------------------
Application icons can now be shown in the window list menu. This behavior
can be configured by setting the "WindowListAppIcons" option in
~/GNUstep/Defaults/WindowMaker or "Show app icons in window list." in
WPrefs under "Expert User Preferences" (NO by default).
Configurable screenshot filename template
-----------------------------------------
The filename (strftime compatible) format used when saving screenshots
can now be customized by setting the "ScreenshotFileNameTemplate"
option in ~/GNUstep/Defaults/WindowMaker. The default remains the
format introduced in 0.96.0.
JPEG XL image support
---------------------
WRaster can now optionally load JPEG XL images if the libjxl
library is present at build time. The feature can be toggled at
configure time with --enable-jxl/--disable-jxl.
wmiv: archive files and unknown format handling
-----------------------------------------------
wmiv can now open images stored inside archive files (with libarchive).
A new option to silently skip unknown image formats is also available.
It supports ctrl+c shortcut to copy the current image to the clipboard.
Support for _NET_WM_MOVERESIZE
------------------------------
Window Maker now handles the _NET_WM_MOVERESIZE EWMH message, which
allows applications to initiate interactive window moves and resizes
through a standard protocol request (for those applications without
decorations: VS Code, Google Chrome, Steam and Discord, ...).
Cycle windows across all workspaces
-----------------------------------
A new 'Cycle all windows from all workspaces' expert option allows
the Alt-Tab window switcher to include windows from all workspaces,
not only the current one. Which is the "CycleAllWorkspaces" option
in ~/GNUstep/Defaults/WindowMaker (NO by default).
RandR and multi-monitor improvements
------------------------------------
RandR version >= 1.3 is automatically enabled when detected. By default,
it operates in static mode, requiring the screen layout to be defined
manually. A new "HotplugMonitor" option in ~/GNUstep/Defaults/WindowMaker
(NO by default) enables automatic monitor detection on hotplug events,
adding newly connected monitors to the right of the existing layout.
This option is also available in WPrefs expert panel under
"Automatically (de)activate monitors on hotplug events".
Titlebar language button revamp
-------------------------------
When the modelock feature is enabled, the legacy hardcoded language
dropdown icons in the titlebar are replaced by a compact button
displaying the short name of the current XKB locale (those are
basically the layouts displayed via setxkbmap -query).
Clicking the button cycles through up to four keyboard layouts
(matching the four XKB groups). The xkbfile library is required for
this feature.
-- 0.96.0
Hot Corners feature
-------------------
Screen corners can be assigned an external command to be
executed when the mouse pointer is entering those areas.
In WPrefs, "Hot Corner Shortcut Preferences" can be used
for configuration or by manually adding a "HotCorners" key
and value to "YES" in the ~/GNUstep/Defaults/WindowMaker file.
Hot Corners feature is disabled by default.
Actions are specified by the "HotCornerActions" and are defined
as a four entries list ("top left action", "top right action",
"bottom left action", "bottom right action").
A screen corner area is a cube shape defined by the "HotCornerEdge"
which is a number of pixels from 2 (by default) to 10.
To lower the risk of triggering that feature accidentally a
"HotCornerDelay" key can be used which is the time before the action
is triggered while the pointer is in one of the screen corner.
Default value is 250 ms.
Screenshot capture feature
--------------------------
In WPrefs "Keyboard Shortcut Preferences" tab, three new actions can
be configured: "Capture a portion of the screen", "Capture a window",
"Capture the entire screen". The file is saved in
~/GNUstep/Library/WindowMaker/Screenshots directory under a filename
format "screenshot_%Y-%m-%d_at_%H:%M:%S" followed by the extension.
Which can be png or jpg based on WRaster dependencies.
libXRes is now an optional dependency
-------------------------------------
XRes the resource extension for the X protocol is used to find the
underlying processes (and PIDs) responsible for displaying the windows.
Support for _NET_WM_FULLSCREEN_MONITORS hint
--------------------------------------------
That hint allows applications that support it to be set as fullscreen on multiple heads.
It depends on Xinerama extension support.
Keep dock on primary head Keep dock on primary head
------------------------- -------------------------
@@ -10,6 +228,7 @@ To keep the dock on the primary head in a multi-head setup, set the option
"KeepDockOnPrimaryHead" in ~/GNUstep/Defaults/WindowMaker to "YES" or click "KeepDockOnPrimaryHead" in ~/GNUstep/Defaults/WindowMaker to "YES" or click
"Keep dock on primary head" under the WPrefs "Expert User Preferences" tab. "Keep dock on primary head" under the WPrefs "Expert User Preferences" tab.
-- 0.95.9 -- 0.95.9
Configurable SwitchPanel Configurable SwitchPanel
+7 -1
View File
@@ -1,3 +1,9 @@
Changes since wmaker 0.96.0:
............................
- added W_KeycodeToKeysym to replace XKeycodeToKeysym/XkbKeycodeToKeysym calls
Changes since wmaker 0.92.0: Changes since wmaker 0.92.0:
............................ ............................
@@ -134,7 +140,7 @@ Changes since wmaker 0.64.0:
- Moved all internal handlers (timer, idle and input) to handlers.c - Moved all internal handlers (timer, idle and input) to handlers.c
- simplified wevent.c and wutil.c. - simplified wevent.c and wutil.c.
- fixed handling of input with poll (was broken) - fixed handling of input with poll (was broken)
- fixed mem leak that occured when input handling was done with poll - fixed mem leak that occurred when input handling was done with poll
- simpler and more straightforward event handling for timer, idle, input - simpler and more straightforward event handling for timer, idle, input
and X events (also fixed some problems the old handling logic had) and X events (also fixed some problems the old handling logic had)
- moved timer, idle and input handler definitions and prototypes from - moved timer, idle and input handler definitions and prototypes from
+3 -2
View File
@@ -24,8 +24,9 @@
#include <WINGs/WINGs.h> #include <WINGs/WINGs.h>
#include <WINGs/WUtil.h> #include <WINGs/WUtil.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdnoreturn.h>
void wAbort() noreturn void wAbort(void)
{ {
exit(0); exit(0);
} }
@@ -40,7 +41,7 @@ void show(WMWidget * self, void *data)
WMSetLabelText(l, buf); WMSetLabelText(l, buf);
} }
void quit(WMWidget * self, void *data) noreturn void quit(WMWidget * self, void *data)
{ {
(void) self; (void) self;
(void) data; (void) data;
+3 -3
View File
@@ -10,7 +10,7 @@ include_HEADERS = wtableview.h wtabledelegates.h
lib_LTLIBRARIES = libExtraWINGs.la lib_LTLIBRARIES = libExtraWINGs.la
noinst_PROGRAMS = test noinst_PROGRAMS = tableview
EXTRA_DIST = EXTRA_DIST =
@@ -25,6 +25,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \ LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \ $(top_builddir)/WINGs/libWUtil.la \
@XFT_LIBS@ @INTLIBS@ @XFT_LIBS@ @INTLIBS@ @XLIBS@
test_LDADD = wtableview.o wtabledelegates.o $(LDADD) tableview_LDADD = wtableview.o wtabledelegates.o $(LDADD)
@@ -19,13 +19,18 @@ static char *options[] = {
int numberOfRows(WMTableViewDelegate * self, WMTableView * table) int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
{ {
(void) self;
(void) table;
return 20; return 20;
} }
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row) void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
{ {
(void) self;
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */ /*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
int i; int i;
if (col1[0] == 0) { if (col1[0] == 0) {
for (i = 0; i < 20; i++) { for (i = 0; i < 20; i++) {
char buf[128]; char buf[128];
@@ -44,6 +49,8 @@ void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data) void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
{ {
(void) self;
if ((uintptr_t)WMGetTableColumnId(column) == 1) if ((uintptr_t)WMGetTableColumnId(column) == 1)
col1[row] = data; col1[row] = data;
else else
@@ -59,6 +66,7 @@ static WMTableViewDelegate delegate = {
void clickedTable(WMWidget * w, void *self) void clickedTable(WMWidget * w, void *self)
{ {
(void) w;
int row = WMGetTableViewClickedRow((WMTableView *) self); int row = WMGetTableViewClickedRow((WMTableView *) self);
WMEditTableViewRow(self, row); WMEditTableViewRow(self, row);
+14 -8
View File
@@ -2,6 +2,8 @@
#include <WINGs/WINGsP.h> #include <WINGs/WINGsP.h>
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
#include <stdint.h> #include <stdint.h>
#include <math.h>
#include <float.h>
#include "wtableview.h" #include "wtableview.h"
@@ -274,7 +276,7 @@ static void adjustScrollers(WMTableView * table)
prop = 1.0; prop = 1.0;
} else { } else {
oprop = WMGetScrollerKnobProportion(table->hscroll); oprop = WMGetScrollerKnobProportion(table->hscroll);
if (oprop == 0.0) if (fabs(oprop) <= DBL_EPSILON)
oprop = 1.0; oprop = 1.0;
ovalue = WMGetScrollerValue(table->hscroll); ovalue = WMGetScrollerValue(table->hscroll);
@@ -290,7 +292,7 @@ static void adjustScrollers(WMTableView * table)
prop = 1.0; prop = 1.0;
} else { } else {
oprop = WMGetScrollerKnobProportion(table->vscroll); oprop = WMGetScrollerKnobProportion(table->vscroll);
if (oprop == 0.0) if (fabs(oprop) <= DBL_EPSILON)
oprop = 1.0; oprop = 1.0;
ovalue = WMGetScrollerValue(table->vscroll); ovalue = WMGetScrollerValue(table->vscroll);
@@ -332,7 +334,7 @@ static void doScroll(WMWidget * self, void *data)
case WSIncrementWheel: case WSIncrementWheel:
case WSIncrementLine: case WSIncrementLine:
value += (float)table->rowHeight / size; value += (float)table->rowHeight / size;
if (value > 1.0) if (value > (float)1.0)
value = 1.0; value = 1.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self)); WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table); repaintTable(table);
@@ -344,7 +346,7 @@ static void doScroll(WMWidget * self, void *data)
case WSDecrementPage: case WSDecrementPage:
value -= vpsize / size; value -= vpsize / size;
if (value < 0.0) if (value < (float)0.0)
value = 0.0; value = 0.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self)); WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table); repaintTable(table);
@@ -352,7 +354,7 @@ static void doScroll(WMWidget * self, void *data)
case WSIncrementPage: case WSIncrementPage:
value += vpsize / size; value += vpsize / size;
if (value > 1.0) if (value > (float)1.0)
value = 1.0; value = 1.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self)); WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table); repaintTable(table);
@@ -398,6 +400,7 @@ static void doScroll(WMWidget * self, void *data)
static void splitterHandler(XEvent * event, void *data) static void splitterHandler(XEvent * event, void *data)
{ {
(void) event;
WMTableColumn *column = (WMTableColumn *) data; WMTableColumn *column = (WMTableColumn *) data;
WMTableView *table = column->table; WMTableView *table = column->table;
int done = 0; int done = 0;
@@ -451,6 +454,8 @@ static void splitterHandler(XEvent * event, void *data)
static void realizeTable(void *data, WMNotification * notif) static void realizeTable(void *data, WMNotification * notif)
{ {
(void) notif;
repaintTable(data); repaintTable(data);
} }
@@ -790,7 +795,6 @@ void WMSetTableViewRowHeight(WMTableView * table, int height)
void WMScrollTableViewRowToVisible(WMTableView * table, int row) void WMScrollTableViewRowToVisible(WMTableView * table, int row)
{ {
WMScroller *scroller;
WMRange range; WMRange range;
WMRect rect; WMRect rect;
int newY, tmp; int newY, tmp;
@@ -798,7 +802,6 @@ void WMScrollTableViewRowToVisible(WMTableView * table, int row)
rect = getVisibleRect(table); rect = getVisibleRect(table);
range = rowsInRect(table, rect); range = rowsInRect(table, rect);
scroller = table->vscroll;
if (row < range.position) { if (row < range.position) {
newY = row * table->rowHeight - rect.size.height / 2; newY = row * table->rowHeight - rect.size.height / 2;
@@ -1157,6 +1160,8 @@ static void handleEvents(XEvent * event, void *data)
static void handleResize(W_ViewDelegate * self, WMView * view) static void handleResize(W_ViewDelegate * self, WMView * view)
{ {
(void) self;
reorganizeInterior(view->self); reorganizeInterior(view->self);
} }
@@ -1167,7 +1172,8 @@ static void reorganizeInterior(WMTableView * table)
WMSize size = getTotalSize(table); WMSize size = getTotalSize(table);
WMView *view = table->view; WMView *view = table->view;
int vw, vh; int vw, vh;
int hsThickness, vsThickness; int hsThickness = 0;
int vsThickness = 0;
if (table->vscroll) if (table->vscroll)
vsThickness = WMWidgetWidth(table->vscroll); vsThickness = WMWidgetWidth(table->vscroll);
+3 -1
View File
@@ -1,7 +1,9 @@
** API and ABI modifications since wmaker 0.92.0 ** API and ABI modifications since wmaker 0.96.0
----------------------------------------------------
** libWINGs ** ** libWINGs **
<WINGsP.h> <WINGsP.h>
W_KeycodeToKeysym ADDED
struct W_DragDestinationInfo: new members added SIZE CHANGE struct W_DragDestinationInfo: new members added SIZE CHANGE
<WINGs.h> <WINGs.h>
+2 -1
View File
@@ -17,4 +17,5 @@ wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \ AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFT_CFLAGS@ @HEADER_SEARCH_PATH@ -DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFT_CFLAGS@ @HEADER_SEARCH_PATH@ \
@PANGO_CFLAGS@
+1
View File
@@ -64,6 +64,7 @@ static W_Class myWidgetClass = 0;
*/ */
W_Class InitMyWidget(WMScreen * scr) W_Class InitMyWidget(WMScreen * scr)
{ {
(void)scr;
/* register our widget with WINGs and get our widget class ID */ /* register our widget with WINGs and get our widget class ID */
if (!myWidgetClass) { if (!myWidgetClass) {
myWidgetClass = W_RegisterUserWidget(); myWidgetClass = W_RegisterUserWidget();
+1 -1
View File
@@ -4,7 +4,7 @@
#include "mywidget.h" #include "mywidget.h"
void wAbort() _Noreturn void wAbort(void)
{ {
exit(1); exit(1);
} }
+4 -7
View File
@@ -19,14 +19,14 @@
#include "logo.xpm" #include "logo.xpm"
void wAbort() _Noreturn void wAbort(void)
{ {
exit(1); exit(1);
} }
char *ProgName; char *ProgName;
void usage(void) _Noreturn void usage(void)
{ {
fprintf(stderr, fprintf(stderr,
"usage:\n" "usage:\n"
@@ -53,13 +53,10 @@ int main(int argc, char **argv)
WMPixmap *pixmap; WMPixmap *pixmap;
WMOpenPanel *oPanel; WMOpenPanel *oPanel;
WMSavePanel *sPanel; WMSavePanel *sPanel;
/* RImage *image; */
char *title = NULL; char *title = NULL;
char *initial = "/"; char *initial = "/";
int ch; int ch;
int panelType = OPEN_PANEL_TYPE; int panelType = OPEN_PANEL_TYPE;
extern char *optarg;
extern int optind;
if (!dpy) { if (!dpy) {
puts("could not open display"); puts("could not open display");
@@ -96,14 +93,14 @@ int main(int argc, char **argv)
if (panelType == SAVE_PANEL_TYPE) { if (panelType == SAVE_PANEL_TYPE) {
sPanel = WMGetSavePanel(scr); sPanel = WMGetSavePanel(scr);
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial, if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
/*title */ NULL, NULL) == True) title, NULL) == True)
printf("%s\n", WMGetFilePanelFileName(sPanel)); printf("%s\n", WMGetFilePanelFileName(sPanel));
else else
printf("\n"); printf("\n");
} else { } else {
oPanel = WMGetOpenPanel(scr); oPanel = WMGetOpenPanel(scr);
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial, if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
/*title */ NULL, NULL) == True) title, NULL) == True)
printf("%s\n", WMGetFilePanelFileName(oPanel)); printf("%s\n", WMGetFilePanelFileName(oPanel));
else else
printf("\n"); printf("\n");
+2 -4
View File
@@ -11,14 +11,14 @@
#include "logo.xpm" #include "logo.xpm"
void wAbort() _Noreturn void wAbort(void)
{ {
exit(1); exit(1);
} }
char *ProgName; char *ProgName;
void usage(void) _Noreturn void usage(void)
{ {
fprintf(stderr, fprintf(stderr,
"usage:\n" "usage:\n"
@@ -45,8 +45,6 @@ int main(int argc, char **argv)
char *initial = NULL; char *initial = NULL;
char *result = NULL; char *result = NULL;
int ch; int ch;
extern char *optarg;
extern int optind;
WMInitializeApplication("WMQuery", &argc, argv); WMInitializeApplication("WMQuery", &argc, argv);
+19 -3
View File
@@ -14,7 +14,7 @@
* This will be called when the application will be terminated because * This will be called when the application will be terminated because
* of a fatal error (only for memory allocation failures ATM). * of a fatal error (only for memory allocation failures ATM).
*/ */
void wAbort() _Noreturn void wAbort(void)
{ {
exit(1); exit(1);
} }
@@ -25,6 +25,7 @@ int windowCount = 0;
void closeAction(WMWidget * self, void *data) void closeAction(WMWidget * self, void *data)
{ {
(void)data;
WMDestroyWidget(self); WMDestroyWidget(self);
windowCount--; windowCount--;
printf("window closed, window count = %d\n", windowCount); printf("window closed, window count = %d\n", windowCount);
@@ -165,10 +166,13 @@ void testBox(WMScreen * scr)
static void singleClick(WMWidget * self, void *data) static void singleClick(WMWidget * self, void *data)
{ {
(void)self;
(void)data;
} }
static void doubleClick(WMWidget * self, void *data) static void doubleClick(WMWidget * self, void *data)
{ {
(void)data;
WMSelectAllListItems((WMList *) self); WMSelectAllListItems((WMList *) self);
} }
@@ -480,6 +484,7 @@ void testColorPanel(WMScreen * scr)
void sliderCallback(WMWidget * w, void *data) void sliderCallback(WMWidget * w, void *data)
{ {
(void)data;
printf("SLIDER == %i\n", WMGetSliderValue(w)); printf("SLIDER == %i\n", WMGetSliderValue(w));
} }
@@ -516,7 +521,7 @@ void testSlider(WMScreen * scr)
void testTextField(WMScreen * scr) void testTextField(WMScreen * scr)
{ {
WMWindow *win; WMWindow *win;
WMTextField *field, *field2; WMTextField *field, *field2, *field3;
windowCount++; windowCount++;
@@ -535,6 +540,11 @@ void testTextField(WMScreen * scr)
WMMoveWidget(field2, 20, 50); WMMoveWidget(field2, 20, 50);
WMSetTextFieldAlignment(field2, WARight); WMSetTextFieldAlignment(field2, WARight);
field3 = WMCreateTextField(win);
WMResizeWidget(field3, 200, 20);
WMMoveWidget(field3, 20, 80);
WMSetTextFieldAlignment(field3, WACenter);
WMRealizeWidget(win); WMRealizeWidget(win);
WMMapSubwidgets(win); WMMapSubwidgets(win);
WMMapWidget(win); WMMapWidget(win);
@@ -749,6 +759,8 @@ void testTabView(WMScreen * scr)
void splitViewConstrainProc(WMSplitView * sPtr, int indView, int *minSize, int *maxSize) void splitViewConstrainProc(WMSplitView * sPtr, int indView, int *minSize, int *maxSize)
{ {
(void)sPtr;
switch (indView) { switch (indView) {
case 0: case 0:
*minSize = 20; *minSize = 20;
@@ -782,6 +794,7 @@ static void resizeSplitView(XEvent * event, void *data)
void appendSubviewButtonAction(WMWidget * self, void *data) void appendSubviewButtonAction(WMWidget * self, void *data)
{ {
(void)self;
WMSplitView *sPtr = (WMSplitView *) data; WMSplitView *sPtr = (WMSplitView *) data;
char buf[64]; char buf[64];
WMLabel *label = WMCreateLabel(sPtr); WMLabel *label = WMCreateLabel(sPtr);
@@ -796,6 +809,7 @@ void appendSubviewButtonAction(WMWidget * self, void *data)
void removeSubviewButtonAction(WMWidget * self, void *data) void removeSubviewButtonAction(WMWidget * self, void *data)
{ {
(void)self;
WMSplitView *sPtr = (WMSplitView *) data; WMSplitView *sPtr = (WMSplitView *) data;
int count = WMGetSplitViewSubviewsCount(sPtr); int count = WMGetSplitViewSubviewsCount(sPtr);
@@ -808,12 +822,14 @@ void removeSubviewButtonAction(WMWidget * self, void *data)
void orientationButtonAction(WMWidget * self, void *data) void orientationButtonAction(WMWidget * self, void *data)
{ {
(void)self;
WMSplitView *sPtr = (WMSplitView *) data; WMSplitView *sPtr = (WMSplitView *) data;
WMSetSplitViewVertical(sPtr, !WMGetSplitViewVertical(sPtr)); WMSetSplitViewVertical(sPtr, !WMGetSplitViewVertical(sPtr));
} }
void adjustSubviewsButtonAction(WMWidget * self, void *data) void adjustSubviewsButtonAction(WMWidget * self, void *data)
{ {
(void)self;
WMAdjustSplitViewSubviews((WMSplitView *) data); WMAdjustSplitViewSubviews((WMSplitView *) data);
} }
@@ -902,7 +918,7 @@ void testSplitView(WMScreen * scr)
WMMapWidget(win); WMMapWidget(win);
} }
void testUD() void testUD(void)
{ {
WMUserDefaults *defs; WMUserDefaults *defs;
char str[32]; char str[32];
+7 -1
View File
@@ -26,7 +26,7 @@
#include <WINGs/WUtil.h> #include <WINGs/WUtil.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#define WINGS_H_VERSION 20210726 #define WINGS_H_VERSION 20230226
#ifdef __cplusplus #ifdef __cplusplus
@@ -1462,6 +1462,10 @@ void WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag);
Bool WMGetPopUpButtonEnabled(WMPopUpButton *bPtr); Bool WMGetPopUpButtonEnabled(WMPopUpButton *bPtr);
int WMSelectPopUpButtonPreviousItem(WMPopUpButton *bPtr);
int WMSelectPopUpButtonNextItem(WMPopUpButton *bPtr);
/* ---[ WINGs/wprogressindicator.c ]------------------------------------- */ /* ---[ WINGs/wprogressindicator.c ]------------------------------------- */
WMProgressIndicator* WMCreateProgressIndicator(WMWidget *parent); WMProgressIndicator* WMCreateProgressIndicator(WMWidget *parent);
@@ -1529,6 +1533,8 @@ void WMSetScrollViewRelief(WMScrollView *sPtr, WMReliefType type);
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr); WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
void WMScrollViewScrollPoint(WMScrollView * sPtr, WMPoint point);
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr); WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
WMScroller* WMGetScrollViewVerticalScroller(WMScrollView *sPtr); WMScroller* WMGetScrollViewVerticalScroller(WMScrollView *sPtr);
+2
View File
@@ -494,6 +494,8 @@ void W_SetPreeditPositon(W_View *view, int x, int y);
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
int buflen, KeySym *keysym, Status *status); int buflen, KeySym *keysym, Status *status);
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index);
/* ---[ wmisc.c ]--------------------------------------------------------- */ /* ---[ wmisc.c ]--------------------------------------------------------- */
+1 -1
View File
@@ -615,7 +615,7 @@ static void menu_parser_condition_ifmacro(WMenuParser parser, Bool check_exists)
((!check_exists) && (macro != NULL)); ((!check_exists) && (macro != NULL));
} }
strcpy(parser->cond.stack[0].name, cmd_name); strncpy(parser->cond.stack[0].name, cmd_name, sizeof(parser->cond.stack[0].name) - 1);
parser->cond.stack[0].line = parser->line_number; parser->cond.stack[0].line = parser->line_number;
} }
+6 -2
View File
@@ -167,6 +167,7 @@ void menu_parser_define_macro(WMenuParser parser)
return; return;
} }
macro = wmalloc(sizeof(*macro)); macro = wmalloc(sizeof(*macro));
memset(arg_name, 0, MAX_MACRO_ARG_COUNT * sizeof(char *));
/* Isolate name of macro */ /* Isolate name of macro */
idx = 0; idx = 0;
@@ -279,7 +280,8 @@ WParserMacro *menu_parser_find_macro(WMenuParser parser, const char *name)
continue; continue;
return macro; return macro;
check_next_macro: ; check_next_macro:
;
} }
return NULL; return NULL;
} }
@@ -391,6 +393,8 @@ void menu_parser_expand_macro(WMenuParser parser, WParserMacro *macro)
unsigned int size; unsigned int size;
int i, space_left; int i, space_left;
memset(arg_value, 0, MAX_MACRO_ARG_COUNT * sizeof(char *));
/* Skip the name of the macro, this was not done by caller */ /* Skip the name of the macro, this was not done by caller */
for (i = 0; macro->name[i] != '\0'; i++) for (i = 0; macro->name[i] != '\0'; i++)
parser->rd++; parser->rd++;
@@ -692,7 +696,7 @@ static void w_create_macro(WMenuParser parser, const char *name, WParserMacroFun
WParserMacro *macro; WParserMacro *macro;
macro = wmalloc(sizeof(*macro)); macro = wmalloc(sizeof(*macro));
strcpy(macro->name, name); strncpy(macro->name, name, sizeof(macro->name) - 1);
macro->function = handler; macro->function = handler;
macro->arg_count = -1; macro->arg_count = -1;
macro->next = parser->macros; macro->next = parser->macros;
+1 -1
View File
@@ -4,7 +4,7 @@ CATALOGS = @WINGSMOFILES@
CLEANFILES = $(CATALOGS) $(DOMAIN).pot CLEANFILES = $(CATALOGS) $(DOMAIN).pot
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po fy.po hu.po nl.po sk.po EXTRA_DIST = bg.po ca.po cs.po de.po fr.po fy.po hu.po nl.po sk.po sr.po
# WUtil files: # WUtil files:
POTFILES = \ POTFILES = \
+1
View File
@@ -9,6 +9,7 @@ sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org> bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
nl.po Dutch Alwin <translations@ziggo.nl> nl.po Dutch Alwin <translations@ziggo.nl>
fy.po Frisian Alwin <translations@ziggo.nl> fy.po Frisian Alwin <translations@ziggo.nl>
sr.po Serbian Strahinya Radich <sr@strahinja.org>
Notes Notes
----- -----
+1
View File
@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 2003-02-09 12:10+0200\n" "PO-Revision-Date: 2003-02-09 12:10+0200\n"
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n" "Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n" "Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"Language: bg\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2003-09-16 23:16+0200\n" "PO-Revision-Date: 2003-09-16 23:16+0200\n"
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n" "Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
"Language-Team: Catalan <ca@dodds.net>\n" "Language-Team: Catalan <ca@dodds.net>\n"
"Language: ca\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2001-10-11 22:00+0100\n" "PO-Revision-Date: 2001-10-11 22:00+0100\n"
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n" "Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
"Language-Team: Czech <cz@li.org>\n" "Language-Team: Czech <cz@li.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n" "Content-Transfer-Encoding: unknown\n"
+1
View File
@@ -15,6 +15,7 @@ msgstr ""
"PO-Revision-Date: 2004-11-05 23:48+0100\n" "PO-Revision-Date: 2004-11-05 23:48+0100\n"
"Last-Translator: shlomme@gmx.net\n" "Last-Translator: shlomme@gmx.net\n"
"Language-Team: German\n" "Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2002-01-09 21:20+0100\n" "PO-Revision-Date: 2002-01-09 21:20+0100\n"
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n" "Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
"Language-Team: Français <fr@li.org>\n" "Language-Team: Français <fr@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n" "Content-Transfer-Encoding: unknown\n"
+1 -1
View File
@@ -1,5 +1,5 @@
# Translation into Western Frisian for Window Maker # Translation into Western Frisian for Window Maker
# Copyright (C) 2015-2016 Window Maker Developers Team # Copyright (C) 2015-2019 Window Maker Developers Team
# This file is distributed under the same license as the windowmaker package. # This file is distributed under the same license as the windowmaker package.
# Original by Alwin <translations@ziggo.nl>, 2015. # Original by Alwin <translations@ziggo.nl>, 2015.
# #
+1 -1
View File
@@ -11,7 +11,7 @@ msgstr ""
"PO-Revision-Date: 2014-02-18 00:25+0100\n" "PO-Revision-Date: 2014-02-18 00:25+0100\n"
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n" "Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
"Language-Team: Hungarian\n" "Language-Team: Hungarian\n"
"Language: \n" "Language: hu\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1 -7
View File
@@ -1,5 +1,5 @@
# New translation into Dutch for Window Maker # New translation into Dutch for Window Maker
# Copyright (C) 2014-2015 Window Maker Developers Team # Copyright (C) 2014-2019 Window Maker Developers Team
# This file is distributed under the same license as the windowmaker package. # This file is distributed under the same license as the windowmaker package.
# Original by Alwin <translations@ziggo.nl>, 2014. # Original by Alwin <translations@ziggo.nl>, 2014.
# #
@@ -843,9 +843,6 @@ msgstr "Kon invoerbestand \"%s\" niet openen"
msgid "Could not create target file \"%s\"" msgid "Could not create target file \"%s\""
msgstr "Kon doelbestand \"%s\" niet aanmaken" msgstr "Kon doelbestand \"%s\" niet aanmaken"
msgid "An error occured browsing '%s'."
msgstr "Er trad 'n fout op bij bladeren door '%s'."
msgid "" msgid ""
"invalid characted '%c' in arg-list for macro \"%s\" while expecting " "invalid characted '%c' in arg-list for macro \"%s\" while expecting "
"parameter name" "parameter name"
@@ -860,9 +857,6 @@ msgstr ""
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' " "ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' "
"of ')'" "of ')'"
msgid "unknow directive '#%s'"
msgstr "onbekende aanwijzing '#%s'"
msgid "found #%s but have no matching #if" msgid "found #%s but have no matching #if"
msgstr "#%s gevonden, maar heeft geen bijbehorende #if" msgstr "#%s gevonden, maar heeft geen bijbehorende #if"
+1
View File
@@ -19,6 +19,7 @@ msgstr ""
"PO-Revision-Date: 2001-12-20 04:00+0100\n" "PO-Revision-Date: 2001-12-20 04:00+0100\n"
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n" "Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
"Language-Team: Slovak <sk@li.org>\n" "Language-Team: Slovak <sk@li.org>\n"
"Language: sk\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+806
View File
@@ -0,0 +1,806 @@
# Serbian messages for Window Maker
# Copyright (C) 1997-2006 Alfredo K. Kojima
# 1998-2006 Dan Pascu
# 2013-2020 Window Maker Developers Team
# This file is distributed under the same license as the Window Maker package.
# Strahinya Radich (Страхиња Радић) <sr@strahinja.org>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: WindowMaker 0.96.0\n"
"Report-Msgid-Bugs-To: wmaker-dev@googlegroups.com\n"
"POT-Creation-Date: 2023-11-02 19:36+0100\n"
"PO-Revision-Date: 2023-11-02 19:48+0100\n"
"Last-Translator: Страхиња Радић <sr@strahinja.org>\n"
"Language-Team: Serbian <sr@li.org>\n"
"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: poe 1.6.0-1-g10e6dcc\n"
#: ../../WINGs/error.c:106
msgid "fatal: "
msgstr "фатално: "
#: ../../WINGs/error.c:112
msgid "error: "
msgstr "грешка: "
#: ../../WINGs/error.c:118
msgid "warning: "
msgstr "упозорење: "
#: ../../WINGs/findfile.c:59
#, c-format
msgid "could not get password entry for UID %i"
msgstr "не може се добавити унос лозинке за UID %i"
#: ../../WINGs/findfile.c:89
#, c-format
msgid "could not get password entry for user %s"
msgstr "не може се добавити унос лозинке за корисника %s"
#: ../../WINGs/findfile.c:208
#, c-format
msgid "could not expand %s"
msgstr "не може се проширити %s"
#: ../../WINGs/findfile.c:437
#, c-format
msgid "Could not open input file \"%s\": %s"
msgstr "Не може се отворити улазна датотека „%s“: %s"
#: ../../WINGs/findfile.c:453
#, c-format
msgid "Could not create target file \"%s\": %s"
msgstr "Не може се креирати одредишна датотека „%s“: %s"
#: ../../WINGs/findfile.c:461
msgid "could not allocate memory for the copy buffer"
msgstr "не може се алоцирати меморија за бафер за копирање"
#: ../../WINGs/findfile.c:478
#, c-format
msgid "could not read from file \"%s\": %s"
msgstr "не може се прочитати датотека „%s“: %s"
#: ../../WINGs/findfile.c:493
#, c-format
msgid "could not write data to file \"%s\": %s"
msgstr "не могу се уписати подаци у датотеку „%s“: %s"
#: ../../WINGs/findfile.c:505
#, c-format
msgid "could not set permission 0%03o on file \"%s\": %s"
msgstr "не може се поставити дозвола 0%03o на датотеци „%s“: %s"
#: ../../WINGs/findfile.c:509
#, c-format
msgid "could not close the file \"%s\": %s"
msgstr "не може се затворити датотека „%s“: %s"
#: ../../WINGs/menuparser.c:110
#, c-format
msgid " included from file \"%s\" at line %d"
msgstr " укључена из датотеке „%s“ у реду %d"
#: ../../WINGs/menuparser.c:142
#, c-format
msgid "missing #endif to match #%s at line %d"
msgstr "недостаје #endif који би одговарао #%s у реду %d"
#: ../../WINGs/menuparser.c:200
msgid "multiple SHORTCUT definition not valid"
msgstr "вишеструка дефиниција SHORTCUT није исправна"
#: ../../WINGs/menuparser.c:253
msgid "premature end of file while expecting a new line after '\\'"
msgstr "прерани крај датотеке док се очекивао нови ред после „\\“"
#: ../../WINGs/menuparser.c:279
#, c-format
msgid "reached end of file while searching '*/' for comment started at line %d"
msgstr "достигнут крај датотеке приликом тражења „*/“ за коментар започет у реду %d"
#: ../../WINGs/menuparser.c:344
msgid "missing closing double-quote before end-of-line"
msgstr "недостаје завршни наводник пре краја реда"
#: ../../WINGs/menuparser.c:362
msgid "missing closing simple-quote before end-of-line"
msgstr "недостаје завршни апостроф пре краја реда"
#: ../../WINGs/menuparser.c:380
msgid "too many nested macro expansions, breaking loop"
msgstr "превише угњеждених проширења макроа, прекида се петља"
#: ../../WINGs/menuparser.c:439
#, c-format
msgid "unknown directive '#%s'"
msgstr "непозната директива „#%s“"
#: ../../WINGs/menuparser.c:444
#, c-format
msgid "extra text after '#' command is ignored: \"%.16s...\""
msgstr "сувишни текст после наредбе „#“ је игнорисан: „%.16s...“"
#: ../../WINGs/menuparser.c:459
msgid "no file name found for #include"
msgstr "назив датотеке у #include-у није пронађен"
#: ../../WINGs/menuparser.c:471
msgid "file name must be enclosed in brackets or double-quotes for #define"
msgstr "назив датотеке у #define-у мора бити окружен угластим заградама или наводницима"
#: ../../WINGs/menuparser.c:485
#, c-format
msgid "missing closing '%c' in filename specification"
msgstr "недостаје завршно „%c“ у задавању назива датотеке"
#: ../../WINGs/menuparser.c:503
msgid "too many nested #include's"
msgstr "превише угњеждених #include-ова"
#: ../../WINGs/menuparser.c:568
#, c-format
msgid "could not find file \"%s\" for #include"
msgstr "не може се наћи датотека „%s“ у #include-у"
#: ../../WINGs/menuparser.c:589
#, c-format
msgid "missing macro name argument to #%s"
msgstr "недостаје аргумент #%s - назив макроа"
#: ../../WINGs/menuparser.c:600
msgid "too many nested #if sequences"
msgstr "превише угњеждених секвенци #if"
#: ../../WINGs/menuparser.c:626 ../../WINGs/menuparser.c:643
#, c-format
msgid "found #%s but has no matching #if"
msgstr "пронађено #%s, али без одговарајућег #if"
#: ../../WINGs/menuparser_macros.c:166
msgid "no macro name found for #define"
msgstr "назив макроа за #define није пронађен"
#: ../../WINGs/menuparser_macros.c:188
#, c-format
msgid "premature end of file while reading arg-list for macro \"%s\""
msgstr "прерани крај датотеке приликом читања листе аргумената за макро „%s“"
#: ../../WINGs/menuparser_macros.c:195
#, c-format
msgid "too many parameters for macro \"%s\" definition"
msgstr "превише параметара за дефиницију макроа „%s“"
#: ../../WINGs/menuparser_macros.c:210
#, c-format
msgid "invalid character '%c' in arg-list for macro \"%s\" while expecting parameter name"
msgstr "неисправни знак „%c“ у листи аргумената за макро „%s“ док се очекивао назив параметра"
#: ../../WINGs/menuparser_macros.c:221
#, c-format
msgid "invalid character '%c' in arg-list for macro \"%s\" while expecting ',' or ')'"
msgstr "неисправни знак „%c“ у листи аргумената за макро „%s“ док се очекивало „,“ или „)“"
#: ../../WINGs/menuparser_macros.c:254
#, c-format
msgid "macro \"%s\" already defined, ignoring redefinition"
msgstr "макро „%s“ је већ дефинисан, игнорише се поновна дефиниција"
#: ../../WINGs/menuparser_macros.c:348
#, c-format
msgid "more content than supported for the macro \"%s\""
msgstr "више садржаја него што је подржано за макро „%s“"
#: ../../WINGs/menuparser_macros.c:459
#, c-format
msgid "expansion for macro \"%s\" too big, line truncated"
msgstr "проширење макроа „%s“ је превелико, ред је исечен"
#: ../../WINGs/menuparser_macros.c:471
#, c-format
msgid "macro \"%s\" needs parenthesis for arguments"
msgstr "макроу „%s“ су потребне заграде за аргументе"
#: ../../WINGs/menuparser_macros.c:502
msgid "missing closing quote or double-quote before end-of-line"
msgstr "недостаје завршни наводник или апостроф пре краја реда"
#: ../../WINGs/menuparser_macros.c:525
#, c-format
msgid "too many arguments for macro \"%s\", expected only %d"
msgstr "превише аргумената за макро „%s“, очекује се само %d"
#: ../../WINGs/menuparser_macros.c:534
#, c-format
msgid "premature end of line while searching for arguments to macro \"%s\""
msgstr "прерани крај реда приликом тражења аргумената за макро „%s“"
#: ../../WINGs/menuparser_macros.c:540
#, c-format
msgid "not enough arguments for macro \"%s\", expected %d but got only %d"
msgstr "недовољно аргумената за макро „%s“, очекује се %d, али само постоји %d"
#: ../../WINGs/menuparser_macros.c:545
#, c-format
msgid "too much data in parameter list of macro \"%s\", truncated"
msgstr "превише података у листи параметара макроа „%s“, исечено"
#: ../../WINGs/menuparser_macros.c:565
#, c-format
msgid "size of value for macro '%s' is too big, truncated"
msgstr "величина вредности макроа „%s“ је превелика, исечено"
#: ../../WINGs/menuparser_macros.c:646 ../../WINGs/menuparser_macros.c:672
#, c-format
msgid "could not determine %s"
msgstr "не може се одредити %s"
#: ../../WINGs/proplist.c:78
#, c-format
msgid "syntax error in %s %s, line %i: %s"
msgstr "синтаксна грешка у %s %s, ред %i: %s"
#: ../../WINGs/proplist.c:134
msgid "Only string or data is supported for a proplist dictionary key"
msgstr "Само ниска или подаци су подржани у proplist речничком кључу"
#: ../../WINGs/proplist.c:167 ../../WINGs/proplist.c:217
#: ../../WINGs/proplist.c:382 ../../WINGs/proplist.c:458
#: ../../WINGs/proplist.c:1048 ../../WINGs/proplist.c:1098
#: ../../WINGs/proplist.c:1246 ../../WINGs/proplist.c:1326
#: ../../WINGs/proplist.c:1431 ../../WINGs/proplist.c:1475
msgid "Used proplist functions on non-WMPropLists objects"
msgstr "Користе се proplist функције над не-WMPropLists објектима"
#: ../../WINGs/proplist.c:635
msgid "unterminated PropList string"
msgstr "незатворена PropList ниска"
#: ../../WINGs/proplist.c:673
msgid "unterminated PropList data"
msgstr "незатворен PropList податак"
#: ../../WINGs/proplist.c:681
msgid "unterminated PropList data (missing hexdigit)"
msgstr "незатворен PropList податак (недостаје хекс-цифра)"
#: ../../WINGs/proplist.c:693 ../../WINGs/proplist.c:698
msgid "non hexdigit character in PropList data"
msgstr "знак који није хекс-цифра у PropList подацима"
#: ../../WINGs/proplist.c:730
msgid "unterminated PropList array"
msgstr "незатворен PropList низ"
#: ../../WINGs/proplist.c:738
msgid "missing or unterminated PropList array"
msgstr "недостајући или незатворени PropList низ"
#: ../../WINGs/proplist.c:748
msgid "could not get PropList array element"
msgstr "не може се добавити елемент PropList низа"
#: ../../WINGs/proplist.c:775
msgid "unterminated PropList dictionary"
msgstr "незатворени PropList речник"
#: ../../WINGs/proplist.c:792
msgid "missing PropList dictionary key"
msgstr "недостајући кључ PropList речника"
#: ../../WINGs/proplist.c:794
msgid "missing PropList dictionary entry key or unterminated dictionary"
msgstr "недостаје кључ PropList речничке ставке или је речник незатворен"
#: ../../WINGs/proplist.c:802
msgid "error parsing PropList dictionary key"
msgstr "грешка приликом рашчлањивања кључа PropList речника"
#: ../../WINGs/proplist.c:810
msgid "missing = in PropList dictionary entry"
msgstr "недостаје = у ставци PropList речника"
#: ../../WINGs/proplist.c:818
msgid "error parsing PropList dictionary entry value"
msgstr "грешка приликом рашчлањивања вредности PropList речничког уноса"
#: ../../WINGs/proplist.c:826
msgid "missing ; in PropList dictionary entry"
msgstr "недостаје ; у речничком уносу PropList"
#: ../../WINGs/proplist.c:885
msgid "was expecting a string, data, array or dictionary. If it's a string, try enclosing it with \"."
msgstr "очекује се ниска, податак, низ или речник. Ако је у питању ниска, пробајте да је окружите са \"."
#: ../../WINGs/proplist.c:888
msgid "Comments are not allowed inside WindowMaker owned domain files."
msgstr "Коментари нису дозвољени унутар датотека домена WindowMaker-а."
#: ../../WINGs/proplist.c:1495 ../../WINGs/proplist.c:1560
#: ../../WINGs/proplist.c:1624
msgid "extra data after end of property list"
msgstr "вишак података после листе особина"
#: ../../WINGs/proplist.c:1535
#, c-format
msgid "could not get size for file '%s'"
msgstr "не може се одредити величина датотеке „%s“"
#: ../../WINGs/proplist.c:1543
#, c-format
msgid "error reading from file '%s'"
msgstr "грешка приликом читања датотеке „%s“"
#: ../../WINGs/proplist.c:1590
#, c-format
msgid "%s:could not open menu file"
msgstr "%s:не може се отворити датотека менија"
#: ../../WINGs/proplist.c:1672
#, c-format
msgid "mkstemp (%s) failed"
msgstr "mkstemp (%s) није успео"
#: ../../WINGs/proplist.c:1682
#, c-format
msgid "mktemp (%s) failed"
msgstr "mktemp (%s) није успео"
#: ../../WINGs/proplist.c:1689
#, c-format
msgid "open (%s) failed"
msgstr "open (%s) није успео"
#: ../../WINGs/proplist.c:1696
#, c-format
msgid "writing to file: %s failed"
msgstr "уписивање у датотеку: %s није успело"
#: ../../WINGs/proplist.c:1706
#, c-format
msgid "fclose (%s) failed"
msgstr "fclose (%s) није успео"
#: ../../WINGs/proplist.c:1714
#, c-format
msgid "rename ('%s' to '%s') failed"
msgstr "rename („%s“ у „%s“) није успео"
#: ../../WINGs/proplist.c:1785
#, c-format
msgid "Could not create component %s"
msgstr "Не може се креирати компонента %s"
#: ../../WINGs/userdefaults.c:68
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
msgstr "променљива WMAKER_USER_ROOT је задата са неисправном путањом, не користи се"
#. something happened with the file. just overwrite it
#: ../../WINGs/userdefaults.c:208 ../../WINGs/userdefaults.c:223
#, c-format
msgid "cannot read domain from file '%s' when syncing"
msgstr "не може се учитати домен из датотеке „%s“ приликом синхронизовања"
#: ../../WINGs/dragcommon.c:60
#, c-format
msgid "unknown XDND action %s"
msgstr "непозната XDND акција %s"
#: ../../WINGs/dragcommon.c:142
#, c-format
msgid "target %lu for XDND message no longer exists"
msgstr "одредиште %lu XDND поруке више не постоји"
#: ../../WINGs/dragcommon.c:220
#, c-format
msgid "unsupported version %i for XDND enter message"
msgstr "неподржана верзија %i XDND улазне поруке"
#: ../../WINGs/dragsource.c:163
msgid "XDND selection lost during drag operation..."
msgstr "XDND избор је изгубљен приликом операције превлачења..."
#: ../../WINGs/dragsource.c:758
msgid "could not get XDND version for target of drop"
msgstr "не може се одредити верзија XDND-а за одредиште превлачења"
#: ../../WINGs/dragsource.c:774
msgid "could not get ownership of XDND selection"
msgstr "не може се одредити власништво над XDND избором"
#: ../../WINGs/dragsource.c:1070
msgid "delay for drag destination response expired"
msgstr "пауза за одговор одредишта превлачења је истекла"
#: ../../WINGs/wcolor.c:204 ../../WINGs/wcolor.c:214 ../../WINGs/wcolor.c:250
#: ../../WINGs/wcolor.c:288
#, c-format
msgid "could not allocate %s color"
msgstr "не може се алоцирати боја %s"
#: ../../WINGs/wcolor.c:204
msgid "white"
msgstr "бела"
#: ../../WINGs/wcolor.c:214
msgid "black"
msgstr "црна"
#: ../../WINGs/wcolor.c:250
msgid "gray"
msgstr "сива"
#: ../../WINGs/wcolor.c:288
msgid "dark gray"
msgstr "тамно сива"
#: ../../WINGs/wcolorpanel.c:390
msgid "Colors"
msgstr "Боје"
#: ../../WINGs/wcolorpanel.c:565 ../../WINGs/wcolorpanel.c:2716
msgid "Brightness"
msgstr "Светлина"
#: ../../WINGs/wcolorpanel.c:567 ../../WINGs/wcolorpanel.c:641
#: ../../WINGs/wcolorpanel.c:672 ../../WINGs/wcolorpanel.c:703
#: ../../WINGs/wcolorpanel.c:778 ../../WINGs/wcolorpanel.c:809
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:874
#: ../../WINGs/wcolorpanel.c:2010 ../../WINGs/wcolorpanel.c:2718
#: ../../WINGs/wcolorpanel.c:2752 ../../WINGs/wcolorpanel.c:2786
msgid "Color Panel: Could not allocate memory"
msgstr "Панел за боје: Неуспешно алоцирање меморије"
#: ../../WINGs/wcolorpanel.c:639
msgid "Red"
msgstr "Црвена"
#: ../../WINGs/wcolorpanel.c:670
msgid "Green"
msgstr "Зелена"
#: ../../WINGs/wcolorpanel.c:701
msgid "Blue"
msgstr "Плава"
#: ../../WINGs/wcolorpanel.c:715
msgid "Decimal"
msgstr "Децимално"
#: ../../WINGs/wcolorpanel.c:723
msgid "Hexadecimal"
msgstr "Хексадекадно"
#: ../../WINGs/wcolorpanel.c:776
msgid "Cyan"
msgstr "Цијан"
#: ../../WINGs/wcolorpanel.c:807
msgid "Magenta"
msgstr "Магента"
#: ../../WINGs/wcolorpanel.c:839
msgid "Yellow"
msgstr "Жута"
#: ../../WINGs/wcolorpanel.c:872
msgid "Black"
msgstr "Црна"
#: ../../WINGs/wcolorpanel.c:947
msgid "Spectrum"
msgstr "Спектар"
#: ../../WINGs/wcolorpanel.c:973
msgid "Palette"
msgstr "Палета"
#: ../../WINGs/wcolorpanel.c:978
msgid "New from File..."
msgstr "Нова из датотеке..."
#: ../../WINGs/wcolorpanel.c:979 ../../WINGs/wcolorpanel.c:1024
#: ../../WINGs/wcolorpanel.c:1039
msgid "Rename..."
msgstr "Преименуј..."
#: ../../WINGs/wcolorpanel.c:980 ../../WINGs/wcolorpanel.c:1025
#: ../../WINGs/wcolorpanel.c:1040 ../../WINGs/wcolorpanel.c:3176
msgid "Remove"
msgstr "Уклони"
#: ../../WINGs/wcolorpanel.c:981
msgid "Copy"
msgstr "Копирај"
#: ../../WINGs/wcolorpanel.c:982
msgid "New from Clipboard"
msgstr "Нова из клипборда"
#: ../../WINGs/wcolorpanel.c:1001
msgid "X11-Colors"
msgstr "X11 боје"
#: ../../WINGs/wcolorpanel.c:1018
msgid "Color"
msgstr "Боја"
#: ../../WINGs/wcolorpanel.c:1023
msgid "Add..."
msgstr "Додај..."
#: ../../WINGs/wcolorpanel.c:1033
msgid "List"
msgstr "Листа"
#: ../../WINGs/wcolorpanel.c:1038
msgid "New..."
msgstr "Нова..."
#: ../../WINGs/wcolorpanel.c:1165
#, c-format
msgid "Color Panel: Could not create directory %s needed to store configurations"
msgstr "Панел за боје: Не може се креирати директоријум %s неопходан за чување подешавања"
#. Delete the file, it doesn't belong here
#: ../../WINGs/wcolorpanel.c:1171 ../../WINGs/wcolorpanel.c:3069
#: ../../WINGs/wcolorpanel.c:3073
msgid "File Error"
msgstr "Грешка датотеке"
#: ../../WINGs/wcolorpanel.c:1172
msgid "Could not create ColorPanel configuration directory"
msgstr "Не може се креирати директоријум са подешавањима ColorPanel"
#: ../../WINGs/wcolorpanel.c:1173 ../../WINGs/wcolorpanel.c:3070
#: ../../WINGs/wcolorpanel.c:3075 ../../WINGs/wcolorpanel.c:3100
#: ../../WINGs/wfilepanel.c:227 ../../WINGs/wfilepanel.c:596
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
#: ../../WINGs/wfilepanel.c:883 ../../WINGs/wfontpanel.c:532
msgid "OK"
msgstr "ОК"
#: ../../WINGs/wcolorpanel.c:1178
msgid "Color Panel: Could not find file"
msgstr "Панел за боје: Не може се пронаћи датотека"
#: ../../WINGs/wcolorpanel.c:1374 ../../WINGs/wcolorpanel.c:1435
#: ../../WINGs/wcolorpanel.c:1495
msgid "Color Panel: X failed request"
msgstr "Панел за боје: Неуспешан захтев X-а"
#: ../../WINGs/wcolorpanel.c:2750
msgid "Saturation"
msgstr "Засићење"
#: ../../WINGs/wcolorpanel.c:2784
msgid "Hue"
msgstr "Нијанса"
#: ../../WINGs/wcolorpanel.c:3008
msgid "Open Palette"
msgstr "Отвори палету"
#: ../../WINGs/wcolorpanel.c:3070
msgid "Invalid file format !"
msgstr "Неисправан формат датотеке !"
#: ../../WINGs/wcolorpanel.c:3072
#, c-format
msgid "can't remove file %s"
msgstr "не може се уклонити датотека %s"
#: ../../WINGs/wcolorpanel.c:3074
msgid "Couldn't remove file from Configuration Directory !"
msgstr "Не може се уклонити датотека из директоријума са подешавањима !"
#: ../../WINGs/wcolorpanel.c:3099
msgid "Rename"
msgstr "Преименовање"
#: ../../WINGs/wcolorpanel.c:3099
msgid "Rename palette to:"
msgstr "Преименуј палету у:"
#: ../../WINGs/wcolorpanel.c:3100 ../../WINGs/wfilepanel.c:236
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
msgid "Cancel"
msgstr "Поништи"
#. Careful, this palette exists already
#: ../../WINGs/wcolorpanel.c:3116 ../../WINGs/wfilepanel.c:715
msgid "Warning"
msgstr "Упозорење"
#: ../../WINGs/wcolorpanel.c:3117
msgid "Palette already exists !\n\nOverwrite ?"
msgstr "Палета већ постоји !\n\nПреписати ?"
#: ../../WINGs/wcolorpanel.c:3117 ../../WINGs/wcolorpanel.c:3176
msgid "No"
msgstr "Не"
#: ../../WINGs/wcolorpanel.c:3117 ../../WINGs/wcolorpanel.c:3176
msgid "Yes"
msgstr "Да"
#: ../../WINGs/wcolorpanel.c:3148
#, c-format
msgid "Couldn't rename palette %s to %s"
msgstr "Палета %s се не може преименовати у %s"
#: ../../WINGs/wcolorpanel.c:3171
msgid "This will permanently remove the palette "
msgstr "Ово ће трајно уклонити палету "
#: ../../WINGs/wcolorpanel.c:3173
msgid ".\n\nAre you sure you want to remove this palette ?"
msgstr ".\n\nДа ли сте сигурни да желите да уклоните палету ?"
#: ../../WINGs/wcolorpanel.c:3195
#, c-format
msgid "Couldn't remove palette %s"
msgstr "Не може се уклонити палета %s"
#: ../../WINGs/wcolorpanel.c:3498
msgid "Color Panel: Color unspecified"
msgstr "Панел за боју: Боја није задата"
#: ../../WINGs/wfilepanel.c:216
msgid "Name:"
msgstr "Назив:"
#: ../../WINGs/wfilepanel.c:306 ../../WINGs/wfilepanel.c:364
msgid "Open"
msgstr "Отвори"
#: ../../WINGs/wfilepanel.c:322 ../../WINGs/wfilepanel.c:370
msgid "Save"
msgstr "Сачувај"
#: ../../WINGs/wfilepanel.c:506
#, c-format
msgid "WINGs: could not open directory %s\n"
msgstr "WINGs: не може се отворити директоријум %s\n"
#: ../../WINGs/wfilepanel.c:526
#, c-format
msgid "WINGs: could not stat %s\n"
msgstr "WINGs: не може се stat-овати %s\n"
#: ../../WINGs/wfilepanel.c:596 ../../WINGs/wfilepanel.c:883
#: ../../WINGs/wfontpanel.c:531
msgid "Error"
msgstr "Грешка"
#: ../../WINGs/wfilepanel.c:610
msgid "Create Directory"
msgstr "Креирање директоријума"
#: ../../WINGs/wfilepanel.c:611
msgid "Enter directory name"
msgstr "Унесите назив директоријума"
#: ../../WINGs/wfilepanel.c:639
#, c-format
msgid "Can not create %s: %s"
msgstr "Не може се креирати %s: %s"
#: ../../WINGs/wfilepanel.c:705
#, c-format
msgid "Can not find %s: %s"
msgstr "Не може се наћи %s: %s"
#: ../../WINGs/wfilepanel.c:711
#, c-format
msgid "Delete %s %s?"
msgstr "Обрисати %s %s?"
#: ../../WINGs/wfilepanel.c:712
msgid "directory"
msgstr "директоријум"
#: ../../WINGs/wfilepanel.c:712
msgid "file"
msgstr "датотеку"
#: ../../WINGs/wfilepanel.c:719
#, c-format
msgid "Removing %s failed: %s"
msgstr "Уклањање %s није успело: %s"
#: ../../WINGs/wfilepanel.c:751
#, c-format
msgid "An error occurred browsing '%s'."
msgstr "Догодила се грешка приликом прегледања „%s“."
#: ../../WINGs/wfilepanel.c:754
#, c-format
msgid "'%s' is not a directory."
msgstr "„%s“ није директоријум."
#: ../../WINGs/wfilepanel.c:883
msgid "File does not exist."
msgstr "Датотека не постоји."
#: ../../WINGs/wfont.c:43
#, c-format
msgid "invalid font: %s. Trying '%s'"
msgstr "неисправан фонт: %s. Проба се „%s“"
#: ../../WINGs/wfont.c:270 ../../WINGs/wfont.c:288
#, c-format
msgid "could not load font: %s."
msgstr "не може се учитати фонт: %s."
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
#: ../../WINGs/wfontpanel.c:184
msgid "Font Panel"
msgstr "Панел за фонт"
#: ../../WINGs/wfontpanel.c:220
msgid "The quick brown fox jumps over the lazy dog"
msgstr "Одбациће кавгаџија плаштом чађ у жељезни фењер"
#: ../../WINGs/wfontpanel.c:226
msgid "Family"
msgstr "Фамилија"
#: ../../WINGs/wfontpanel.c:237
msgid "Typeface"
msgstr "Словни лик"
#: ../../WINGs/wfontpanel.c:248
msgid "Size"
msgstr "Величина"
#: ../../WINGs/wfontpanel.c:267
msgid "Set"
msgstr "Постави"
#: ../../WINGs/wfontpanel.c:273
msgid "Revert"
msgstr "Врати"
#: ../../WINGs/wfontpanel.c:532
msgid "Could not init font config library\n"
msgstr "Не може се иницијализовати библиотека font config\n"
#: ../../WINGs/widgets.c:447
#, c-format
msgid "WINGs: could not load widget images file: %s"
msgstr "WINGs: не може се учитати датотека са сликама виџета: %s"
#: ../../WINGs/widgets.c:543
#, c-format
msgid "WINGs: could not open display %s"
msgstr "WINGs: не може се отворити приказ %s"
#: ../../WINGs/widgets.c:772
msgid "could not load any fonts. Make sure your font installation and locale settings are correct."
msgstr "не може се учитати ниједан фонт. Проверите да ли су фонтови исправно инсталирани и да али су подешавања језика исправна."
#: ../../WINGs/winputmethod.c:65
msgid "could not add destroy callback for XIM input method"
msgstr "не може се додати destroy callback за XIM метод уноса"
#: ../../WINGs/wruler.c:175
msgid "0 inches"
msgstr "0 инча"
#: ../../WINGs/wtextfield.c:494
msgid "only left alignment is supported in textfields"
msgstr "у текстуалним пољима је подржано само лево уравнање"
#: ../../WINGs/wwindow.c:160
msgid "window title conversion error... using STRING encoding"
msgstr "грешка приликом конверзије наслова прозора... користи се STRING кодирање"
#: ../../WINGs/wwindow.c:181
msgid "icon title conversion error... using STRING encoding"
msgstr "грешка приликом конверзије наслова иконе... користи се STRING кодирање"
+8 -20
View File
@@ -1732,36 +1732,23 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
* file, and the last component is stripped off. the rest is the * file, and the last component is stripped off. the rest is the
* the hierarchy to be created. * the hierarchy to be created.
* *
* refuses to create anything outside $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library * refuses to create anything outside $WMAKER_USER_ROOT
* *
* returns 1 on success, 0 on failure * returns 1 on success, 0 on failure
*/ */
int wmkdirhier(const char *path) int wmkdirhier(const char *path)
{ {
const char *libpath; const char *t;
char *udefpath;
int cmp;
char *thePath = NULL, buf[1024]; char *thePath = NULL, buf[1024];
size_t p, plen; size_t p, plen;
struct stat st; struct stat st;
/* Only create directories under $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library */ /* Only create directories under $WMAKER_USER_ROOT */
libpath = wuserdatapath(); if ((t = wusergnusteppath()) == NULL)
if (strncmp(path, libpath, strlen(libpath)) == 0) return 0;
if (path[strlen(libpath)] == '/') if (strncmp(path, t, strlen(t)) != 0)
goto path_in_valid_tree;
udefpath = wdefaultspathfordomain("");
cmp = strncmp(path, udefpath, strlen(udefpath));
wfree(udefpath);
if (cmp == 0)
/* Note: by side effect, 'udefpath' already contains a final '/' */
goto path_in_valid_tree;
/* If we reach this point, the path is outside the allowed tree */
return 0; return 0;
path_in_valid_tree:
thePath = wstrdup(path); thePath = wstrdup(path);
/* Strip the trailing component if it is a file */ /* Strip the trailing component if it is a file */
p = strlen(thePath); p = strlen(thePath);
@@ -1784,6 +1771,7 @@ int wmkdirhier(const char *path)
} }
memset(buf, 0, sizeof(buf)); memset(buf, 0, sizeof(buf));
strncpy(buf, t, sizeof(buf) - 1);
p = strlen(buf); p = strlen(buf);
plen = strlen(thePath); plen = strlen(thePath);
@@ -1794,7 +1782,7 @@ int wmkdirhier(const char *path)
strncpy(buf, thePath, p); strncpy(buf, thePath, p);
if (mkdir(buf, 0777) == -1 && errno == EEXIST && if (mkdir(buf, 0777) == -1 && errno == EEXIST &&
stat(buf, &st) == 0 && !S_ISDIR(st.st_mode)) { stat(buf, &st) == 0 && !S_ISDIR(st.st_mode)) {
werror(_("Could not create path component %s"), buf); werror(_("Could not create component %s"), buf);
wfree(thePath); wfree(thePath);
return 0; return 0;
} }
+3 -3
View File
@@ -51,7 +51,7 @@ static WMColor *findCloseColor(WMScreen * scr, unsigned short red, unsigned shor
color->refCount = 1; color->refCount = 1;
color->color = xcolor; color->color = xcolor;
color->alpha = alpha; color->alpha = alpha;
color->flags.exact = 1; color->flags.exact = 0;
color->gc = NULL; color->gc = NULL;
return color; return color;
@@ -91,7 +91,7 @@ WMColor *WMCreateRGBColor(WMScreen * scr, unsigned short red, unsigned short gre
color = findCloseColor(scr, red, green, blue, 0xffff); color = findCloseColor(scr, red, green, blue, 0xffff);
} }
if (!color) if (!color)
color = WMBlackColor(scr); color = scr->black;
return color; return color;
} }
@@ -117,7 +117,7 @@ WMColor *WMCreateRGBAColor(WMScreen * scr, unsigned short red, unsigned short gr
color = findCloseColor(scr, red, green, blue, alpha); color = findCloseColor(scr, red, green, blue, alpha);
} }
if (!color) if (!color)
color = WMBlackColor(scr); color = scr->black;
return color; return color;
} }
+3 -3
View File
@@ -2259,7 +2259,7 @@ static void wheelPositionSelectionOutBounds(W_ColorPanel * panel, int x, int y)
static void wheelUpdateBrightnessGradientFromLocation(W_ColorPanel * panel) static void wheelUpdateBrightnessGradientFromLocation(W_ColorPanel * panel)
{ {
CPColor from; CPColor from = {};
unsigned long ofs; unsigned long ofs;
ofs = panel->coly * panel->wheelMtrx->width + panel->colx; ofs = panel->coly * panel->wheelMtrx->width + panel->colx;
@@ -2604,7 +2604,7 @@ static void cmykTextFieldCallback(void *observerData, WMNotification * notificat
static void hsbSliderCallback(WMWidget * w, void *data) static void hsbSliderCallback(WMWidget * w, void *data)
{ {
CPColor cpColor; CPColor cpColor = {};
int value[3]; int value[3];
char tmp[4]; char tmp[4];
W_ColorPanel *panel = (W_ColorPanel *) data; W_ColorPanel *panel = (W_ColorPanel *) data;
@@ -2640,7 +2640,7 @@ static void hsbSliderCallback(WMWidget * w, void *data)
static void hsbTextFieldCallback(void *observerData, WMNotification * notification) static void hsbTextFieldCallback(void *observerData, WMNotification * notification)
{ {
CPColor cpColor; CPColor cpColor = {};
int value[3]; int value[3];
char tmp[12]; /* We only 4 bytes needed, but compilers cannot know that */ char tmp[12]; /* We only 4 bytes needed, but compilers cannot know that */
int n; int n;
+37 -33
View File
@@ -70,37 +70,30 @@ static Bool hasProperty(FcPattern * pattern, const char *property)
return False; return False;
} }
static Bool hasPropertyWithStringValue(FcPattern * pattern, const char *object, const char *value)
{
FcChar8 *str;
int id;
if (!value || value[0] == 0)
return True;
id = 0;
while (FcPatternGetString(pattern, object, id, &str) == FcResultMatch) {
if (strcasecmp(value, (char *)str) == 0) {
return True;
}
id++;
}
return False;
}
static char *makeFontOfSize(const char *font, int size, const char *fallback) static char *makeFontOfSize(const char *font, int size, const char *fallback)
{ {
FcPattern *pattern; FcPattern *pattern = NULL;
char *result; char *result;
if (font[0] == '-') { if (font && font[0] == '-') {
pattern = xlfdToFcPattern(font); pattern = xlfdToFcPattern(font);
} else { } else {
pattern = FcNameParse((const FcChar8 *) font); pattern = FcNameParse((const FcChar8 *) font);
} }
/*FcPatternPrint(pattern); */ if (!pattern) {
wwarning(_("could not load font spec: %s."), font);
if (!fallback)
return NULL;
pattern = FcPatternCreate();
if (!pattern)
return NULL;
if (!FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) fallback)) {
wfatal(_("could not load default font spec: %s."), fallback);
FcPatternDestroy(pattern);
return NULL;
}
}
if (size > 0) { if (size > 0) {
FcPatternDel(pattern, FC_PIXEL_SIZE); FcPatternDel(pattern, FC_PIXEL_SIZE);
@@ -109,12 +102,6 @@ static char *makeFontOfSize(const char *font, int size, const char *fallback)
FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)DEFAULT_SIZE); FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)DEFAULT_SIZE);
} }
if (fallback && !hasPropertyWithStringValue(pattern, FC_FAMILY, fallback)) {
FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) fallback);
}
/*FcPatternPrint(pattern); */
result = (char *)FcNameUnparse(pattern); result = (char *)FcNameUnparse(pattern);
FcPatternDestroy(pattern); FcPatternDestroy(pattern);
@@ -135,7 +122,7 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
double size; double size;
#endif #endif
if (fontName[0] == '-') { if (fontName && fontName[0] == '-') {
fname = xlfdToFcName(fontName); fname = xlfdToFcName(fontName);
} else { } else {
fname = wstrdup(fontName); fname = wstrdup(fontName);
@@ -187,6 +174,10 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
pango_layout_set_font_description(layout, description); pango_layout_set_font_description(layout, description);
font->layout = layout; font->layout = layout;
pango_font_description_free(description);
g_object_unref(context);
FcPatternDestroy(pattern);
#endif #endif
assert(WMHashInsert(scrPtr->fontCache, font->name, font) == NULL); assert(WMHashInsert(scrPtr->fontCache, font->name, font) == NULL);
@@ -210,6 +201,11 @@ void WMReleaseFont(WMFont * font)
font->refCount--; font->refCount--;
if (font->refCount < 1) { if (font->refCount < 1) {
XftFontClose(font->screen->display, font->font); XftFontClose(font->screen->display, font->font);
#ifdef USE_PANGO
if (font->layout) {
g_object_unref(font->layout);
}
#endif
if (font->name) { if (font->name) {
WMHashRemove(font->screen->fontCache, font->name); WMHashRemove(font->screen->fontCache, font->name);
wfree(font->name); wfree(font->name);
@@ -262,7 +258,11 @@ WMFont *WMSystemFontOfSize(WMScreen * scrPtr, int size)
WMFont *font; WMFont *font;
char *fontSpec; char *fontSpec;
fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, NULL); fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, DEFAULT_FONT);
if (!fontSpec) {
return NULL;
}
font = WMCreateFont(scrPtr, fontSpec); font = WMCreateFont(scrPtr, fontSpec);
@@ -280,7 +280,11 @@ WMFont *WMBoldSystemFontOfSize(WMScreen * scrPtr, int size)
WMFont *font; WMFont *font;
char *fontSpec; char *fontSpec;
fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, NULL); fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, DEFAULT_FONT);
if (!fontSpec) {
return NULL;
}
font = WMCreateFont(scrPtr, fontSpec); font = WMCreateFont(scrPtr, fontSpec);
@@ -336,7 +340,7 @@ void WMDrawString(WMScreen * scr, Drawable d, WMColor * color, WMFont * font, in
#ifdef USE_PANGO #ifdef USE_PANGO
previous_text = pango_layout_get_text(font->layout); previous_text = pango_layout_get_text(font->layout);
if ((previous_text == NULL) || (strcmp(text, previous_text) != 0)) if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
pango_layout_set_text(font->layout, text, length); pango_layout_set_text(font->layout, text, length);
pango_xft_render_layout(scr->xftdraw, &xftcolor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE); pango_xft_render_layout(scr->xftdraw, &xftcolor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
#else #else
@@ -374,7 +378,7 @@ WMDrawImageString(WMScreen * scr, Drawable d, WMColor * color, WMColor * backgro
#ifdef USE_PANGO #ifdef USE_PANGO
previous_text = pango_layout_get_text(font->layout); previous_text = pango_layout_get_text(font->layout);
if ((previous_text == NULL) || (strcmp(text, previous_text) != 0)) if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
pango_layout_set_text(font->layout, text, length); pango_layout_set_text(font->layout, text, length);
pango_xft_render_layout(scr->xftdraw, &textColor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE); pango_xft_render_layout(scr->xftdraw, &textColor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
#else #else
+3
View File
@@ -253,6 +253,9 @@ WMFrame *WMCreateFrame(WMWidget * parent)
static void destroyFrame(Frame * fPtr) static void destroyFrame(Frame * fPtr)
{ {
if (fPtr->textColor)
WMReleaseColor(fPtr->textColor);
if (fPtr->caption) if (fPtr->caption)
wfree(fPtr->caption); wfree(fPtr->caption);
+29
View File
@@ -213,3 +213,32 @@ int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int bufl
#endif #endif
return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status); return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
} }
/*
* Map a keycode to the corresponding keysym
* To replace the deprecated X11 function XKeycodeToKeysym
*/
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index)
{
static int min_kc = -1;
static int max_kc;
int num_syms;
KeySym *key_syms;
KeySym ks;
XDisplayKeycodes(display, &min_kc, &max_kc);
if (keycode < min_kc || keycode > max_kc || index < 0) {
return NoSymbol;
}
key_syms = XGetKeyboardMapping(display, keycode, 1, &num_syms);
if (index >= num_syms) {
XFree(key_syms);
return NoSymbol;
}
ks = key_syms[index];
XFree(key_syms);
return ks;
}
+498 -9
View File
@@ -1,5 +1,7 @@
#include "WINGsP.h" #include "WINGsP.h"
#include <ctype.h>
#include <strings.h>
const char *WMListDidScrollNotification = "WMListDidScrollNotification"; const char *WMListDidScrollNotification = "WMListDidScrollNotification";
const char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification"; const char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
@@ -27,11 +29,15 @@ typedef struct W_List {
WMHandlerID *idleID; /* for updating the scroller after adding elements */ WMHandlerID *idleID; /* for updating the scroller after adding elements */
WMHandlerID *selectID; /* for selecting items in list while scrolling */ WMHandlerID *selectID; /* for selecting items in list while scrolling */
WMHandlerID *typeaheadID; /* for clearing typeahead buffer */
WMScroller *vScroller; WMScroller *vScroller;
Pixmap doubleBuffer; Pixmap doubleBuffer;
char *typeahead;
int typeaheadLen;
struct { struct {
unsigned int allowMultipleSelection:1; unsigned int allowMultipleSelection:1;
unsigned int allowEmptySelection:1; unsigned int allowEmptySelection:1;
@@ -48,6 +54,7 @@ typedef struct W_List {
#define DEFAULT_HEIGHT 150 #define DEFAULT_HEIGHT 150
#define SCROLL_DELAY 100 #define SCROLL_DELAY 100
#define TYPEAHEAD_CLEAR_DELAY 700
static void destroyList(List * lPtr); static void destroyList(List * lPtr);
static void paintList(List * lPtr); static void paintList(List * lPtr);
@@ -62,6 +69,8 @@ static void scrollBackwardSelecting(void *data);
static void vScrollCallBack(WMWidget * scroller, void *self); static void vScrollCallBack(WMWidget * scroller, void *self);
static void toggleItemSelection(WMList * lPtr, int index); static void toggleItemSelection(WMList * lPtr, int index);
static void jumpToFirstItemWithPrefix(WMList * lPtr, const char *prefix, int prefixLen);
static void typeaheadTimeout(void *data);
static void updateGeometry(WMList * lPtr); static void updateGeometry(WMList * lPtr);
static void didResizeList(W_ViewDelegate * self, WMView * view); static void didResizeList(W_ViewDelegate * self, WMView * view);
@@ -113,6 +122,9 @@ WMList *WMCreateList(WMWidget * parent)
W_Screen *scrPtr = W_VIEW(parent)->screen; W_Screen *scrPtr = W_VIEW(parent)->screen;
lPtr = wmalloc(sizeof(List)); lPtr = wmalloc(sizeof(List));
lPtr->typeahead = NULL;
lPtr->typeaheadLen = 0;
lPtr->typeaheadID = NULL;
lPtr->widgetClass = WC_List; lPtr->widgetClass = WC_List;
@@ -129,7 +141,8 @@ WMList *WMCreateList(WMWidget * parent)
| ClientMessageMask, handleEvents, lPtr); | ClientMessageMask, handleEvents, lPtr);
WMCreateEventHandler(lPtr->view, ButtonPressMask | ButtonReleaseMask WMCreateEventHandler(lPtr->view, ButtonPressMask | ButtonReleaseMask
| EnterWindowMask | LeaveWindowMask | ButtonMotionMask, handleActionEvents, lPtr); | EnterWindowMask | LeaveWindowMask | ButtonMotionMask
| KeyPressMask, handleActionEvents, lPtr);
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1; lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
@@ -288,6 +301,14 @@ void WMClearList(WMList * lPtr)
WMDeleteTimerHandler(lPtr->selectID); WMDeleteTimerHandler(lPtr->selectID);
lPtr->selectID = NULL; lPtr->selectID = NULL;
} }
if (lPtr->typeaheadID) {
WMDeleteTimerHandler(lPtr->typeaheadID);
lPtr->typeaheadID = NULL;
}
if (lPtr->typeahead) {
lPtr->typeahead[0] = '\0';
lPtr->typeaheadLen = 0;
}
if (lPtr->view->flags.realized) { if (lPtr->view->flags.realized) {
updateScroller(lPtr); updateScroller(lPtr);
} }
@@ -495,15 +516,16 @@ static void paintItem(List * lPtr, int index)
static void paintList(List * lPtr) static void paintList(List * lPtr)
{ {
W_Screen *scrPtr = lPtr->view->screen; W_Screen *scrPtr = lPtr->view->screen;
int i, lim; int i, lim, itemCount;
if (!lPtr->view->flags.mapped) if (!lPtr->view->flags.mapped)
return; return;
if (WMGetArrayItemCount(lPtr->items) > 0) { itemCount = WMGetArrayItemCount(lPtr->items);
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > WMGetArrayItemCount(lPtr->items)) { if (itemCount > 0) {
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > itemCount) {
lim = WMGetArrayItemCount(lPtr->items) - lPtr->topItem; lim = itemCount - lPtr->topItem;
XClearArea(scrPtr->display, lPtr->view->window, 19, XClearArea(scrPtr->display, lPtr->view->window, 19,
2 + lim * lPtr->itemHeight, lPtr->view->size.width - 21, 2 + lim * lPtr->itemHeight, lPtr->view->size.width - 21,
lPtr->view->size.height - lim * lPtr->itemHeight - 3, False); lPtr->view->size.height - lim * lPtr->itemHeight - 3, False);
@@ -820,7 +842,7 @@ void WMSetListSelectionToRange(WMList * lPtr, WMRange range)
void WMSelectAllListItems(WMList * lPtr) void WMSelectAllListItems(WMList * lPtr)
{ {
int i; int i, itemCount;
WMListItem *item; WMListItem *item;
if (!lPtr->flags.allowMultipleSelection) if (!lPtr->flags.allowMultipleSelection)
@@ -833,7 +855,8 @@ void WMSelectAllListItems(WMList * lPtr)
WMFreeArray(lPtr->selectedItems); WMFreeArray(lPtr->selectedItems);
lPtr->selectedItems = WMCreateArrayWithArray(lPtr->items); lPtr->selectedItems = WMCreateArrayWithArray(lPtr->items);
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) { itemCount = WMGetArrayItemCount(lPtr->items);
for (i = 0; i < itemCount; i++) {
item = WMGetFromArray(lPtr->items, i); item = WMGetFromArray(lPtr->items, i);
if (!item->selected) { if (!item->selected) {
item->selected = 1; item->selected = 1;
@@ -859,10 +882,11 @@ void WMSelectAllListItems(WMList * lPtr)
*/ */
static void unselectAllListItems(WMList * lPtr, WMListItem * exceptThis) static void unselectAllListItems(WMList * lPtr, WMListItem * exceptThis)
{ {
int i; int i, itemCount;
WMListItem *item; WMListItem *item;
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) { itemCount = WMGetArrayItemCount(lPtr->items);
for (i = 0; i < itemCount; i++) {
item = WMGetFromArray(lPtr->items, i); item = WMGetFromArray(lPtr->items, i);
if (item != exceptThis && item->selected) { if (item != exceptThis && item->selected) {
item->selected = 0; item->selected = 0;
@@ -920,6 +944,85 @@ static void toggleItemSelection(WMList * lPtr, int index)
} }
} }
static int findItemWithPrefix(List * lPtr, const char *prefix, int prefixLen)
{
if (prefixLen <= 0)
return -1;
int i, itemCount;
itemCount = WMGetArrayItemCount(lPtr->items);
for (i = 0; i < itemCount; i++) {
WMListItem *item = WMGetFromArray(lPtr->items, i);
if (!item || !item->text || item->text[0] == '\0')
continue;
if (strncasecmp(item->text, prefix, prefixLen) == 0)
return i;
}
return -1;
}
static void jumpToFirstItemWithPrefix(WMList * lPtr, const char *prefix, int prefixLen)
{
int index, oldTop, visibleCount;
index = findItemWithPrefix(lPtr, prefix, prefixLen);
if (index < 0)
return;
if (lPtr->flags.allowMultipleSelection) {
WMRange range;
range.position = index;
range.count = 1;
WMSetListSelectionToRange(lPtr, range);
} else {
WMSelectListItem(lPtr, index);
/* Trigger action callback */
if (lPtr->action)
(*lPtr->action) (lPtr, lPtr->clientData);
}
visibleCount = lPtr->fullFitLines + lPtr->flags.dontFitAll;
if (visibleCount < 1)
visibleCount = 1;
oldTop = lPtr->topItem;
if (index < lPtr->topItem) {
lPtr->topItem = index;
} else {
if (lPtr->flags.dontFitAll) {
if (lPtr->fullFitLines <= 0) {
lPtr->topItem = index;
} else {
int lastFullyVisible = lPtr->topItem + lPtr->fullFitLines - 1;
if (index > lastFullyVisible)
lPtr->topItem = index - lPtr->fullFitLines + 1;
}
} else if (index >= lPtr->topItem + visibleCount) {
lPtr->topItem = index - visibleCount + 1;
}
}
if (lPtr->topItem < 0)
lPtr->topItem = 0;
if (lPtr->view->flags.realized && lPtr->topItem != oldTop)
updateScroller(lPtr);
}
static void typeaheadTimeout(void *data)
{
List *lPtr = (List *) data;
lPtr->typeaheadID = NULL;
if (lPtr->typeahead) {
lPtr->typeahead[0] = '\0';
lPtr->typeaheadLen = 0;
}
}
static void handleActionEvents(XEvent * event, void *data) static void handleActionEvents(XEvent * event, void *data)
{ {
List *lPtr = (List *) data; List *lPtr = (List *) data;
@@ -959,6 +1062,7 @@ static void handleActionEvents(XEvent * event, void *data)
WMDeleteTimerHandler(lPtr->selectID); WMDeleteTimerHandler(lPtr->selectID);
lPtr->selectID = NULL; lPtr->selectID = NULL;
} }
WMSetFocusToWidget(lPtr);
break; break;
case LeaveNotify: case LeaveNotify:
@@ -970,6 +1074,9 @@ static void handleActionEvents(XEvent * event, void *data)
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY, scrollBackwardSelecting, lPtr); lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY, scrollBackwardSelecting, lPtr);
} }
} }
WMWidget *parentWidget = WMWidgetOfView(lPtr->view->parent);
if (parentWidget)
WMSetFocusToWidget(parentWidget);
break; break;
case ButtonPress: case ButtonPress:
@@ -1076,6 +1183,381 @@ static void handleActionEvents(XEvent * event, void *data)
prevItem = tmp; prevItem = tmp;
} }
break; break;
case KeyPress:
char buffer[16];
KeySym ksym;
Status status;
int len;
WMScreen *scr = lPtr->view->screen;
XWindowAttributes wattr;
if (event->xkey.state & (ControlMask | Mod1Mask))
break;
if (!(XGetWindowAttributes(scr->display, lPtr->view->window, &wattr) && wattr.map_state == IsViewable))
break;
len = W_LookupString(lPtr->view, &event->xkey, buffer, (int)sizeof(buffer) - 1, &ksym, &status);
if (len < 0)
break;
if (len > 0)
buffer[len] = '\0';
/* Handle navigation keys */
switch (ksym) {
case XK_Up: {
int newRow;
int itemCount = WMGetArrayItemCount(lPtr->items);
int cur = WMGetListSelectedItemRow(lPtr);
if (lPtr->flags.allowMultipleSelection && WMGetArrayItemCount(lPtr->selectedItems) > 0) {
WMListItem *lastSel = WMGetFromArray(lPtr->selectedItems, WMGetArrayItemCount(lPtr->selectedItems) - 1);
if (lastSel)
cur = WMGetFirstInArray(lPtr->items, lastSel);
}
if (cur == WLNotFound)
cur = lPtr->topItem;
newRow = cur - 1;
if (newRow < 0)
newRow = 0;
if (newRow != cur && itemCount > 0) {
if (lPtr->flags.allowMultipleSelection) {
if (event->xkey.state & ShiftMask) {
WMRange range;
int anchor = WMGetListSelectedItemRow(lPtr);
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
anchor = cur;
}
range.position = anchor;
if (newRow >= anchor)
range.count = newRow - anchor + 1;
else
range.count = newRow - anchor - 1;
WMSetListSelectionToRange(lPtr, range);
} else {
WMRange range = { .position = newRow, .count = 1 };
WMSetListSelectionToRange(lPtr, range);
lastClicked = newRow;
}
} else {
WMSelectListItem(lPtr, newRow);
lastClicked = newRow;
}
/* Ensure visibility */
if (newRow < lPtr->topItem) {
lPtr->topItem = newRow;
if (lPtr->view->flags.realized)
updateScroller(lPtr);
}
/* Trigger action callback */
if (lPtr->action)
(*lPtr->action) (lPtr, lPtr->clientData);
}
break;
}
case XK_Down: {
int newRow;
int itemCount = WMGetArrayItemCount(lPtr->items);
int cur = WMGetListSelectedItemRow(lPtr);
if (lPtr->flags.allowMultipleSelection && WMGetArrayItemCount(lPtr->selectedItems) > 0) {
WMListItem *lastSel = WMGetFromArray(lPtr->selectedItems, WMGetArrayItemCount(lPtr->selectedItems) - 1);
if (lastSel)
cur = WMGetFirstInArray(lPtr->items, lastSel);
}
if (cur == WLNotFound)
cur = lPtr->topItem;
newRow = cur + 1;
if (newRow >= itemCount)
newRow = itemCount - 1;
if (newRow != cur && itemCount > 0) {
if (lPtr->flags.allowMultipleSelection) {
if (event->xkey.state & ShiftMask) {
WMRange range;
int anchor = WMGetListSelectedItemRow(lPtr);
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
anchor = cur;
}
range.position = anchor;
if (newRow >= anchor)
range.count = newRow - anchor + 1;
else
range.count = newRow - anchor - 1;
WMSetListSelectionToRange(lPtr, range);
} else {
WMRange range = { .position = newRow, .count = 1 };
WMSetListSelectionToRange(lPtr, range);
lastClicked = newRow;
}
} else {
WMSelectListItem(lPtr, newRow);
lastClicked = newRow;
}
/* Ensure visibility */
if (newRow > (lPtr->topItem + lPtr->fullFitLines - 1)) {
lPtr->topItem = newRow - lPtr->fullFitLines + 1;
if (lPtr->topItem < 0)
lPtr->topItem = 0;
/* Ensure we don't scroll past the end */
if (lPtr->topItem + lPtr->fullFitLines > itemCount)
lPtr->topItem = itemCount - lPtr->fullFitLines;
if (lPtr->topItem < 0)
lPtr->topItem = 0;
if (lPtr->view->flags.realized)
updateScroller(lPtr);
}
/* Trigger action callback */
if (lPtr->action)
(*lPtr->action) (lPtr, lPtr->clientData);
}
break;
}
case XK_Page_Up: {
int newRow;
int page = lPtr->fullFitLines > 0 ? lPtr->fullFitLines : 1;
int cur = WMGetListSelectedItemRow(lPtr);
if (cur == WLNotFound)
cur = lPtr->topItem;
newRow = cur - page;
if (newRow < 0)
newRow = 0;
if (newRow != cur) {
if (lPtr->flags.allowMultipleSelection) {
if (event->xkey.state & ShiftMask) {
WMRange range;
int anchor = WMGetListSelectedItemRow(lPtr);
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
anchor = cur;
}
range.position = anchor;
if (newRow >= anchor)
range.count = newRow - anchor + 1;
else
range.count = newRow - anchor - 1;
WMSetListSelectionToRange(lPtr, range);
} else {
WMRange range = { .position = newRow, .count = 1 };
WMSetListSelectionToRange(lPtr, range);
lastClicked = newRow;
}
} else {
WMSelectListItem(lPtr, newRow);
lastClicked = newRow;
}
if (newRow < lPtr->topItem) {
lPtr->topItem = newRow;
if (lPtr->view->flags.realized)
updateScroller(lPtr);
}
/* Trigger action callback */
if (lPtr->action)
(*lPtr->action) (lPtr, lPtr->clientData);
}
break;
}
case XK_Page_Down: {
int newRow;
int page = lPtr->fullFitLines > 0 ? lPtr->fullFitLines : 1;
int itemCount = WMGetArrayItemCount(lPtr->items);
int cur = WMGetListSelectedItemRow(lPtr);
if (cur == WLNotFound)
cur = lPtr->topItem;
newRow = cur + page;
if (newRow >= itemCount)
newRow = itemCount - 1;
if (newRow != cur && itemCount > 0) {
if (lPtr->flags.allowMultipleSelection) {
if (event->xkey.state & ShiftMask) {
WMRange range;
int anchor = WMGetListSelectedItemRow(lPtr);
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
anchor = cur;
}
range.position = anchor;
if (newRow >= anchor)
range.count = newRow - anchor + 1;
else
range.count = newRow - anchor - 1;
WMSetListSelectionToRange(lPtr, range);
} else {
WMRange range = { .position = newRow, .count = 1 };
WMSetListSelectionToRange(lPtr, range);
lastClicked = newRow;
}
} else {
WMSelectListItem(lPtr, newRow);
lastClicked = newRow;
}
/* Ensure visibility */
if (newRow > (lPtr->topItem + lPtr->fullFitLines - 1)) {
lPtr->topItem = newRow - lPtr->fullFitLines + 1;
if (lPtr->topItem < 0)
lPtr->topItem = 0;
/* Ensure we don't scroll past the end */
if (lPtr->topItem + lPtr->fullFitLines > itemCount)
lPtr->topItem = itemCount - lPtr->fullFitLines;
if (lPtr->topItem < 0)
lPtr->topItem = 0;
if (lPtr->view->flags.realized)
updateScroller(lPtr);
}
/* Trigger action callback */
if (lPtr->action)
(*lPtr->action) (lPtr, lPtr->clientData);
}
break;
}
case XK_Home: {
int itemCount = WMGetArrayItemCount(lPtr->items);
if (itemCount > 0) {
int newRow = 0;
if (lPtr->flags.allowMultipleSelection) {
if (event->xkey.state & ShiftMask) {
WMRange range;
int anchor = WMGetListSelectedItemRow(lPtr);
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
anchor = lPtr->topItem;
}
range.position = anchor;
if (newRow >= anchor)
range.count = newRow - anchor + 1;
else
range.count = newRow - anchor - 1;
WMSetListSelectionToRange(lPtr, range);
} else {
WMRange range = { .position = newRow, .count = 1 };
WMSetListSelectionToRange(lPtr, range);
lastClicked = newRow;
}
} else {
WMSelectListItem(lPtr, newRow);
lastClicked = newRow;
}
if (newRow < lPtr->topItem) {
lPtr->topItem = newRow;
if (lPtr->view->flags.realized)
updateScroller(lPtr);
}
/* Trigger action callback */
if (lPtr->action)
(*lPtr->action) (lPtr, lPtr->clientData);
}
break;
}
case XK_End: {
int itemCount = WMGetArrayItemCount(lPtr->items);
if (itemCount > 0) {
int newRow = itemCount - 1;
if (lPtr->flags.allowMultipleSelection) {
if (event->xkey.state & ShiftMask) {
WMRange range;
int anchor = WMGetListSelectedItemRow(lPtr);
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
anchor = lPtr->topItem;
}
range.position = anchor;
if (newRow >= anchor)
range.count = newRow - anchor + 1;
else
range.count = newRow - anchor - 1;
WMSetListSelectionToRange(lPtr, range);
} else {
WMRange range = { .position = newRow, .count = 1 };
WMSetListSelectionToRange(lPtr, range);
lastClicked = newRow;
}
} else {
WMSelectListItem(lPtr, newRow);
lastClicked = newRow;
}
/* Ensure the last item is fully visible */
lPtr->topItem = itemCount - lPtr->fullFitLines;
if (lPtr->topItem < 0)
lPtr->topItem = 0;
if (lPtr->view->flags.realized)
updateScroller(lPtr);
/* Trigger action callback */
if (lPtr->action)
(*lPtr->action) (lPtr, lPtr->clientData);
}
break;
}
default:
break;
}
/* If we handled a navigation keysym, avoid falling through to typeahead logic */
if (ksym == XK_Up || ksym == XK_Down || ksym == XK_Page_Up || ksym == XK_Page_Down || ksym == XK_Home || ksym == XK_End)
break;
if (len <= 0)
break;
buffer[len] = '\0';
if (ksym == XK_Escape) {
if (lPtr->typeaheadID) {
WMDeleteTimerHandler(lPtr->typeaheadID);
lPtr->typeaheadID = NULL;
}
if (lPtr->typeahead) {
lPtr->typeahead[0] = '\0';
lPtr->typeaheadLen = 0;
}
break;
}
if (ksym == XK_BackSpace) {
if (lPtr->typeaheadLen > 0 && lPtr->typeahead) {
lPtr->typeaheadLen--;
lPtr->typeahead[lPtr->typeaheadLen] = '\0';
}
} else if (len == 1 && isalnum((unsigned char)buffer[0])) {
if (!lPtr->typeahead) {
lPtr->typeahead = wmalloc(2);
lPtr->typeaheadLen = 0;
}
lPtr->typeahead = wrealloc(lPtr->typeahead, lPtr->typeaheadLen + 2);
lPtr->typeahead[lPtr->typeaheadLen] = buffer[0];
lPtr->typeaheadLen++;
lPtr->typeahead[lPtr->typeaheadLen] = '\0';
} else {
break;
}
if (lPtr->typeaheadLen > 0)
jumpToFirstItemWithPrefix(lPtr, lPtr->typeahead, lPtr->typeaheadLen);
if (lPtr->typeaheadID) {
WMDeleteTimerHandler(lPtr->typeaheadID);
lPtr->typeaheadID = NULL;
}
if (lPtr->typeaheadLen > 0)
lPtr->typeaheadID = WMAddTimerHandler(TYPEAHEAD_CLEAR_DELAY, typeaheadTimeout, lPtr);
break;
} }
if (lPtr->topItem != topItem) if (lPtr->topItem != topItem)
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL); WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
@@ -1123,6 +1605,10 @@ static void destroyList(List * lPtr)
WMDeleteTimerHandler(lPtr->selectID); WMDeleteTimerHandler(lPtr->selectID);
lPtr->selectID = NULL; lPtr->selectID = NULL;
if (lPtr->typeaheadID)
WMDeleteTimerHandler(lPtr->typeaheadID);
lPtr->typeaheadID = NULL;
if (lPtr->selectedItems) if (lPtr->selectedItems)
WMFreeArray(lPtr->selectedItems); WMFreeArray(lPtr->selectedItems);
@@ -1132,6 +1618,9 @@ static void destroyList(List * lPtr)
if (lPtr->doubleBuffer) if (lPtr->doubleBuffer)
XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer); XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer);
if (lPtr->typeahead)
wfree(lPtr->typeahead);
WMRemoveNotificationObserver(lPtr); WMRemoveNotificationObserver(lPtr);
wfree(lPtr); wfree(lPtr);
+3 -3
View File
@@ -25,7 +25,7 @@ static void handleKeyPress(XEvent * event, void *clientData)
XLookupString(&event->xkey, NULL, 0, &ksym, NULL); XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
if (ksym == XK_Return && panel->defBtn) { if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
WMPerformButtonClick(panel->defBtn); WMPerformButtonClick(panel->defBtn);
} else if (ksym == XK_Escape) { } else if (ksym == XK_Escape) {
if (panel->altBtn || panel->othBtn) { if (panel->altBtn || panel->othBtn) {
@@ -421,7 +421,7 @@ static void handleKeyPress2(XEvent * event, void *clientData)
XLookupString(&event->xkey, NULL, 0, &ksym, NULL); XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
if (ksym == XK_Return && panel->defBtn) { if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
WMPerformButtonClick(panel->defBtn); WMPerformButtonClick(panel->defBtn);
} else if (ksym == XK_Escape) { } else if (ksym == XK_Escape) {
if (panel->altBtn) { if (panel->altBtn) {
@@ -709,7 +709,7 @@ static void handleKeyPress3(XEvent * event, void *clientData)
XLookupString(&event->xkey, NULL, 0, &ksym, NULL); XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
if (ksym == XK_Return && panel->defBtn) { if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
WMPerformButtonClick(panel->defBtn); WMPerformButtonClick(panel->defBtn);
} else if (ksym == XK_Escape) { } else if (ksym == XK_Escape) {
if (panel->altBtn) { if (panel->altBtn) {
+50
View File
@@ -252,6 +252,56 @@ WMMenuItem *WMGetPopUpButtonMenuItem(WMPopUpButton * bPtr, int index)
return WMGetFromArray(bPtr->items, index); return WMGetFromArray(bPtr->items, index);
} }
int WMSelectPopUpButtonPreviousItem(WMPopUpButton * bPtr)
{
int testIndex;
CHECK_CLASS(bPtr, WC_PopUpButton);
if (bPtr->flags.pullsDown || bPtr->selectedItemIndex < 0)
return -1;
testIndex = bPtr->selectedItemIndex - 1;
while (testIndex >= 0 && !WMGetPopUpButtonItemEnabled(bPtr, testIndex))
testIndex--;
if (testIndex != -1) {
WMSetPopUpButtonSelectedItem(bPtr, testIndex);
if (bPtr->action)
(*bPtr->action) (bPtr, bPtr->clientData);
return testIndex;
}
return -1;
}
int WMSelectPopUpButtonNextItem(WMPopUpButton * bPtr)
{
int itemCount;
int testIndex;
CHECK_CLASS(bPtr, WC_PopUpButton);
if (bPtr->flags.pullsDown || bPtr->selectedItemIndex < 0)
return -1;
itemCount = WMGetArrayItemCount(bPtr->items);
testIndex = bPtr->selectedItemIndex + 1;
while (testIndex < itemCount && !WMGetPopUpButtonItemEnabled(bPtr, testIndex))
testIndex++;
if (testIndex != itemCount) {
WMSetPopUpButtonSelectedItem(bPtr, testIndex);
if (bPtr->action)
(*bPtr->action) (bPtr, bPtr->clientData);
return testIndex;
}
return -1;
}
static void paintPopUpButton(PopUpButton * bPtr) static void paintPopUpButton(PopUpButton * bPtr)
{ {
W_Screen *scr = bPtr->view->screen; W_Screen *scr = bPtr->view->screen;
+20 -17
View File
@@ -166,12 +166,15 @@ typedef struct W_Text {
WMArray *xdndDestinationTypes; WMArray *xdndDestinationTypes;
} Text; } Text;
/* not used */
#if 0
#define NOTIFY(T,C,N,A) {\ #define NOTIFY(T,C,N,A) {\
WMNotification *notif = WMCreateNotification(N,T,A);\ WMNotification *notif = WMCreateNotification(N,T,A);\
if ((T)->delegate && (T)->delegate->C)\ if ((T)->delegate && (T)->delegate->C)\
(*(T)->delegate->C)((T)->delegate,notif);\ (*(T)->delegate->C)((T)->delegate,notif);\
WMPostNotification(notif);\ WMPostNotification(notif);\
WMReleaseNotification(notif);} WMReleaseNotification(notif);}
#endif
#define TYPETEXT 0 #define TYPETEXT 0
@@ -216,9 +219,9 @@ static char *default_bullet[] = {
}; };
/* These id are used when sharing the selected text between applications */ /* These id are used when sharing the selected text between applications */
static Atom XA_Targets = None; static Atom XA_TARGETS = None;
static Atom XA_Format_Text = None; static Atom XA_TEXT = None;
static Atom XA_Format_Compound_Text = None; static Atom XA_COMPOUND_TEXT = None;
static void handleEvents(XEvent * event, void *data); static void handleEvents(XEvent * event, void *data);
static void layOutDocument(Text * tPtr); static void layOutDocument(Text * tPtr);
@@ -622,7 +625,7 @@ static void paintText(Text * tPtr)
TextBlock *tb; TextBlock *tb;
WMFont *font; WMFont *font;
const char *text; const char *text;
int len, y, c, s, done = False, dir /* 1 = down */ ; int len, y, c, s, done = False, dir; /* dir 1 = down */
WMScreen *scr = tPtr->view->screen; WMScreen *scr = tPtr->view->screen;
Display *dpy = tPtr->view->screen->display; Display *dpy = tPtr->view->screen->display;
Window win = tPtr->view->window; Window win = tPtr->view->window;
@@ -2047,7 +2050,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
(void) selection; (void) selection;
(void) cdata; (void) cdata;
if (target == XA_STRING || target == XA_Format_Text || target == XA_Format_Compound_Text) { if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
char *text = WMGetTextSelectedStream(tPtr); char *text = WMGetTextSelectedStream(tPtr);
if (text) { if (text) {
@@ -2060,18 +2063,18 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
} else } else
printf("didn't get it\n"); printf("didn't get it\n");
if (target == XA_Targets) { if (target == XA_TARGETS) {
Atom array[4]; Atom supported_type[4];
array[0] = XA_Targets; supported_type[0] = XA_TARGETS;
array[1] = XA_STRING; supported_type[1] = XA_STRING;
array[2] = XA_Format_Text; supported_type[2] = XA_TEXT;
array[3] = XA_Format_Compound_Text; supported_type[3] = XA_COMPOUND_TEXT;
data = WMCreateDataWithBytes(&array, sizeof(array)); data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
WMSetDataFormat(data, 32); WMSetDataFormat(data, 32);
*type = target; *type = XA_ATOM;
return data; return data;
} }
@@ -2974,15 +2977,15 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi
dpy = tPtr->view->screen->display; dpy = tPtr->view->screen->display;
scr = tPtr->view->screen; scr = tPtr->view->screen;
if (XA_Targets == None) { if (XA_TARGETS == None) {
/* /*
* Because the X protocol guaranties that the value will never change in * Because the X protocol guaranties that the value will never change in
* the lifespan of the server, we query the values only the first time a * the lifespan of the server, we query the values only the first time a
* widget is created * widget is created
*/ */
XA_Targets = XInternAtom(dpy, "TARGETS", False); XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
XA_Format_Text = XInternAtom(dpy, "TEXT", False); XA_TEXT = XInternAtom(dpy, "TEXT", False);
XA_Format_Compound_Text = XInternAtom(dpy, "COMPOUND_TEXT", False); XA_COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
} }
tPtr->view->self = tPtr; tPtr->view->self = tPtr;
+72 -42
View File
@@ -239,9 +239,9 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
TextField *tPtr = view->self; TextField *tPtr = view->self;
int count; int count;
Display *dpy = tPtr->view->screen->display; Display *dpy = tPtr->view->screen->display;
Atom _TARGETS; Atom XA_TARGETS;
Atom TEXT = XInternAtom(dpy, "TEXT", False); Atom XA_TEXT = XInternAtom(dpy, "TEXT", False);
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False); Atom XA_COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
WMData *data; WMData *data;
/* Parameter not used, but tell the compiler that it is ok */ /* Parameter not used, but tell the compiler that it is ok */
@@ -251,7 +251,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
count = tPtr->selection.count < 0 count = tPtr->selection.count < 0
? tPtr->selection.position + tPtr->selection.count : tPtr->selection.position; ? tPtr->selection.position + tPtr->selection.count : tPtr->selection.position;
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) { if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
data = WMCreateDataWithBytes(&(tPtr->text[count]), abs(tPtr->selection.count)); data = WMCreateDataWithBytes(&(tPtr->text[count]), abs(tPtr->selection.count));
WMSetDataFormat(data, 8); WMSetDataFormat(data, 8);
@@ -260,19 +260,19 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
return data; return data;
} }
_TARGETS = XInternAtom(dpy, "TARGETS", False); XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
if (target == _TARGETS) { if (target == XA_TARGETS) {
Atom supported_type[4]; Atom supported_type[4];
supported_type[0] = _TARGETS; supported_type[0] = XA_TARGETS;
supported_type[1] = XA_STRING; supported_type[1] = XA_STRING;
supported_type[2] = TEXT; supported_type[2] = XA_TEXT;
supported_type[3] = COMPOUND_TEXT; supported_type[3] = XA_COMPOUND_TEXT;
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type)); data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
WMSetDataFormat(data, 32); WMSetDataFormat(data, 32);
*type = target; *type = XA_ATOM;
return data; return data;
} }
@@ -446,6 +446,13 @@ void WMDeleteTextFieldRange(WMTextField * tPtr, WMRange range)
decrToFit(tPtr); decrToFit(tPtr);
/* Ensure cursor is visible after deletion */
if (tPtr->cursorPosition < tPtr->viewPosition) {
tPtr->viewPosition = tPtr->cursorPosition;
} else {
incrToFit2(tPtr);
}
paintTextField(tPtr); paintTextField(tPtr);
} }
@@ -490,11 +497,6 @@ void WMSetTextFieldAlignment(WMTextField * tPtr, WMAlignment alignment)
tPtr->flags.alignment = alignment; tPtr->flags.alignment = alignment;
if (alignment != WALeft) {
wwarning(_("only left alignment is supported in textfields"));
return;
}
if (tPtr->view->flags.realized) { if (tPtr->view->flags.realized) {
paintTextField(tPtr); paintTextField(tPtr);
} }
@@ -661,7 +663,7 @@ static void didResizeTextField(W_ViewDelegate * self, WMView * view)
tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1); tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth /*+ 2 */ ; tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth;
} }
static char *makeHiddenString(int length) static char *makeHiddenString(int length)
@@ -846,8 +848,8 @@ static void paintTextField(TextField * tPtr)
count = tPtr->viewPosition; count = tPtr->viewPosition;
} }
rx = tPtr->offsetWidth + 1 + WMWidthOfString(tPtr->font, text, count) rx = tx + WMWidthOfString(tPtr->font, &(text[tPtr->viewPosition]),
- WMWidthOfString(tPtr->font, text, tPtr->viewPosition); count - tPtr->viewPosition);
WMDrawImageString(screen, drawbuffer, color, screen->gray, WMDrawImageString(screen, drawbuffer, color, screen->gray,
tPtr->font, rx, ty, &(text[count]), count2); tPtr->font, rx, ty, &(text[count]), count2);
@@ -1029,7 +1031,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
case XK_Left: case XK_Left:
if (tPtr->cursorPosition > 0) { if (tPtr->cursorPosition > 0) {
int i; int i;
paintCursor(tPtr);
i = tPtr->cursorPosition; i = tPtr->cursorPosition;
i += oneUTF8CharBackward(&tPtr->text[i], i); i += oneUTF8CharBackward(&tPtr->text[i], i);
@@ -1045,9 +1046,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
if (tPtr->cursorPosition < tPtr->viewPosition) { if (tPtr->cursorPosition < tPtr->viewPosition) {
tPtr->viewPosition = tPtr->cursorPosition; tPtr->viewPosition = tPtr->cursorPosition;
}
refresh = 1; refresh = 1;
} else
paintCursor(tPtr);
} }
if (shifted) if (shifted)
cancelSelection = 0; cancelSelection = 0;
@@ -1070,7 +1070,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
case XK_Right: case XK_Right:
if (tPtr->cursorPosition < tPtr->textLen) { if (tPtr->cursorPosition < tPtr->textLen) {
int i; int i;
paintCursor(tPtr);
i = tPtr->cursorPosition; i = tPtr->cursorPosition;
if (controled) { if (controled) {
@@ -1083,10 +1082,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
} }
tPtr->cursorPosition = i; tPtr->cursorPosition = i;
refresh = incrToFit2(tPtr); incrToFit2(tPtr);
refresh = 1;
if (!refresh)
paintCursor(tPtr);
} }
if (shifted) if (shifted)
cancelSelection = 0; cancelSelection = 0;
@@ -1109,13 +1106,11 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
case XK_Home: case XK_Home:
if (!controled) { if (!controled) {
if (tPtr->cursorPosition > 0) { if (tPtr->cursorPosition > 0) {
paintCursor(tPtr);
tPtr->cursorPosition = 0; tPtr->cursorPosition = 0;
if (tPtr->viewPosition > 0) { if (tPtr->viewPosition > 0) {
tPtr->viewPosition = 0; tPtr->viewPosition = 0;
}
refresh = 1; refresh = 1;
} else
paintCursor(tPtr);
} }
if (shifted) if (shifted)
cancelSelection = 0; cancelSelection = 0;
@@ -1138,14 +1133,11 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
case XK_End: case XK_End:
if (!controled) { if (!controled) {
if (tPtr->cursorPosition < tPtr->textLen) { if (tPtr->cursorPosition < tPtr->textLen) {
paintCursor(tPtr);
tPtr->cursorPosition = tPtr->textLen; tPtr->cursorPosition = tPtr->textLen;
tPtr->viewPosition = 0; tPtr->viewPosition = 0;
refresh = incrToFit(tPtr); incrToFit(tPtr);
refresh = 1;
if (!refresh)
paintCursor(tPtr);
} }
if (shifted) if (shifted)
cancelSelection = 0; cancelSelection = 0;
@@ -1408,7 +1400,25 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
tPtr->viewPosition); tPtr->viewPosition);
} }
if (tPtr->flags.alignment == WARight) {
int textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
if (textWidth < tPtr->usableWidth) {
tPtr->cursorPosition = pointToCursorPosition(tPtr,
event->xmotion.x - tPtr->usableWidth + textWidth);
} else {
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x); tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
}
} else if (tPtr->flags.alignment == WACenter) {
int textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
if (textWidth < tPtr->usableWidth) {
tPtr->cursorPosition = pointToCursorPosition(tPtr,
event->xmotion.x - (tPtr->usableWidth - textWidth) / 2);
} else {
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
}
} else {
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
}
/* Do not allow text selection in secure textfields */ /* Do not allow text selection in secure textfields */
if (tPtr->flags.secure) { if (tPtr->flags.secure) {
@@ -1441,10 +1451,6 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
if (tPtr->flags.enabled && !tPtr->flags.focused) { if (tPtr->flags.enabled && !tPtr->flags.focused) {
WMSetFocusToWidget(tPtr); WMSetFocusToWidget(tPtr);
} }
if (tPtr->flags.focused) {
tPtr->selection.position = tPtr->cursorPosition;
tPtr->selection.count = 0;
}
if (textWidth < tPtr->usableWidth) { if (textWidth < tPtr->usableWidth) {
tPtr->cursorPosition = pointToCursorPosition(tPtr, tPtr->cursorPosition = pointToCursorPosition(tPtr,
event->xbutton.x - tPtr->usableWidth event->xbutton.x - tPtr->usableWidth
@@ -1452,6 +1458,28 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
} else } else
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x); tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
if (tPtr->flags.focused) {
tPtr->selection.position = tPtr->cursorPosition;
tPtr->selection.count = 0;
}
paintTextField(tPtr);
break;
case WACenter:
textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
if (tPtr->flags.enabled && !tPtr->flags.focused) {
WMSetFocusToWidget(tPtr);
}
if (textWidth < tPtr->usableWidth) {
tPtr->cursorPosition = pointToCursorPosition(tPtr,
event->xbutton.x - (tPtr->usableWidth - textWidth) / 2);
} else {
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
}
if (tPtr->flags.focused) {
tPtr->selection.position = tPtr->cursorPosition;
tPtr->selection.count = 0;
}
paintTextField(tPtr); paintTextField(tPtr);
break; break;
@@ -1465,6 +1493,11 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
tPtr->selection.count = 0; tPtr->selection.count = 0;
paintTextField(tPtr); paintTextField(tPtr);
} }
break;
default:
break;
}
if (event->xbutton.button == Button2 && tPtr->flags.enabled) { if (event->xbutton.button == Button2 && tPtr->flags.enabled) {
char *text; char *text;
int n; int n;
@@ -1484,10 +1517,7 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
tPtr->flags.waitingSelection = 1; tPtr->flags.waitingSelection = 1;
} }
} }
break;
default:
break;
}
break; break;
case ButtonRelease: case ButtonRelease:
+4
View File
@@ -395,7 +395,11 @@ static void setWindowMakerHints(WMWindow * win)
memset(&attribs, 0, sizeof(GNUstepWMAttributes)); memset(&attribs, 0, sizeof(GNUstepWMAttributes));
attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr | GSExtraFlagsAttr; attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr | GSExtraFlagsAttr;
if (win->minSize.width == win->maxSize.width && win->minSize.height == win->maxSize.height)
win->flags.style &= ~WMResizableWindowMask;
attribs.window_style = win->flags.style; attribs.window_style = win->flags.style;
attribs.window_level = win->level; attribs.window_level = win->level;
if (win->flags.documentEdited) if (win->flags.documentEdited)
attribs.extra_flags = GSDocumentEditedFlag; attribs.extra_flags = GSDocumentEditedFlag;
+17 -5
View File
@@ -1076,6 +1076,8 @@ static void deleteTexture(WMWidget * w, void *data)
(void) w; (void) w;
section = WMGetPopUpButtonSelectedItem(panel->secP); section = WMGetPopUpButtonSelectedItem(panel->secP);
if (section < 0)
return;
row = WMGetListSelectedItemRow(panel->texLs); row = WMGetListSelectedItemRow(panel->texLs);
item = WMGetListItem(panel->texLs, row); item = WMGetListItem(panel->texLs, row);
titem = (TextureListItem *) item->clientData; titem = (TextureListItem *) item->clientData;
@@ -1134,6 +1136,8 @@ static void changePage(WMWidget * w, void *data)
if (w) { if (w) {
section = WMGetPopUpButtonSelectedItem(panel->secP); section = WMGetPopUpButtonSelectedItem(panel->secP);
if (section < 0)
return;
WMSelectListItem(panel->texLs, panel->textureIndex[section]); WMSelectListItem(panel->texLs, panel->textureIndex[section]);
@@ -1233,6 +1237,8 @@ static void textureDoubleClick(WMWidget * w, void *data)
/* unselect old texture */ /* unselect old texture */
section = WMGetPopUpButtonSelectedItem(panel->secP); section = WMGetPopUpButtonSelectedItem(panel->secP);
if (section < 0)
return;
item = WMGetListItem(panel->texLs, panel->textureIndex[section]); item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
titem = (TextureListItem *) item->clientData; titem = (TextureListItem *) item->clientData;
@@ -1261,7 +1267,7 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
{ {
_Panel *panel = (_Panel *) WMGetHangedData(lPtr); _Panel *panel = (_Panel *) WMGetHangedData(lPtr);
WMScreen *scr = WMWidgetScreen(lPtr); WMScreen *scr = WMWidgetScreen(lPtr);
int width, height, x, y; int width, height, x, y, tmp;
Display *dpy = WMScreenDisplay(scr); Display *dpy = WMScreenDisplay(scr);
WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr); WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr);
WMListItem *item; WMListItem *item;
@@ -1290,7 +1296,8 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0, XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5); TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
if ((1 << WMGetPopUpButtonSelectedItem(panel->secP)) & titem->selectedFor) tmp = WMGetPopUpButtonSelectedItem(panel->secP);
if ((tmp >= 0) && ((1 << tmp) & titem->selectedFor))
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6); WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
else if (titem->selectedFor) else if (titem->selectedFor)
WMDrawPixmap(panel->offLed, d, x + TEXPREV_WIDTH + 10, y + 6); WMDrawPixmap(panel->offLed, d, x + TEXPREV_WIDTH + 10, y + 6);
@@ -1425,6 +1432,10 @@ static void changeColorPage(WMWidget * w, void *data)
WMScreen *scr = WMWidgetScreen(panel->box); WMScreen *scr = WMWidgetScreen(panel->box);
RContext *rc = WMScreenRContext(scr); RContext *rc = WMScreenRContext(scr);
section = WMGetPopUpButtonSelectedItem(panel->colP);
if (section < 0)
return;
if (panel->preview) { if (panel->preview) {
GC gc; GC gc;
@@ -1436,7 +1447,6 @@ static void changeColorPage(WMWidget * w, void *data)
colorOptions[panel->oldcsection].hand.y); colorOptions[panel->oldcsection].hand.y);
} }
if (w) { if (w) {
section = WMGetPopUpButtonSelectedItem(panel->colP);
panel->oldcsection = section; panel->oldcsection = section;
if (panel->preview) if (panel->preview)
@@ -1737,6 +1747,8 @@ static void colorWellObserver(void *self, WMNotification * n)
(void) n; (void) n;
p = WMGetPopUpButtonSelectedItem(panel->colP); p = WMGetPopUpButtonSelectedItem(panel->colP);
if (p < 0)
return;
WMReleaseColor(panel->colors[p]); WMReleaseColor(panel->colors[p]);
@@ -1831,7 +1843,7 @@ static void createPanel(Panel * p)
panel->fprefix = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME); panel->fprefix = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
if (access(panel->fprefix, F_OK) != 0) { if (access(panel->fprefix, F_OK) != 0) {
if (mkdir(panel->fprefix, 0755) < 0) { if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
werror("%s", panel->fprefix); werror("%s", panel->fprefix);
ok = False; ok = False;
} }
@@ -1841,7 +1853,7 @@ static void createPanel(Panel * p)
wfree(panel->fprefix); wfree(panel->fprefix);
panel->fprefix = tmp; panel->fprefix = tmp;
if (access(panel->fprefix, F_OK) != 0) { if (access(panel->fprefix, F_OK) != 0) {
if (mkdir(panel->fprefix, 0755) < 0) { if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
werror("%s", panel->fprefix); werror("%s", panel->fprefix);
} }
} }
+160 -6
View File
@@ -2,8 +2,9 @@
* *
* WPrefs - Window Maker Preferences Program * WPrefs - Window Maker Preferences Program
* *
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 1998-2003 Alfredo K. Kojima * Copyright (c) 1998-2003 Alfredo K. Kojima
* Copyright (c) 2009-2026 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -25,7 +26,7 @@
/* This structure containts the list of all the check-buttons to display in the /* This structure containts the list of all the check-buttons to display in the
* expert tab of the window with the corresponding information for effect * expert tab of the window with the corresponding information for effect
*/ */
static const struct { static struct expert_option {
const char *label; /* Text displayed to user */ const char *label; /* Text displayed to user */
int def_state; /* True/False: the default value, if not defined in current config */ int def_state; /* True/False: the default value, if not defined in current config */
@@ -71,9 +72,15 @@ static const struct {
{ N_("Cycle windows only on the active head."), { N_("Cycle windows only on the active head."),
/* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" }, /* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" },
{ N_("Cycle all windows from all workspaces."),
/* default: */ False, OPTION_WMAKER, "CycleAllWorkspaces" },
{ N_("Ignore minimized windows when cycling."), { N_("Ignore minimized windows when cycling."),
/* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" }, /* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" },
{ N_("Show app icons in window list."),
/* default: */ False, OPTION_WMAKER, "WindowListAppIcons" },
{ N_("Show switch panel when cycling windows."), { N_("Show switch panel when cycling windows."),
/* default: */ True, OPTION_WMAKER_ARRAY, "SwitchPanelImages" }, /* default: */ True, OPTION_WMAKER_ARRAY, "SwitchPanelImages" },
@@ -88,7 +95,7 @@ static const struct {
/* default: */ False, OPTION_WMAKER, "KbdModeLock" }, /* default: */ False, OPTION_WMAKER, "KbdModeLock" },
#endif /* XKB_MODELOCK */ #endif /* XKB_MODELOCK */
{ N_("Maximize (snap) a window to edge or corner by dragging."), { N_("Snap a window to edge or corner by dragging."),
/* default: */ False, OPTION_WMAKER, "WindowSnapping" }, /* default: */ False, OPTION_WMAKER, "WindowSnapping" },
{ N_("Distance from edge to begin window snap."), { N_("Distance from edge to begin window snap."),
@@ -97,7 +104,7 @@ static const struct {
{ N_("Distance from corner to begin window snap."), { N_("Distance from corner to begin window snap."),
/* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" }, /* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" },
{ N_("Snapping a window to the top maximizes it to the full screen."), { N_("Snap a window to the top to maximize it to the full screen."),
/* default: */ False, OPTION_WMAKER, "SnapToTopMaximizesFullscreen" }, /* default: */ False, OPTION_WMAKER, "SnapToTopMaximizesFullscreen" },
{ N_("Allow move half-maximized windows between multiple screens."), { N_("Allow move half-maximized windows between multiple screens."),
@@ -115,7 +122,7 @@ static const struct {
{ N_("Wrap dock-attached icons around the screen edges."), { N_("Wrap dock-attached icons around the screen edges."),
/* default: */ True, OPTION_WMAKER, "WrapAppiconsInDock" }, /* default: */ True, OPTION_WMAKER, "WrapAppiconsInDock" },
{ N_("Double click on titlebar maximize a window to full screen."), { N_("Double click on titlebar maximizes/minimizes a window to/from full screen."),
/* default: */ False, OPTION_WMAKER, "DbClickFullScreen" }, /* default: */ False, OPTION_WMAKER, "DbClickFullScreen" },
{ N_("Close rootmenu when mouse (left or right) is clicked outside focus."), { N_("Close rootmenu when mouse (left or right) is clicked outside focus."),
@@ -123,6 +130,13 @@ static const struct {
{ N_("Keep dock on primary head."), { N_("Keep dock on primary head."),
/* default: */ False, OPTION_WMAKER, "KeepDockOnPrimaryHead"}, /* default: */ False, OPTION_WMAKER, "KeepDockOnPrimaryHead"},
{ N_("Allow windows to take focus using mouse wheel."),
/* default: */ False, OPTION_WMAKER, "MouseWheelFocus"},
#ifdef USE_RANDR
{ N_("Automatically (de)activate monitors on hotplug events."),
/* default: */ False, OPTION_WMAKER, "HotplugMonitor"},
#endif
}; };
@@ -140,6 +154,8 @@ typedef struct _Panel {
WMButton *swi[wlengthof_nocheck(expert_options)]; WMButton *swi[wlengthof_nocheck(expert_options)];
WMTextField *textfield[wlengthof_nocheck(expert_options)]; WMTextField *textfield[wlengthof_nocheck(expert_options)];
WMScrollView *sv;
WMWidget *frame;
} _Panel; } _Panel;
@@ -160,6 +176,124 @@ static void changeIntTextfield(void *data, int delta)
WMSetTextFieldText(textfield, buffer); WMSetTextFieldText(textfield, buffer);
} }
static void scrollViewWheelHandler(XEvent *event, void *data)
{
_Panel *panel = (_Panel *) data;
int amount, viewH, contentH, newY, maxY;
WMRect rect;
WMPoint pt;
if (!panel || !panel->sv || !panel->frame)
return;
if (event->type != ButtonPress)
return;
if (event->xbutton.button != WINGsConfiguration.mouseWheelUp &&
event->xbutton.button != WINGsConfiguration.mouseWheelDown)
return;
rect = WMGetScrollViewVisibleRect(panel->sv);
viewH = rect.size.height;
contentH = WMWidgetHeight(panel->frame);
if (event->xbutton.state & ControlMask) {
amount = viewH; /* page */
} else if (event->xbutton.state & ShiftMask) {
amount = 1; /* line */
} else {
amount = viewH / 3; /* default */
if (amount == 0)
amount = 1;
}
if (event->xbutton.button == WINGsConfiguration.mouseWheelUp)
amount = -amount;
newY = rect.pos.y + amount;
maxY = contentH - viewH;
if (maxY < 0)
maxY = 0;
if (newY < 0)
newY = 0;
if (newY > maxY)
newY = maxY;
pt.x = rect.pos.x;
pt.y = newY;
WMScrollViewScrollPoint(panel->sv, pt);
}
static void scrollViewRealizeObserver(void *self, WMNotification *not)
{
(void) not;
_Panel *panel = (_Panel *) self;
Display *dpy = NULL;
Window viewport_win = 0;
WMView *frameView;
if (!panel || !panel->frame)
return;
frameView = WMWidgetView(panel->frame);
if (frameView && frameView->parent) {
dpy = frameView->screen->display;
viewport_win = frameView->parent->window;
}
/* fallback: use the scrollview's view window if parent viewport not available */
if (!viewport_win && panel->sv) {
WMView *svView = WMWidgetView(panel->sv);
if (svView && svView->screen) {
dpy = svView->screen->display;
viewport_win = svView->window;
}
}
if (!dpy || viewport_win == 0)
return;
XGrabButton(dpy, WINGsConfiguration.mouseWheelUp, AnyModifier, viewport_win,
True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None);
XGrabButton(dpy, WINGsConfiguration.mouseWheelDown, AnyModifier, viewport_win,
True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None);
}
static void scrollViewPrepareForClose(Panel *p)
{
_Panel *panel = (_Panel *) p;
Display *dpy = NULL;
Window viewport_win = 0;
if (!panel)
return;
if (panel->frame) {
WMView *frameView = WMWidgetView(panel->frame);
if (frameView && frameView->parent) {
dpy = frameView->screen->display;
viewport_win = frameView->parent->window;
}
}
if (!viewport_win && panel->sv) {
WMView *svView = WMWidgetView(panel->sv);
if (svView && svView->screen) {
dpy = svView->screen->display;
viewport_win = svView->window;
}
}
if (dpy && viewport_win != 0) {
XUngrabButton(dpy, WINGsConfiguration.mouseWheelUp, AnyModifier, viewport_win);
XUngrabButton(dpy, WINGsConfiguration.mouseWheelDown, AnyModifier, viewport_win);
}
WMRemoveNotificationObserver(panel);
}
static void downButtonCallback(WMWidget *self, void *data) static void downButtonCallback(WMWidget *self, void *data)
{ {
(void) self; (void) self;
@@ -172,6 +306,19 @@ static void upButtonCallback(WMWidget *self, void *data)
changeIntTextfield(data, 1); changeIntTextfield(data, 1);
} }
static int cmpExpertOptions(const void *v1, const void *v2)
{
int rc;
const struct expert_option *opt1 = (struct expert_option *)v1;
const struct expert_option *opt2 = (struct expert_option *)v2;
if ((rc = strcmp(opt1->label, opt2->label)) < 0)
return -1;
else if (rc > 0)
return 1;
return 0;
}
static void createPanel(Panel *p) static void createPanel(Panel *p)
{ {
_Panel *panel = (_Panel *) p; _Panel *panel = (_Panel *) p;
@@ -195,6 +342,7 @@ static void createPanel(Panel *p)
WMSetFrameRelief(f, WRFlat); WMSetFrameRelief(f, WRFlat);
udb = WMGetStandardUserDefaults(); udb = WMGetStandardUserDefaults();
qsort(expert_options, wlengthof(expert_options), sizeof(expert_options[0]), cmpExpertOptions);
for (i = 0; i < wlengthof(expert_options); i++) { for (i = 0; i < wlengthof(expert_options); i++) {
if (expert_options[i].class != OPTION_WMAKER_INT) { if (expert_options[i].class != OPTION_WMAKER_INT) {
panel->swi[i] = WMCreateSwitchButton(f); panel->swi[i] = WMCreateSwitchButton(f);
@@ -269,7 +417,7 @@ static void createPanel(Panel *p)
default: default:
#ifdef DEBUG #ifdef DEBUG
wwarning("export_options[%d].class = %d, this should not happen\n", wwarning("expert_options[%d].class = %d, this should not happen\n",
i, expert_options[i].class); i, expert_options[i].class);
#endif #endif
state = expert_options[i].def_state; state = expert_options[i].def_state;
@@ -281,6 +429,11 @@ static void createPanel(Panel *p)
WMMapSubwidgets(panel->box); WMMapSubwidgets(panel->box);
WMSetScrollViewContentView(sv, WMWidgetView(f)); WMSetScrollViewContentView(sv, WMWidgetView(f));
/* keep references for the wheel handler and register it */
panel->sv = sv;
panel->frame = f;
WMCreateEventHandler(WMWidgetView(sv), ButtonPressMask, scrollViewWheelHandler, panel);
WMAddNotificationObserver(scrollViewRealizeObserver, panel, WMViewRealizedNotification, WMWidgetView(sv));
WMRealizeWidget(panel->box); WMRealizeWidget(panel->box);
} }
@@ -341,6 +494,7 @@ Panel *InitExpert(WMWidget *parent)
panel->callbacks.createWidgets = createPanel; panel->callbacks.createWidgets = createPanel;
panel->callbacks.updateDomain = storeDefaults; panel->callbacks.updateDomain = storeDefaults;
panel->callbacks.prepareForClose = scrollViewPrepareForClose;
AddSection(panel, ICON_FILE); AddSection(panel, ICON_FILE);
+465
View File
@@ -0,0 +1,465 @@
/* HotCornerShortcuts.c - screen corners actions
*
* WPrefs - Window Maker Preferences Program
*
* Copyright (c) 2023 Window Maker Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "WPrefs.h"
typedef struct _Panel {
WMBox *box;
char *sectionName;
char *description;
CallbackRec callbacks;
WMWidget *parent;
WMPixmap *icon;
Pixmap quarter[4];
WMFrame *hcF;
WMButton *hcB;
WMFrame *hceF;
WMSlider *hceS;
WMLabel *hceL;
WMFrame *hcdescF;
WMLabel *hcdescL;
WMFrame *hcdelayF;
WMButton *hcdelayB[5];
WMTextField *hcdelayT;
WMLabel *hcdelayL;
WMLabel *icornerL;
WMFrame *hcactionsF;
WMTextField *hcactionsT[4];
char hotcornerDelaySelected;
} _Panel;
#define ICON_FILE "hotcorners"
#define DELAY_ICON "timer%i"
#define DELAY_ICON_S "timer%is"
static void edgeCallback(WMWidget * w, void *data)
{
_Panel *panel = (_Panel *) data;
char buffer[64];
int i;
/* Parameter not used, but tell the compiler that it is ok */
(void) w;
i = WMGetSliderValue(panel->hceS);
if (i == 0)
sprintf(buffer, _("OFF"));
else if (i == 1)
sprintf(buffer, _("1 pixel"));
else if (i <= 4)
/* 2-4 */
sprintf(buffer, _("%i pixels"), i);
else
/* >4 */
sprintf(buffer, _("%i pixels "), i); /* note space! */
WMSetLabelText(panel->hceL, buffer);
}
static void showData(_Panel * panel)
{
int i;
char buffer[32];
WMPropList *array;
if (!GetObjectForKey("HotCornerDelay"))
i = 250;
else
i = GetIntegerForKey("HotCornerDelay");
sprintf(buffer, "%i", i);
WMSetTextFieldText(panel->hcdelayT, buffer);
switch (i) {
case 0:
WMPerformButtonClick(panel->hcdelayB[0]);
break;
case 250:
WMPerformButtonClick(panel->hcdelayB[1]);
break;
case 500:
WMPerformButtonClick(panel->hcdelayB[2]);
break;
case 750:
WMPerformButtonClick(panel->hcdelayB[3]);
break;
case 1000:
WMPerformButtonClick(panel->hcdelayB[4]);
break;
}
i = GetIntegerForKey("HotCornerEdge");
i = i < 0 ? 2 : i;
i = i > 10 ? 10 : i;
WMSetSliderValue(panel->hceS, i);
edgeCallback(NULL, panel);
WMSetButtonSelected(panel->hcB, GetBoolForKey("HotCorners"));
array = GetObjectForKey("HotCornerActions");
if (array && (!WMIsPLArray(array) || WMGetPropListItemCount(array) != sizeof(panel->hcactionsT) / sizeof(WMTextField *))) {
wwarning(_("invalid data in option HotCornerActions."));
} else {
if (array) {
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++)
if (strcasecmp(WMGetFromPLString(WMGetFromPLArray(array, i)), "None") != 0)
WMSetTextFieldText(panel->hcactionsT[i], WMGetFromPLString(WMGetFromPLArray(array, i)));
}
}
}
static void storeData(_Panel * panel)
{
WMPropList *list;
WMPropList *tmp;
char *str;
int i;
SetBoolForKey(WMGetButtonSelected(panel->hcB), "HotCorners");
str = WMGetTextFieldText(panel->hcdelayT);
if (sscanf(str, "%i", &i) != 1)
i = 0;
SetIntegerForKey(i, "HotCornerDelay");
free(str);
SetIntegerForKey(WMGetSliderValue(panel->hceS), "HotCornerEdge");
list = WMCreatePLArray(NULL, NULL);
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++) {
str = WMGetTextFieldText(panel->hcactionsT[i]);
if (strlen(str) == 0)
str = "None";
tmp = WMCreatePLString(str);
WMAddToPLArray(list, tmp);
}
SetObjectForKey(list, "HotCornerActions");
}
static void pushDelayButton(WMWidget * w, void *data)
{
_Panel *panel = (_Panel *) data;
panel->hotcornerDelaySelected = 1;
if (w == panel->hcdelayB[0]) {
WMSetTextFieldText(panel->hcdelayT, "0");
} else if (w == panel->hcdelayB[1]) {
WMSetTextFieldText(panel->hcdelayT, "250");
} else if (w == panel->hcdelayB[2]) {
WMSetTextFieldText(panel->hcdelayT, "500");
} else if (w == panel->hcdelayB[3]) {
WMSetTextFieldText(panel->hcdelayT, "700");
} else if (w == panel->hcdelayB[4]) {
WMSetTextFieldText(panel->hcdelayT, "1000");
}
}
static void delayTextChanged(void *observerData, WMNotification * notification)
{
_Panel *panel = (_Panel *) observerData;
int i;
/* Parameter not used, but tell the compiler that it is ok */
(void) notification;
if (panel->hotcornerDelaySelected) {
for (i = 0; i < 5; i++) {
WMSetButtonSelected(panel->hcdelayB[i], False);
}
panel->hotcornerDelaySelected = 0;
}
}
static void createPanel(Panel * p)
{
_Panel *panel = (_Panel *) p;
int i;
char *buf1, *buf2;
WMColor *color;
WMFont *font;
char *path;
RImage *xis = NULL;
WMScreen *scr = WMWidgetScreen(panel->parent);
RContext *rc = WMScreenRContext(scr);
GC gc = XCreateGC(scr->display, WMWidgetXID(panel->parent), 0, NULL);
path = LocateImage(ICON_FILE);
if (path) {
xis = RLoadImage(rc, path, 0);
if (!xis) {
wwarning(_("could not load image file %s"), path);
}
wfree(path);
}
panel->box = WMCreateBox(panel->parent);
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
/***************** Hot Corner lelf side frames *****************/
panel->hcF = WMCreateFrame(panel->box);
WMResizeWidget(panel->hcF, 240, 53);
WMMoveWidget(panel->hcF, 15, 17);
panel->hcB = WMCreateSwitchButton(panel->hcF);
WMResizeWidget(panel->hcB, 150, 30);
WMMoveWidget(panel->hcB, 15, 12);
WMSetButtonText(panel->hcB, _("Enable Hot Corners"));
WMMapSubwidgets(panel->hcF);
panel->hceF = WMCreateFrame(panel->box);
WMSetFrameTitle(panel->hceF, _("Hot Corner Edge"));
WMResizeWidget(panel->hceF, 240, 40);
WMMoveWidget(panel->hceF, 15, 77);
panel->hceS = WMCreateSlider(panel->hceF);
WMResizeWidget(panel->hceS, 80, 15);
WMMoveWidget(panel->hceS, 15, 18);
WMSetSliderMinValue(panel->hceS, 2);
WMSetSliderMaxValue(panel->hceS, 10);
WMSetSliderAction(panel->hceS, edgeCallback, panel);
panel->hceL = WMCreateLabel(panel->hceF);
WMResizeWidget(panel->hceL, 100, 15);
WMMoveWidget(panel->hceL, 105, 18);
WMMapSubwidgets(panel->hceF);
panel->hcdescF = WMCreateFrame(panel->box);
WMResizeWidget(panel->hcdescF, 240, 95);
WMMoveWidget(panel->hcdescF, 15, 130);
panel->hcdescL = WMCreateLabel(panel->hcdescF);
WMResizeWidget(panel->hcdescL, 200, 70);
WMMoveWidget(panel->hcdescL, 15, 10);
WMSetLabelText(panel->hcdescL,
_("Instructions:\n\n"
" - assign command to corner\n"
" - or leave it empty\n"));
WMMapSubwidgets(panel->hcdescF);
/***************** Hot Corner Action Delay *****************/
panel->hcdelayF = WMCreateFrame(panel->box);
WMResizeWidget(panel->hcdelayF, 245, 60);
WMMoveWidget(panel->hcdelayF, 265, 10);
WMSetFrameTitle(panel->hcdelayF, _("Hot Corner Delay"));
buf1 = wmalloc(strlen(DELAY_ICON) + 1);
buf2 = wmalloc(strlen(DELAY_ICON_S) + 1);
for (i = 0; i < 5; i++) {
char *path;
panel->hcdelayB[i] = WMCreateCustomButton(panel->hcdelayF, WBBStateChangeMask);
WMResizeWidget(panel->hcdelayB[i], 25, 25);
WMMoveWidget(panel->hcdelayB[i], 12 + (30 * i), 25);
WMSetButtonBordered(panel->hcdelayB[i], False);
WMSetButtonImagePosition(panel->hcdelayB[i], WIPImageOnly);
WMSetButtonAction(panel->hcdelayB[i], pushDelayButton, panel);
if (i > 0)
WMGroupButtons(panel->hcdelayB[0], panel->hcdelayB[i]);
sprintf(buf1, DELAY_ICON, i);
sprintf(buf2, DELAY_ICON_S, i);
path = LocateImage(buf1);
if (path) {
panel->icon = WMCreatePixmapFromFile(scr, path);
if (panel->icon) {
WMSetButtonImage(panel->hcdelayB[i], panel->icon);
WMReleasePixmap(panel->icon);
} else {
wwarning(_("could not load icon file %s"), path);
}
wfree(path);
}
path = LocateImage(buf2);
if (path) {
panel->icon = WMCreatePixmapFromFile(scr, path);
if (panel->icon) {
WMSetButtonAltImage(panel->hcdelayB[i], panel->icon);
WMReleasePixmap(panel->icon);
} else {
wwarning(_("could not load icon file %s"), path);
}
wfree(path);
}
}
wfree(buf1);
wfree(buf2);
panel->hcdelayT = WMCreateTextField(panel->hcdelayF);
WMResizeWidget(panel->hcdelayT, 36, 20);
WMMoveWidget(panel->hcdelayT, 165, 28);
WMAddNotificationObserver(delayTextChanged, panel, WMTextDidChangeNotification, panel->hcdelayT);
panel->hcdelayL = WMCreateLabel(panel->hcdelayF);
WMResizeWidget(panel->hcdelayL, 36, 16);
WMMoveWidget(panel->hcdelayL, 205, 32);
WMSetLabelText(panel->hcdelayL, _("ms"));
color = WMDarkGrayColor(scr);
font = WMSystemFontOfSize(scr, 10);
WMSetLabelTextColor(panel->hcdelayL, color);
WMSetLabelFont(panel->hcdelayL, font);
WMReleaseColor(color);
WMReleaseFont(font);
WMMapSubwidgets(panel->hcdelayF);
/***************** Set Hot Corner Actions ****************/
panel->hcactionsF = WMCreateFrame(panel->box);
WMSetFrameTitle(panel->hcactionsF, _("Hot Corner Actions"));
WMResizeWidget(panel->hcactionsF, 245, 148);
WMMoveWidget(panel->hcactionsF, 265, 77);
panel->icornerL = WMCreateLabel(panel->hcactionsF);
WMResizeWidget(panel->icornerL, 24, 24);
WMMoveWidget(panel->icornerL, 10, 18);
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
CreateImages(scr, rc, xis, ICON_FILE, &panel->icon, NULL);
if (panel->icon)
{
WMPixmap *nicon;
panel->quarter[0] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[0], gc, 0, 0, panel->icon->width/2, panel->icon->height/2, 0, 0);
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[0], WMGetPixmapMaskXID(panel->icon),
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
WMSetLabelImage(panel->icornerL, nicon);
WMReleasePixmap(nicon);
}
panel->hcactionsT[0] = WMCreateTextField(panel->hcactionsF);
WMResizeWidget(panel->hcactionsT[0], 180, 20);
WMMoveWidget(panel->hcactionsT[0], 50, 20);
panel->icornerL = WMCreateLabel(panel->hcactionsF);
WMResizeWidget(panel->icornerL, 24, 24);
WMMoveWidget(panel->icornerL, 10, 48);
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
if (panel->icon)
{
WMPixmap *nicon;
panel->quarter[1] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[1], gc, panel->icon->width/2, 0, panel->icon->width/2, panel->icon->height/2, 0, 0);
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[1], WMGetPixmapMaskXID(panel->icon),
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
WMSetLabelImage(panel->icornerL, nicon);
WMReleasePixmap(nicon);
}
panel->hcactionsT[1] = WMCreateTextField(panel->hcactionsF);
WMResizeWidget(panel->hcactionsT[1], 180, 20);
WMMoveWidget(panel->hcactionsT[1], 50, 50);
panel->icornerL = WMCreateLabel(panel->hcactionsF);
WMResizeWidget(panel->icornerL, 24, 24);
WMMoveWidget(panel->icornerL, 10, 78);
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
if (panel->icon)
{
WMPixmap *nicon;
panel->quarter[2] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[2], gc, 0, panel->icon->height/2, panel->icon->width/2, panel->icon->height/2, 0, 0);
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[2], WMGetPixmapMaskXID(panel->icon),
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
WMSetLabelImage(panel->icornerL, nicon);
WMReleasePixmap(nicon);
}
panel->hcactionsT[2] = WMCreateTextField(panel->hcactionsF);
WMResizeWidget(panel->hcactionsT[2], 180, 20);
WMMoveWidget(panel->hcactionsT[2], 50, 80);
panel->icornerL = WMCreateLabel(panel->hcactionsF);
WMResizeWidget(panel->icornerL, 24, 24);
WMMoveWidget(panel->icornerL, 10, 108);
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
if (panel->icon)
{
WMPixmap *nicon;
panel->quarter[3] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[3], gc, panel->icon->width/2, panel->icon->height/2, panel->icon->width/2, panel->icon->height/2, 0, 0);
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[3], WMGetPixmapMaskXID(panel->icon),
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
WMSetLabelImage(panel->icornerL, nicon);
WMReleasePixmap(nicon);
}
panel->hcactionsT[3] = WMCreateTextField(panel->hcactionsF);
WMResizeWidget(panel->hcactionsT[3], 180, 20);
WMMoveWidget(panel->hcactionsT[3], 50, 107);
WMMapSubwidgets(panel->hcactionsF);
if (xis)
RReleaseImage(xis);
XFreeGC(scr->display, gc);
WMRealizeWidget(panel->box);
WMMapSubwidgets(panel->box);
showData(panel);
}
static void prepareForClose(_Panel *panel)
{
int i;
WMScreen *scr = WMWidgetScreen(panel->parent);
WMReleasePixmap(panel->icon);
for (i = 0; i < sizeof(panel->quarter) / sizeof(Pixmap); i++)
XFreePixmap(scr->display, panel->quarter[i]);
}
Panel *InitHotCornerShortcuts(WMWidget *parent)
{
_Panel *panel;
panel = wmalloc(sizeof(_Panel));
panel->sectionName = _("Hot Corner Shortcut Preferences");
panel->description = _("Choose actions to perform when you move the\n"
"mouse pointer to the screen corners.");
panel->parent = parent;
panel->callbacks.createWidgets = createPanel;
panel->callbacks.updateDomain = storeData;
panel->callbacks.prepareForClose = prepareForClose;
AddSection(panel, ICON_FILE);
return panel;
}
+180 -42
View File
@@ -23,6 +23,8 @@
#include "WPrefs.h" #include "WPrefs.h"
#include <ctype.h> #include <ctype.h>
#include <sys/select.h>
#include <sys/time.h>
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/XKBlib.h> #include <X11/XKBlib.h>
@@ -65,7 +67,7 @@ typedef struct _Panel {
* First parameter is the internal keyword known by WMaker * First parameter is the internal keyword known by WMaker
* Second is the text displayed to the user * Second is the text displayed to the user
*/ */
static const struct { static struct keyOption {
const char *key; const char *key;
const char *title; const char *title;
} keyOptions[] = { } keyOptions[] = {
@@ -84,11 +86,12 @@ static const struct {
{ "RHMaximizeKey", N_("Maximize active window right half") }, { "RHMaximizeKey", N_("Maximize active window right half") },
{ "THMaximizeKey", N_("Maximize active window top half") }, { "THMaximizeKey", N_("Maximize active window top half") },
{ "BHMaximizeKey", N_("Maximize active window bottom half") }, { "BHMaximizeKey", N_("Maximize active window bottom half") },
{ "LTCMaximizeKey", N_("Maximize active window left top corner") }, { "TLCMaximizeKey", N_("Maximize active window top left corner") },
{ "RTCMaximizeKey", N_("Maximize active window right top corner") }, { "TRCMaximizeKey", N_("Maximize active window top right corner") },
{ "LBCMaximizeKey", N_("Maximize active window left bottom corner") }, { "BLCMaximizeKey", N_("Maximize active window bottom left corner") },
{ "RBCMaximizeKey", N_("Maximize active window right bottom corner") }, { "BRCMaximizeKey", N_("Maximize active window bottom right corner") },
{ "MaximusKey", N_("Maximus: Tiled maximization ") }, { "MaximusKey", N_("Tile active window") },
{ "CenterKey", N_("Center active window") },
{ "KeepOnTopKey", N_("Toggle window on top status") }, { "KeepOnTopKey", N_("Toggle window on top status") },
{ "KeepAtBottomKey",N_("Toggle window at bottom status") }, { "KeepAtBottomKey",N_("Toggle window at bottom status") },
{ "OmnipresentKey", N_("Toggle window omnipresent status") }, { "OmnipresentKey", N_("Toggle window omnipresent status") },
@@ -100,9 +103,21 @@ static const struct {
{ "SelectKey", N_("Select active window") }, { "SelectKey", N_("Select active window") },
{ "FocusNextKey", N_("Focus next window") }, { "FocusNextKey", N_("Focus next window") },
{ "FocusPrevKey", N_("Focus previous window") }, { "FocusPrevKey", N_("Focus previous window") },
/* Directional window focus */
{ "FocusWindowLeftKey", N_("Focus the window to the left") },
{ "FocusWindowRightKey", N_("Focus the window to the right") },
{ "FocusWindowUpKey", N_("Focus the window above") },
{ "FocusWindowDownKey", N_("Focus the window below") },
{ "GroupNextKey", N_("Focus next group window") }, { "GroupNextKey", N_("Focus next group window") },
{ "GroupPrevKey", N_("Focus previous group window") }, { "GroupPrevKey", N_("Focus previous group window") },
/* Vim-like Window Marking */
{ "MarkSetKey", N_("Mark window: set mark") },
{ "MarkUnsetKey", N_("Mark window: unset mark") },
{ "MarkBringKey", N_("Mark window: bring marked window here") },
{ "MarkJumpKey", N_("Mark window: jump to marked window") },
{ "MarkSwapKey", N_("Mark window: swap with marked window") },
/* Workspace Related */ /* Workspace Related */
{ "WorkspaceMapKey", N_("Open workspace pager") }, { "WorkspaceMapKey", N_("Open workspace pager") },
{ "NextWorkspaceKey", N_("Switch to next workspace") }, { "NextWorkspaceKey", N_("Switch to next workspace") },
@@ -154,10 +169,14 @@ static const struct {
/* Misc. */ /* Misc. */
{ "WindowRelaunchKey", N_("Launch new instance of application") }, { "WindowRelaunchKey", N_("Launch new instance of application") },
{ "ScreenSwitchKey", N_("Switch to Next Screen/Monitor") }, { "ScreenSwitchKey", N_("Switch to next screen/monitor") },
{ "RunKey", N_("Run application") }, { "RunKey", N_("Run application") },
{ "ExitKey", N_("Exit Window Maker") },
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") }, { "DockRaiseLowerKey", N_("Raise/Lower Dock") },
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") } { "ClipRaiseLowerKey", N_("Raise/Lower Clip") },
{ "ScreenCaptureKey", N_("Capture the entire screen") },
{ "WindowCaptureKey", N_("Capture a window") },
{ "PartialCaptureKey", N_("Capture a portion of the screen") }
#ifdef XKB_MODELOCK #ifdef XKB_MODELOCK
,{ "ToggleKbdModeKey", N_("Toggle keyboard language") } ,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
#endif /* XKB_MODELOCK */ #endif /* XKB_MODELOCK */
@@ -302,25 +321,61 @@ static int NumLockMask(Display *dpy)
return mask; return mask;
} }
/* Append the modifier prefix and key name to the keybuf */
static void build_key_combo(unsigned int xkstate, const char *keyname,
unsigned int numlock_mask, char keybuf[64])
{
if (xkstate & ControlMask)
strcat(keybuf, "Control+");
if (xkstate & ShiftMask)
strcat(keybuf, "Shift+");
if ((numlock_mask != Mod1Mask) && (xkstate & Mod1Mask))
strcat(keybuf, "Mod1+");
if ((numlock_mask != Mod2Mask) && (xkstate & Mod2Mask))
strcat(keybuf, "Mod2+");
if ((numlock_mask != Mod3Mask) && (xkstate & Mod3Mask))
strcat(keybuf, "Mod3+");
if ((numlock_mask != Mod4Mask) && (xkstate & Mod4Mask))
strcat(keybuf, "Mod4+");
if ((numlock_mask != Mod5Mask) && (xkstate & Mod5Mask))
strcat(keybuf, "Mod5+");
wstrlcat(keybuf, keyname, 64);
}
/*
* Interactively capture a key shortcut or keychain,
* function waits KeychainTimeoutDelay or 300 ms after
* each key press for another key in the chain,
* and returns the full key specification string.
*/
char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case) char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
{ {
XEvent ev; XEvent ev;
KeySym ksym, lksym, uksym; KeySym ksym, lksym, uksym;
char buffer[64]; /* Large enough for several chained chords */
char *key = NULL; char buffer[512];
char keybuf[64];
char *key;
unsigned int numlock_mask; unsigned int numlock_mask;
Bool have_key = False;
Bool chain_mode;
int timeout_ms;
timeout_ms = GetIntegerForKey("KeychainTimeoutDelay");
if (timeout_ms <= 0)
timeout_ms = 300;
buffer[0] = '\0';
/* ---- Phase 1: capture the first key (blocking) ---- */
while (*capturing) { while (*capturing) {
XAllowEvents(dpy, AsyncKeyboard, CurrentTime); XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
WMNextEvent(dpy, &ev); WMNextEvent(dpy, &ev);
if (ev.type == KeyPress && ev.xkey.keycode != 0) { if (ev.type == KeyPress && ev.xkey.keycode != 0) {
numlock_mask = NumLockMask(dpy); numlock_mask = NumLockMask(dpy);
if (xext_xkb_supported)
/* conditional mask check to get numeric keypad keys */ /* conditional mask check to get numeric keypad keys */
ksym = XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, ev.xkey.state & numlock_mask?1:0); ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
else
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, 0);
if (!IsModifierKey(ksym)) { if (!IsModifierKey(ksym)) {
if (convert_case) { if (convert_case) {
@@ -330,44 +385,95 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
key = XKeysymToString(ksym); key = XKeysymToString(ksym);
} }
*capturing = 0; keybuf[0] = '\0';
build_key_combo(ev.xkey.state, key, numlock_mask, keybuf);
wstrlcat(buffer, keybuf, sizeof(buffer));
have_key = True;
break; break;
} }
} }
WMHandleEvent(&ev); WMHandleEvent(&ev);
} }
if (!key) /* ---- Phase 2: collect additional chain keys with timeout ---- */
chain_mode = (timeout_ms > 0);
while (*capturing && chain_mode) {
int xfd = ConnectionNumber(dpy);
fd_set rfds;
struct timeval tv;
if (!XPending(dpy)) {
FD_ZERO(&rfds);
FD_SET(xfd, &rfds);
tv.tv_sec = timeout_ms / 1000;
tv.tv_usec = (timeout_ms % 1000) * 1000;
XFlush(dpy);
if (select(xfd + 1, &rfds, NULL, NULL, &tv) == 0)
break; /* timeout: the chain is complete */
}
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
WMNextEvent(dpy, &ev);
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
numlock_mask = NumLockMask(dpy);
ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode,
ev.xkey.state & numlock_mask ? 1 : 0);
if (!IsModifierKey(ksym)) {
if (convert_case) {
XConvertCase(ksym, &lksym, &uksym);
key = XKeysymToString(uksym);
} else {
key = XKeysymToString(ksym);
}
keybuf[0] = '\0';
build_key_combo(ev.xkey.state, key, numlock_mask, keybuf);
wstrlcat(buffer, " ", sizeof(buffer));
wstrlcat(buffer, keybuf, sizeof(buffer));
}
} else {
WMHandleEvent(&ev);
}
}
if (!have_key || !*capturing)
return NULL; return NULL;
buffer[0] = 0; *capturing = 0;
if (ev.xkey.state & ControlMask)
strcat(buffer, "Control+");
if (ev.xkey.state & ShiftMask)
strcat(buffer, "Shift+");
if ((numlock_mask != Mod1Mask) && (ev.xkey.state & Mod1Mask))
strcat(buffer, "Mod1+");
if ((numlock_mask != Mod2Mask) && (ev.xkey.state & Mod2Mask))
strcat(buffer, "Mod2+");
if ((numlock_mask != Mod3Mask) && (ev.xkey.state & Mod3Mask))
strcat(buffer, "Mod3+");
if ((numlock_mask != Mod4Mask) && (ev.xkey.state & Mod4Mask))
strcat(buffer, "Mod4+");
if ((numlock_mask != Mod5Mask) && (ev.xkey.state & Mod5Mask))
strcat(buffer, "Mod5+");
wstrlcat(buffer, key, sizeof(buffer));
return wstrdup(buffer); return wstrdup(buffer);
} }
/*
* check if the keystr entered is already set to another action
* if found it returns the position in the keyOptions
*/
static int isKeySet(_Panel *panel, char *keystr)
{
int i;
char *str;
for (i = 0; i < panel->actionCount; i++) {
str = NULL;
if (panel->shortcuts[i]) {
str = wtrimspace(panel->shortcuts[i]);
if (strlen(str) == 0) {
wfree(str);
str = NULL;
}
}
if (str) {
if (strcmp(keystr, str) == 0) {
wfree(str);
return i;
}
wfree(str);
}
}
return -1;
}
static void captureClick(WMWidget * w, void *data) static void captureClick(WMWidget * w, void *data)
{ {
_Panel *panel = (_Panel *) data; _Panel *panel = (_Panel *) data;
@@ -382,8 +488,21 @@ static void captureClick(WMWidget * w, void *data)
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync, GrabModeAsync, CurrentTime); XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync, GrabModeAsync, CurrentTime);
shortcut = capture_shortcut(dpy, &panel->capturing, 1); shortcut = capture_shortcut(dpy, &panel->capturing, 1);
if (shortcut) { if (shortcut) {
int key_idx = -1;
int row = WMGetListSelectedItemRow(panel->actLs); int row = WMGetListSelectedItemRow(panel->actLs);
key_idx = isKeySet(panel, shortcut);
if (key_idx >= 0 && (key_idx != row)) {
char *msg;
msg = wstrconcat(_("Key shortcut already in use by the "), _(keyOptions[key_idx].title));
WMRunAlertPanel(WMWidgetScreen(w), GetWindow(),
_("Error"),
msg,
_("OK"), NULL, NULL);
wfree(msg);
wfree(shortcut);
} else {
WMSetTextFieldText(panel->shoT, shortcut); WMSetTextFieldText(panel->shoT, shortcut);
if (row >= 0) { if (row >= 0) {
if (panel->shortcuts[row]) if (panel->shortcuts[row])
@@ -396,9 +515,10 @@ static void captureClick(WMWidget * w, void *data)
} }
} }
} }
}
panel->capturing = 0; panel->capturing = 0;
WMSetButtonText(w, _("Capture")); WMSetButtonText(w, _("Capture"));
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key.")); WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key(s)."));
XUngrabKeyboard(dpy, CurrentTime); XUngrabKeyboard(dpy, CurrentTime);
} }
@@ -410,6 +530,9 @@ static void clearShortcut(WMWidget * w, void *data)
/* Parameter not used, but tell the compiler that it is ok */ /* Parameter not used, but tell the compiler that it is ok */
(void) w; (void) w;
/* Cancel any ongoing capture so the keychain loop is unblocked */
panel->capturing = 0;
WMSetTextFieldText(panel->shoT, NULL); WMSetTextFieldText(panel->shoT, NULL);
if (row >= 0) { if (row >= 0) {
@@ -499,6 +622,20 @@ static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int stat
WMDrawString(scr, d, panel->black, panel->font, x + 20, y, text, strlen(text)); WMDrawString(scr, d, panel->black, panel->font, x + 20, y, text, strlen(text));
} }
static int cmpKeyOptions(const void *v1, const void *v2)
{
int rc;
const struct keyOption *opt1 = (struct keyOption *)v1;
const struct keyOption *opt2 = (struct keyOption *)v2;
if ((rc = strncmp(opt1->title, opt2->title, 20)) < 0)
return -1;
else if (rc > 0)
return 1;
return 0;
}
static void createPanel(Panel * p) static void createPanel(Panel * p)
{ {
_Panel *panel = (_Panel *) p; _Panel *panel = (_Panel *) p;
@@ -538,6 +675,7 @@ static void createPanel(Panel * p)
WMSetListUserDrawProc(panel->actLs, paintItem); WMSetListUserDrawProc(panel->actLs, paintItem);
WMHangData(panel->actLs, panel); WMHangData(panel->actLs, panel);
qsort(keyOptions, wlengthof(keyOptions), sizeof(keyOptions[0]), cmpKeyOptions);
for (i = 0; i < wlengthof(keyOptions); i++) { for (i = 0; i < wlengthof(keyOptions); i++) {
WMAddListItem(panel->actLs, _(keyOptions[i].title)); WMAddListItem(panel->actLs, _(keyOptions[i].title));
} }
+1
View File
@@ -35,6 +35,7 @@ WPrefs_SOURCES = \
Expert.c \ Expert.c \
Focus.c \ Focus.c \
FontSimple.c \ FontSimple.c \
HotCornerShortcuts.c \
Icons.c \ Icons.c \
KeyboardShortcuts.c \ KeyboardShortcuts.c \
Menu.c \ Menu.c \
+2
View File
@@ -291,6 +291,8 @@ static void changedItemPad(WMWidget * w, void *data)
_Panel *panel = (_Panel *) data; _Panel *panel = (_Panel *) data;
int padn = WMGetPopUpButtonSelectedItem(w); int padn = WMGetPopUpButtonSelectedItem(w);
if (padn < 0)
return;
WMUnmapWidget(panel->itemPad[panel->currentPad]); WMUnmapWidget(panel->itemPad[panel->currentPad]);
WMMapWidget(panel->itemPad[padn]); WMMapWidget(panel->itemPad[padn]);
+3 -4
View File
@@ -381,10 +381,7 @@ static void fillModifierPopUp(WMPopUpButton * pop)
if (mapping->modifiermap[idx] != 0) { if (mapping->modifiermap[idx] != 0) {
int l; int l;
for (l = 0; l < 4; l++) { for (l = 0; l < 4; l++) {
if (xext_xkb_supported) ksym = W_KeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l);
else
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0);
if (ksym != NoSymbol) if (ksym != NoSymbol)
break; break;
} }
@@ -751,6 +748,8 @@ static void storeData(_Panel * panel)
int action; int action;
action = WMGetPopUpButtonSelectedItem(panel->mouse_action[i].popup); action = WMGetPopUpButtonSelectedItem(panel->mouse_action[i].popup);
if (action < 0)
continue;
if (button_list[i].type == T_BUTTON) if (button_list[i].type == T_BUTTON)
db_value = button_actions[action].db_value; db_value = button_actions[action].db_value;
else else
+7 -3
View File
@@ -196,9 +196,13 @@ static void storeData(_Panel * panel)
int i; int i;
i = WMGetPopUpButtonSelectedItem(panel->sizeP); i = WMGetPopUpButtonSelectedItem(panel->sizeP);
if (i < 0)
return;
SetStringForKey(resize_display[i].db_value, "ResizeDisplay"); SetStringForKey(resize_display[i].db_value, "ResizeDisplay");
i = WMGetPopUpButtonSelectedItem(panel->posiP); i = WMGetPopUpButtonSelectedItem(panel->posiP);
if (i < 0)
return;
SetStringForKey(move_display[i].db_value, "MoveDisplay"); SetStringForKey(move_display[i].db_value, "MoveDisplay");
lr = WMGetButtonSelected(panel->lrB); lr = WMGetButtonSelected(panel->lrB);
@@ -280,14 +284,14 @@ static void createPanel(Panel * p)
/***************** Options ****************/ /***************** Options ****************/
panel->optF = WMCreateFrame(panel->box); panel->optF = WMCreateFrame(panel->box);
WMResizeWidget(panel->optF, 255, 94); WMResizeWidget(panel->optF, 255, 96);
WMMoveWidget(panel->optF, 15, 125); WMMoveWidget(panel->optF, 15, 125);
WMSetFrameTitle(panel->optF, _("AppIcon bouncing")); WMSetFrameTitle(panel->optF, _("AppIcon bouncing"));
for (i = 0; i < wlengthof(appicon_bouncing); i++) { for (i = 0; i < wlengthof(appicon_bouncing); i++) {
panel->bounceB[i] = WMCreateSwitchButton(panel->optF); panel->bounceB[i] = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->bounceB[i], 237, 26); WMResizeWidget(panel->bounceB[i], 237, 26);
WMMoveWidget(panel->bounceB[i], 9, 14 + i * 25); WMMoveWidget(panel->bounceB[i], 9, 16 + i * 26);
WMSetButtonText(panel->bounceB[i], _(appicon_bouncing[i].label)); WMSetButtonText(panel->bounceB[i], _(appicon_bouncing[i].label));
if (appicon_bouncing[i].default_value) if (appicon_bouncing[i].default_value)
@@ -302,7 +306,7 @@ static void createPanel(Panel * p)
/***************** Workspace border ****************/ /***************** Workspace border ****************/
panel->borderF = WMCreateFrame(panel->box); panel->borderF = WMCreateFrame(panel->box);
WMResizeWidget(panel->borderF, 220, 75); WMResizeWidget(panel->borderF, 220, 77);
WMMoveWidget(panel->borderF, 285, 144); WMMoveWidget(panel->borderF, 285, 144);
WMSetFrameTitle(panel->borderF, _("Workspace border")); WMSetFrameTitle(panel->borderF, _("Workspace border"));
+1 -1
View File
@@ -689,7 +689,7 @@ static void changeTypeCallback(WMWidget *w, void *data)
int i; int i;
newType = WMGetPopUpButtonSelectedItem(w); newType = WMGetPopUpButtonSelectedItem(w);
if (newType == panel->currentType) if (newType < 0 || newType == panel->currentType)
return; return;
if (panel->currentType >= 0) { if (panel->currentType >= 0) {
+10
View File
@@ -23,6 +23,7 @@
#include "WPrefs.h" #include "WPrefs.h"
#include <assert.h> #include <assert.h>
#include <X11/Xatom.h>
#ifdef HAVE_STDNORETURN #ifdef HAVE_STDNORETURN
#include <stdnoreturn.h> #include <stdnoreturn.h>
@@ -516,6 +517,9 @@ void Initialize(WMScreen * scr)
char **list; char **list;
int i; int i;
char *path; char *path;
long pid;
Atom net_wm_pid;
Display *dpy = WMScreenDisplay(scr);
list = RSupportedFileFormats(); list = RSupportedFileFormats();
for (i = 0; list[i] != NULL; i++) { for (i = 0; list[i] != NULL; i++) {
@@ -547,6 +551,11 @@ void Initialize(WMScreen * scr)
WMRealizeWidget(WPrefs.win); WMRealizeWidget(WPrefs.win);
net_wm_pid = XInternAtom(dpy, "_NET_WM_PID", False);
pid = (long)getpid();
XChangeProperty(dpy, WMWidgetXID(WPrefs.win), net_wm_pid, XA_CARDINAL,
32, PropModeReplace, (unsigned char *)&pid, 1);
WMSetWindowMiniwindowImage(WPrefs.win, WMGetApplicationIconImage(scr)); WMSetWindowMiniwindowImage(WPrefs.win, WMGetApplicationIconImage(scr));
WMMapWidget(WPrefs.win); WMMapWidget(WPrefs.win);
@@ -575,6 +584,7 @@ void Initialize(WMScreen * scr)
InitKeyboardSettings(WPrefs.banner); InitKeyboardSettings(WPrefs.banner);
#endif #endif
InitKeyboardShortcuts(WPrefs.banner); InitKeyboardShortcuts(WPrefs.banner);
InitHotCornerShortcuts(WPrefs.banner);
InitMouseSettings(WPrefs.banner); InitMouseSettings(WPrefs.banner);
InitAppearance(WPrefs.banner); InitAppearance(WPrefs.banner);
+2 -1
View File
@@ -33,6 +33,7 @@
#include <wraster.h> #include <wraster.h>
#include <WINGs/WINGs.h> #include <WINGs/WINGs.h>
#include <WINGs/WINGsP.h>
/* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */ /* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
#include "../src/wconfig.h" #include "../src/wconfig.h"
@@ -54,7 +55,6 @@
/****/ /****/
extern char *NOptionValueChanged; extern char *NOptionValueChanged;
extern Bool xext_xkb_supported;
typedef struct _Panel Panel; typedef struct _Panel Panel;
@@ -155,6 +155,7 @@ Panel *InitDocks(WMWidget *parent);
Panel *InitExpert(WMWidget *parent); Panel *InitExpert(WMWidget *parent);
Panel *InitFocus(WMWidget *parent); Panel *InitFocus(WMWidget *parent);
Panel *InitFontSimple(WMWidget *parent); Panel *InitFontSimple(WMWidget *parent);
Panel *InitHotCornerShortcuts(WMWidget *parent);
Panel *InitIcons(WMWidget *parent); Panel *InitIcons(WMWidget *parent);
Panel *InitKeyboardShortcuts(WMWidget *parent); Panel *InitKeyboardShortcuts(WMWidget *parent);
Panel *InitMenu(WMWidget *parent); Panel *InitMenu(WMWidget *parent);
+5 -2
View File
@@ -207,12 +207,15 @@ static void createPanel(Panel * p)
static void storeData(_Panel * panel) static void storeData(_Panel * panel)
{ {
int tmp = WMGetPopUpButtonSelectedItem(panel->posP);
if (tmp < 0)
return;
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces"); SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces"); SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace"); SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
SetStringForKey(WSNamePositions[WMGetPopUpButtonSelectedItem(panel->posP)], SetStringForKey(WSNamePositions[tmp], "WorkspaceNameDisplayPosition");
"WorkspaceNameDisplayPosition");
} }
Panel *InitWorkspace(WMWidget *parent) Panel *InitWorkspace(WMWidget *parent)
+1 -1
View File
@@ -1150,7 +1150,7 @@ static void dragItem(WEditMenu * menu, WEditMenuItem * item, Bool copy)
static XColor back = { 0, 0xffff, 0xffff, 0xffff, DoRed | DoGreen | DoBlue, 0 }; static XColor back = { 0, 0xffff, 0xffff, 0xffff, DoRed | DoGreen | DoBlue, 0 };
Display *dpy = W_VIEW_DISPLAY(menu->view); Display *dpy = W_VIEW_DISPLAY(menu->view);
WMScreen *scr = W_VIEW_SCREEN(menu->view); WMScreen *scr = W_VIEW_SCREEN(menu->view);
int x, y; int x = 0, y = 0;
int dx, dy; int dx, dy;
Bool done = False; Bool done = False;
Window blaw; Window blaw;
-4
View File
@@ -35,8 +35,6 @@
#endif #endif
char *NOptionValueChanged = "NOptionValueChanged"; char *NOptionValueChanged = "NOptionValueChanged";
Bool xext_xkb_supported = False;
#define MAX_DEATHS 64 #define MAX_DEATHS 64
@@ -157,8 +155,6 @@ int main(int argc, char **argv)
exit(0); exit(0);
} }
xext_xkb_supported = XkbQueryExtension(dpy, NULL, NULL, NULL, NULL, NULL);
WMPLSetCaseSensitive(False); WMPLSetCaseSensitive(False);
Initialize(scr); Initialize(scr);
+3 -1
View File
@@ -5,7 +5,8 @@ CATALOGS = @WPREFSMOFILES@
CLEANFILES = $(DOMAIN).pot $(CATALOGS) CLEANFILES = $(DOMAIN).pot $(CATALOGS)
EXTRA_DIST = bg.po ca.po cs.po de.po es.po et.po fi.po fr.po fy.po hr.po hu.po \ EXTRA_DIST = bg.po ca.po cs.po de.po es.po et.po fi.po fr.po fy.po hr.po hu.po \
it.po ja.po ko.po nl.po pt.po ru.po sk.po tr.po uk.po zh_CN.po zh_TW.po it.po ja.po ko.po nl.po pt.po ru.po sk.po sr.po tr.po uk.po zh_CN.po \
zh_TW.po
POTFILES = \ POTFILES = \
$(top_srcdir)/WPrefs.app/Appearance.c \ $(top_srcdir)/WPrefs.app/Appearance.c \
@@ -14,6 +15,7 @@ POTFILES = \
$(top_srcdir)/WPrefs.app/Expert.c \ $(top_srcdir)/WPrefs.app/Expert.c \
$(top_srcdir)/WPrefs.app/Focus.c \ $(top_srcdir)/WPrefs.app/Focus.c \
$(top_srcdir)/WPrefs.app/FontSimple.c \ $(top_srcdir)/WPrefs.app/FontSimple.c \
$(top_srcdir)/WPrefs.app/HotCornerShortcuts.c \
$(top_srcdir)/WPrefs.app/Icons.c \ $(top_srcdir)/WPrefs.app/Icons.c \
$(top_srcdir)/WPrefs.app/KeyboardShortcuts.c \ $(top_srcdir)/WPrefs.app/KeyboardShortcuts.c \
$(top_srcdir)/WPrefs.app/Menu.c \ $(top_srcdir)/WPrefs.app/Menu.c \
+1
View File
@@ -26,3 +26,4 @@ et.po Estonian Ivar Smolin <okul@linux.ee>
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net> ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
nl.po Dutch Alwin <translations@ziggo.nl> nl.po Dutch Alwin <translations@ziggo.nl>
fy.po Frisian Alwin <translations@ziggo.nl> fy.po Frisian Alwin <translations@ziggo.nl>
sr.po Serbian Strahinya Radich <sr@strahinja.org>
+1
View File
@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 2001-04-18 23:22+03:00\n" "PO-Revision-Date: 2001-04-18 23:22+03:00\n"
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n" "Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n" "Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"Language: bg\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2003-09-16 23:15+0200\n" "PO-Revision-Date: 2003-09-16 23:15+0200\n"
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n" "Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
"Language-Team: Catalan <ca@dodds.net>\n" "Language-Team: Catalan <ca@dodds.net>\n"
"Language: ca\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2001-10-14 21:07+0000\n" "PO-Revision-Date: 2001-10-14 21:07+0000\n"
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n" "Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
"Language-Team: czech <cs@li.org>\n" "Language-Team: czech <cs@li.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n" "Content-Transfer-Encoding: unknown\n"
+1
View File
@@ -18,6 +18,7 @@ msgstr ""
"PO-Revision-Date: 2010-02-02 10:49+0100\n" "PO-Revision-Date: 2010-02-02 10:49+0100\n"
"Last-Translator: Carlos R. Mafra <crmafra@gmail.com>\n" "Last-Translator: Carlos R. Mafra <crmafra@gmail.com>\n"
"Language-Team: German <>\n" "Language-Team: German <>\n"
"Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 2003-09-19 03:05-0400\n" "PO-Revision-Date: 2003-09-19 03:05-0400\n"
"Last-Translator: Alberto Giménez <algibe@teleline.es>\n" "Last-Translator: Alberto Giménez <algibe@teleline.es>\n"
"Language-Team: Spanish \n" "Language-Team: Spanish \n"
"Language: es\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n" "Content-Transfer-Encoding: unknown\n"
+3 -2
View File
@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 2001-09-05 09:40+0200\n" "PO-Revision-Date: 2001-09-05 09:40+0200\n"
"Last-Translator: Ivar Smolin <okul@linux.ee>\n" "Last-Translator: Ivar Smolin <okul@linux.ee>\n"
"Language-Team: Estonian <linux-ee@eenet.ee>\n" "Language-Team: Estonian <linux-ee@eenet.ee>\n"
"Language: et\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@@ -475,7 +476,7 @@ msgstr "Window Maker vőttis vastu signaali %i."
#: ../src/dialog.c:1707 #: ../src/dialog.c:1707
msgid "" msgid ""
" This fatal error occured probably due to a bug. Please fill the included " " This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to bugs@windowmaker.info." "BUGFORM and report it to bugs@windowmaker.info."
msgstr "" msgstr ""
" See fataalviga on arvatavasti pőhjustatud programmi veast. Palun täitke " " See fataalviga on arvatavasti pőhjustatud programmi veast. Palun täitke "
@@ -1437,7 +1438,7 @@ msgstr "ei őnnestu käivitada alternatiivset aknahaldurit. Annan alla."
#: ../src/startup.c:419 #: ../src/startup.c:419
msgid "" msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included " "a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it." "BUGFORM and report it."
msgstr "" msgstr ""
"aset on leidnud fataalne viga, arvatavasti programmi viga. Palun täida " "aset on leidnud fataalne viga, arvatavasti programmi viga. Palun täida "
+1
View File
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2001-09-03 22:18+03:00\n" "PO-Revision-Date: 2001-09-03 22:18+03:00\n"
"Last-Translator: Tomi Kajala <tomi@iki.fi>\n" "Last-Translator: Tomi Kajala <tomi@iki.fi>\n"
"Language-Team: Finnish <fi@li.org>\n" "Language-Team: Finnish <fi@li.org>\n"
"Language: fi\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n" "Content-Transfer-Encoding: 8-bit\n"
+1
View File
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 1999-07-28 16:31-0100\n" "PO-Revision-Date: 1999-07-28 16:31-0100\n"
"Last-Translator: Antoine Hulin <antoine.hulin@origan.fdn.org>\n" "Last-Translator: Antoine Hulin <antoine.hulin@origan.fdn.org>\n"
"Language-Team: French <fr@li.org>\n" "Language-Team: French <fr@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n" "Content-Transfer-Encoding: 8-bit\n"
+1
View File
@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 1998-08-24 14:36:41-0300\n" "PO-Revision-Date: 1998-08-24 14:36:41-0300\n"
"Last-Translator: Toni Bilić tbilic@oliver.efos.hr \n" "Last-Translator: Toni Bilić tbilic@oliver.efos.hr \n"
"Language-Team: Croatian \n" "Language-Team: Croatian \n"
"Language: hr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1 -1
View File
@@ -11,7 +11,7 @@ msgstr ""
"PO-Revision-Date: 2014-02-18 00:33+0100\n" "PO-Revision-Date: 2014-02-18 00:33+0100\n"
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n" "Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
"Language-Team: Hungarian\n" "Language-Team: Hungarian\n"
"Language: \n" "Language: hu\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2001-05-21\n" "PO-Revision-Date: 2001-05-21\n"
"Last-Translator: Michele Campeotto <micampe@f2s.com\n" "Last-Translator: Michele Campeotto <micampe@f2s.com\n"
"Language-Team: Italian\n" "Language-Team: Italian\n"
"Language: it\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n" "Content-Transfer-Encoding: unknown\n"
+1
View File
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2013-08-13 19:26+0900\n" "PO-Revision-Date: 2013-08-13 19:26+0900\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Korean\n" "Language-Team: Korean\n"
"Language: ko\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2000-01-04 18:25-0300\n" "PO-Revision-Date: 2000-01-04 18:25-0300\n"
"Last-Translator: Eliphas Levy Theodoro <eliphas@conectiva.com.br>\n" "Last-Translator: Eliphas Levy Theodoro <eliphas@conectiva.com.br>\n"
"Language-Team: Portuguese \n" "Language-Team: Portuguese \n"
"Language: pt\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n" "Content-Transfer-Encoding: 8-bit\n"
+1
View File
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2002-09-12 17:45+0300\n" "PO-Revision-Date: 2002-09-12 17:45+0300\n"
"Last-Translator: awn@bcs.zp.ua\n" "Last-Translator: awn@bcs.zp.ua\n"
"Language-Team: Russian\n" "Language-Team: Russian\n"
"Language: ru\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -18,6 +18,7 @@ msgstr ""
"PO-Revision-Date: 2001-10-15 20:40+0100\n" "PO-Revision-Date: 2001-10-15 20:40+0100\n"
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n" "Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
"Language-Team: Slovak <sk@li.org>\n" "Language-Team: Slovak <sk@li.org>\n"
"Language: sk\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+2654
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -5,6 +5,7 @@ msgstr ""
"PO-Revision-Date: 2004-09-06 21:42+4000\n" "PO-Revision-Date: 2004-09-06 21:42+4000\n"
"Last-Translator: Victor Forsyuk <victor@ksi-linux.com>\n" "Last-Translator: Victor Forsyuk <victor@ksi-linux.com>\n"
"Language-Team: KSI Linux Ukrainian <uk@ksi-linux.com>\n" "Language-Team: KSI Linux Ukrainian <uk@ksi-linux.com>\n"
"Language: uk\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
+1
View File
@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 1999-07-05 23:20+0800\n" "PO-Revision-Date: 1999-07-05 23:20+0800\n"
"Last-Translator: Wang Jian <larkw@263.net>\n" "Last-Translator: Wang Jian <larkw@263.net>\n"
"Language-Team: chinese <zh@li.org>\n" "Language-Team: chinese <zh@li.org>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n" "Content-Transfer-Encoding: 8-bit\n"
+1
View File
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2005-01-11 17:46+0800\n" "PO-Revision-Date: 2005-01-11 17:46+0800\n"
"Last-Translator: Li Wei Jih <lwj83@cs.ccu.edu.tw>\n" "Last-Translator: Li Wei Jih <lwj83@cs.ccu.edu.tw>\n"
"Language-Team: chinese <zh@li.org>\n" "Language-Team: chinese <zh@li.org>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n" "Content-Transfer-Encoding: 8-bit\n"
+1
View File
@@ -15,6 +15,7 @@ dist_tiffdata_DATA = \
ergonomic.tiff \ ergonomic.tiff \
expert.tiff \ expert.tiff \
fonts.tiff \ fonts.tiff \
hotcorners.tiff \
iconprefs.tiff \ iconprefs.tiff \
keyboard.tiff \ keyboard.tiff \
keyboardprefs.tiff \ keyboardprefs.tiff \
Binary file not shown.
+1 -4
View File
@@ -171,10 +171,7 @@ static void x_reset_modifier_mapping(Display * display)
KeySym sym; KeySym sym;
if (code) { if (code) {
if (xext_xkb_supported) sym = W_KeycodeToKeysym(display, code, column);
sym = XkbKeycodeToKeysym(display, code, 0, column);
else
sym = XKeycodeToKeysym(display, code, column);
} else { } else {
sym = NoSymbol; sym = NoSymbol;
} }
+1
View File
@@ -15,6 +15,7 @@ dist_xpmdata_DATA = \
ergonomic.xpm \ ergonomic.xpm \
expert.xpm \ expert.xpm \
fonts.xpm \ fonts.xpm \
hotcorners.xpm \
iconprefs.xpm \ iconprefs.xpm \
keyboard.xpm \ keyboard.xpm \
keyboardprefs.xpm \ keyboardprefs.xpm \
+137
View File
@@ -0,0 +1,137 @@
/* XPM */
static char * hotcorners_xpm[] = {
"48 48 86 1",
" c #2C2C2C",
". c #FEFEFE",
"+ c #505075",
"@ c #4E4E74",
"# c #515176",
"$ c #4B4B72",
"% c #494971",
"& c #515175",
"* c #4F4F74",
"= c #4C4C73",
"- c #696984",
"; c #545477",
"> c #5E5E7D",
", c #676783",
"' c #58587A",
") c #5B5B7C",
"! c #B1B1BB",
"~ c #A5A5B1",
"{ c #A1A1AE",
"] c #AEAEB9",
"^ c #79798F",
"/ c #5C5C7C",
"( c #D5D5DA",
"_ c #E6E6E9",
": c #E8E8EB",
"< c #EDEDEF",
"[ c #E7E7EA",
"} c #FDFDFD",
"| c #FFFFFF",
"1 c #EBEBEC",
"2 c #7F7F93",
"3 c #484871",
"4 c #7B7B85",
"5 c #EFEFEF",
"6 c #A6A6A6",
"7 c #292959",
"8 c #464670",
"9 c #8C8C96",
"0 c #F4F4F4",
"a c #F5F5F6",
"b c #F2F2F2",
"c c #9797A6",
"d c #474770",
"e c #4D4D73",
"f c #9393A3",
"g c #F4F4F5",
"h c #F3F3F3",
"i c #EBEBEE",
"j c #6D6D87",
"k c #9D9DAB",
"l c #F9F9F9",
"m c #F1F1F1",
"n c #A5A5A5",
"o c #EAEAEA",
"p c #6A6A86",
"q c #D3D3D6",
"r c #717171",
"s c #848484",
"t c #9F9FA3",
"u c #47476F",
"v c #323256",
"w c #9B9B9A",
"x c #888889",
"y c #000012",
"z c #6B6B6D",
"A c #757587",
"B c #46466D",
"C c #3B3B47",
"D c #2E2E50",
"E c #242447",
"F c #838383",
"G c #919191",
"H c #202041",
"I c #4F4F73",
"J c #4E4E72",
"K c #232343",
"L c #4F4F4F",
"M c #252548",
"N c #505074",
"O c #3A3A57",
"P c #404060",
"Q c #505076",
"R c #49496B",
"S c #31314E",
"T c #2F2F49",
"U c #434362",
" .",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++@#$%&*=+++++++++++++++++++++++++++%-;>,')@++.",
" ++)!~{]]^@++++++++++++++++++++++++++/(_:<[!#++.",
" ++'[.}|12*++++++++++++++++++++++++++345||.~$++.",
" ++,<||}67+++++++++++++++++++++++++++890||}{%++a",
" ++>:|||bcd+++++++++++++++++++++++++efg||}|]&++.",
" ++;_5h||ij+++++++++++++++++++++++++@kl|mno]*++.",
" ++pqrshltu++++++++++++++++++++++++++vwoxyzAe++.",
" ++BCDEFGHI++++++++++++++++++++++++++JKLMNOP+++.",
" ++QR+*STJ++++++++++++++++++++++++++++JU*++++++.",
" +++++++*++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++QR+*STJ++++++++++++++++++++++++++++JTS*+RQ++.",
" ++BCDEFGHI++++++++++++++++++++++++++IHGFEDCB++.",
" ++pqrshltu++++++++++++++++++++++++++utlhsrqp++.",
" ++;_5h||ij++++++++++++++++++++++++++ji||h5_;++.",
" ++>:|||bcd++++++++++++++++++++++++++dcb|||:>++.",
" ++,<||}67++++++++++++++++++++++++++++76}||<,++.",
" ++'[.}|12*++++++++++++++++++++++++++*21|}.['++.",
" ++)!~{]]^@++++++++++++++++++++++++++@^]]{~!)++.",
" ++@#$%&*=++++++++++++++++++++++++++++=*&%$#@++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
" ++++++++++++++++++++++++++++++++++++++++++++++.",
"................................................"};
+16 -16
View File
@@ -2,9 +2,9 @@
static char *magick[] = { static char *magick[] = {
/* columns rows colors chars-per-pixel */ /* columns rows colors chars-per-pixel */
"50 40 95 2", "50 40 95 2",
" c Gray0", " c #000000",
". c #010101", ". c #010101",
"X c Gray2", "X c #050505",
"o c #040406", "o c #040406",
"O c #070707", "O c #070707",
"+ c #0a0a0d", "+ c #0a0a0d",
@@ -20,14 +20,14 @@ static char *magick[] = {
": c #4e4e4e", ": c #4e4e4e",
"> c #505055", "> c #505055",
", c #585858", ", c #585858",
"< c Gray37", "< c #5e5e5e",
"1 c #494d62", "1 c #494d62",
"2 c #545066", "2 c #545066",
"3 c #57556f", "3 c #57556f",
"4 c #5d627c", "4 c #5d627c",
"5 c #604e42", "5 c #604e42",
"6 c Gray39", "6 c #636363",
"7 c Gray41", "7 c #696969",
"8 c #646475", "8 c #646475",
"9 c #7e6a63", "9 c #7e6a63",
"0 c #75746d", "0 c #75746d",
@@ -67,36 +67,36 @@ static char *magick[] = {
"D c #989799", "D c #989799",
"F c #9b9b9b", "F c #9b9b9b",
"G c #999e98", "G c #999e98",
"H c Gray62", "H c #9e9e9e",
"J c #9e9f9f", "J c #9e9f9f",
"K c #8d8cba", "K c #8d8cba",
"L c #9995a0", "L c #9995a0",
"P c #a2a2a3", "P c #a2a2a3",
"I c #a7a7a8", "I c #a7a7a8",
"U c Gray66", "U c #a8a8a8",
"Y c #acacac", "Y c #acacac",
"T c Gray68", "T c #adadad",
"R c Gray69", "R c #b0b0b0",
"E c #b2b2b2", "E c #b2b2b2",
"W c #b4b4b4", "W c #b4b4b4",
"Q c Gray71", "Q c #b5b5b5",
"! c #b9b9b9", "! c #b9b9b9",
"~ c Gray73", "~ c #bababa",
"^ c #bbbbbb", "^ c #bbbbbb",
"/ c #a7a7c5", "/ c #a7a7c5",
"( c #acadcf", "( c #acadcf",
") c #c0c0c0", ") c #c0c0c0",
"_ c #c3c3c3", "_ c #c3c3c3",
"` c #c8c8c8", "` c #c8c8c8",
"' c Gray79", "' c #c9c9c9",
"] c Gray80", "] c #cccccc",
"[ c #dfdfdf", "[ c #dfdfdf",
"{ c #e2e2e2", "{ c #e2e2e2",
"} c Gray91", "} c #e8e8e8",
"| c #e9e9e9", "| c #e9e9e9",
" . c Gray95", " . c #f2f2f2",
".. c #fbfbfb", ".. c #fbfbfb",
"X. c Gray100", "X. c #ffffff",
/* pixels */ /* pixels */
"$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ } ", "$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ } ",
"$ 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 } } } } } } } } ", "$ 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 } } } } } } } } ",
+10 -4
View File
@@ -171,10 +171,10 @@
RHMaximizeKey = None; RHMaximizeKey = None;
THMaximizeKey = None; THMaximizeKey = None;
BHMaximizeKey = None; BHMaximizeKey = None;
LTCMaximizeKey = None; TLCMaximizeKey = None;
RTCMaximizeKey = None; TRCMaximizeKey = None;
LBCMaximizeKey = None; BLCMaximizeKey = None;
RBCMaximizeKey = None; BRCMaximizeKey = None;
MaximusKey = None; MaximusKey = None;
KeepOnTopKey = None; KeepOnTopKey = None;
KeepAtBottomKey = None; KeepAtBottomKey = None;
@@ -232,6 +232,10 @@
WindowRelaunchKey = None; WindowRelaunchKey = None;
ScreenSwitchKey = None; ScreenSwitchKey = None;
RunKey = None; RunKey = None;
ExitKey = None;
ScreenCaptureKey = None;
WindowCaptureKey = None;
PartialCaptureKey = None;
NormalCursor = (builtin, left_ptr); NormalCursor = (builtin, left_ptr);
ArrowCursor = (builtin, top_left_arrow); ArrowCursor = (builtin, top_left_arrow);
MoveCursor = (builtin, fleur); MoveCursor = (builtin, fleur);
@@ -248,5 +252,7 @@
SelectCursor = (builtin, cross); SelectCursor = (builtin, cross);
DialogHistoryLines = 500; DialogHistoryLines = 500;
CycleActiveHeadOnly = NO; CycleActiveHeadOnly = NO;
CycleAllWorkspaces = NO;
CycleIgnoreMinimized = NO; CycleIgnoreMinimized = NO;
WindowListAppIcons = NO;
} }
+4
View File
@@ -9,6 +9,7 @@ GENERATED_MENUS =\
appearance.menu\ appearance.menu\
appearance.menu.fy\ appearance.menu.fy\
appearance.menu.nl\ appearance.menu.nl\
appearance.menu.sr\
menu\ menu\
menu.bg\ menu.bg\
menu.fi\ menu.fi\
@@ -18,6 +19,7 @@ GENERATED_MENUS =\
menu.nl\ menu.nl\
menu.ro\ menu.ro\
menu.sk\ menu.sk\
menu.sr\
menu.zh_TW\ menu.zh_TW\
plmenu\ plmenu\
plmenu.bg\ plmenu.bg\
@@ -30,6 +32,7 @@ GENERATED_MENUS =\
plmenu.pl\ plmenu.pl\
plmenu.ro\ plmenu.ro\
plmenu.sk\ plmenu.sk\
plmenu.sr\
plmenu.zh_CN\ plmenu.zh_CN\
plmenu.zh_TW\ plmenu.zh_TW\
wmmacros wmmacros
@@ -67,6 +70,7 @@ dist_prefsdata_DATA =\
background.menu\ background.menu\
background.menu.fy\ background.menu.fy\
background.menu.nl\ background.menu.nl\
background.menu.sr\
exitscript.sh\ exitscript.sh\
README\ README\
README.themes\ README.themes\
+3 -3
View File
@@ -6,9 +6,9 @@ static char *magick[] = {
". c #ededee", ". c #ededee",
"X c #e7e7e7", "X c #e7e7e7",
"o c #e2e2e2", "o c #e2e2e2",
"O c gray87", "O c #dedede",
"+ c gray85", "+ c #d9d9d9",
"@ c gray76", "@ c #c2c2c2",
"# c #010101", "# c #010101",
"$ c #4d505a", "$ c #4d505a",
"% c #e0e0e6", "% c #e0e0e6",
+2
View File
@@ -64,6 +64,7 @@ menu.bg Bulgarian Slavei Karadjov <slaff@exco.net>
menu.sk Slovak judas@hell <tomka@oalevice.sk> menu.sk Slovak judas@hell <tomka@oalevice.sk>
menu.nl Dutch Alwin <translations@ziggo.nl> menu.nl Dutch Alwin <translations@ziggo.nl>
menu.fy Frisian Alwin <translations@ziggo.nl> menu.fy Frisian Alwin <translations@ziggo.nl>
menu.sr Serbian Strahinya Radich <sr@strahinja.org>
@@ -80,4 +81,5 @@ plmenu.sk Slovak judas@hell <tomka@oalevice.sk>
plmenu.ja Japanese Seiichi SATO <sato@cvs-net.co.jp> plmenu.ja Japanese Seiichi SATO <sato@cvs-net.co.jp>
plmenu.nl Dutch Alwin <translations@ziggo.nl> plmenu.nl Dutch Alwin <translations@ziggo.nl>
plmenu.fy Frisian Alwin <translations@ziggo.nl> plmenu.fy Frisian Alwin <translations@ziggo.nl>
plmenu.sr Serbian Strahinya Radich <sr@strahinja.org>
+12
View File
@@ -0,0 +1,12 @@
#include "wmmacros"
"Изглед" MENU
"Позадина" OPEN_MENU background.menu
"Стилови" OPEN_MENU -noext STYLES_DIR USER_STYLES_DIR WITH setstyle
"Теме" OPEN_MENU -noext THEMES_DIR USER_THEMES_DIR WITH setstyle
"Сетови икона" OPEN_MENU -noext ICON_SETS_DIR USER_ICON_SETS_DIR WITH seticons
"Сачувај сет икона" EXEC geticonset USER_ICON_SETS_DIR/"%a(Назив сета икона)"
"Сачувај тему" EXEC getstyle -p "%a(Назив теме)"
"Алат за подешавања" EXEC #wprefs#
"Изглед" END
+32
View File
@@ -0,0 +1,32 @@
#include "wmmacros"
"Позадина" MENU
"Једнобојна" MENU
"Црна" WS_BACK '(solid, black)'
"Плава" WS_BACK '(solid, "#505075")'
"Индиго" WS_BACK '(solid, "#243e6c")'
"Маринско плава" WS_BACK '(solid, "#224477")'
"Тамно плава" WS_BACK '(solid, "#180090")'
"Љубичаста" WS_BACK '(solid, "#554466")'
"Боја жита" WS_BACK '(solid, "wheat4")'
"Тамно сива" WS_BACK '(solid, "#333340")'
"Боја вина" WS_BACK '(solid, "#400020")'
"Једнобојна" END
"Претапање" MENU
"Залазак сунца" WS_BACK '(mvgradient, deepskyblue4, black, deepskyblue4, tomato4)'
"Небо" WS_BACK '(vgradient, blue4, white)'
"Нијансе плаве" WS_BACK '(vgradient, "#7080a5", "#101020")'
"Индиго нијансе" WS_BACK '(vgradient, "#746ebc", "#242e4c")'
"Нијансе љубичасте" WS_BACK '(vgradient, "#654c66", "#151426")'
"Нијансе боје жита" WS_BACK '(vgradient, "#a09060", "#302010")'
"Нијансе сиве" WS_BACK '(vgradient, "#636380", "#131318")'
"Нијансе боје вина" WS_BACK '(vgradient, "#600040", "#180010")'
"Претапање" END
"Слике" MENU
"Поплочано" OPEN_MENU BACKGROUNDS_DIR USER_BACKGROUNDS_DIR WITH wmsetbg -u -t
"Развучене" OPEN_MENU BACKGROUNDS_DIR USER_BACKGROUNDS_DIR WITH wmsetbg -u -s
"Центриране" OPEN_MENU BACKGROUNDS_DIR USER_BACKGROUNDS_DIR WITH wmsetbg -u -e
"Максимизоване" OPEN_MENU BACKGROUNDS_DIR USER_BACKGROUNDS_DIR WITH wmsetbg -u -a
"Попуњене" OPEN_MENU BACKGROUNDS_DIR USER_BACKGROUNDS_DIR WITH wmsetbg -u -f
"Слике" END
"Позадина" END
+199
View File
@@ -0,0 +1,199 @@
/*
* Root Menu definition for WindowMaker
*
* Syntax is:
*
* <Title> [SHORTCUT <Shortcut>] <Command> <Parameters>
*
* <Title> is any string to be used as title. Must be enclosed with " if it
* has spaces
*
* SHORTCUT specifies a shortcut for that item. <Shortcut> has the
* same syntax of the shortcuts key options in the
* $HOME/GNUstep/Defaults/WindowMaker file, such as RootMenuKey or MiniaturizeKey.
*
* You can't specify a shortcut for a MENU or OPEN_MENU entry.
*
* <Command> one of the valid commands:
* MENU - starts (sub)menu definition
* END - end (sub)menu definition
* OPEN_MENU - opens a menu from a file, pipe or directory(ies) contents
* and eventually precede each with a command.
* WORKSPACE_MENU - adds a submenu for workspace operations. Only one
* workspace_menu is allowed.
* EXEC <program> - executes an external program
* SHEXEC <command> - executes a shell command (like gimp > /dev/null)
* EXIT - exits the window manager
* RESTART [<window manager>] - restarts WindowMaker or start another
* window manager
* REFRESH - refreshes the desktop
* ARRANGE_ICONS - rearranges the icons on the workspace
* SHUTDOWN - kills all clients (and close the X window session)
* SHOW_ALL - unhides all windows on workspace
* HIDE_OTHERS - hides all windows on the workspace, except the
* focused one (or the last one that received focus)
* SAVE_SESSION - saves the current state of the desktop, which include
* all running applications, all their hints (geometry,
* position on screen, workspace they live on, the dock
* or clip from where they were launched, and
* if minimized, shaded or hidden. Also saves the current
* workspace the user is on. All will be restored on every
* start of windowmaker until another SAVE_SESSION or
* CLEAR_SESSION is used. If SaveSessionOnExit = Yes; in
* WindowMaker domain file, then saving is automatically
* done on every windowmaker exit, overwriting any
* SAVE_SESSION or CLEAR_SESSION (see below).
* CLEAR_SESSION - clears any previous saved session. This will not have
* any effect if SaveSessionOnExit is True.
* INFO - shows the Info Panel
*
* OPEN_MENU syntax:
* 1. File menu handling.
* // opens file.menu which must contain a valid menu file and inserts
* // it in current position
* OPEN_MENU file.menu
* 2. Pipe menu handling.
* // opens command and uses its stdout to construct menu.
* // Command's output must be a valid menu description.
* // The space between '|' and command itself is optional.
* // Use '||' instead of '|' if you want the menu to always update
* // when opened. It might be slow.
* OPEN_MENU | command
* OPEN_MENU || command
* 3. Directory handling.
* // Opens one or more directories and constructs a menu with all
* // the subdirectories and executable files in them sorted
* // alphabetically.
* OPEN_MENU /some/dir [/some/other/dir ...]
* 4. Directory handling with command.
* // Opens one or more directories and constructs menu with all
* // subdirectories and readable files in them sorted alphabetically,
* // preceding each of them with command.
* OPEN_MENU [options] /some/dir [/some/other/dir ...] WITH command -options
* Options:
* -noext strip whatever is after the last dot in the
* file name
*
* // Use #usergnusteppath# as a placeholder for the path to the user
* // GNUstep directory. Window Maker will replace this with the value
* // of WMAKER_USER_ROOT, if this environment variable is set, or
* // "~/GNUstep" otherwise
*
* <Parameters> is the program to execute.
*
* ** Options for command line in EXEC:
* %s - substitute with current selection
* %a(title[,prompt]) - opens an input box with the specified title and the
* optional prompt and do substitution with what you typed
* %w - substitute with XID for the current focused window
* %W - substitute with the number of the current workspace
*
* You can override special characters (as % and ") with the \ character:
* ex: xterm -T "\"Hello World\""
*
* You can also use character escapes, like \n
*
* Each MENU statement must have one mathching END statement at the end.
*
* Example:
*
* "Test" MENU
* "XTerm" EXEC xterm
* // creates a submenu with the contents of /usr/openwin/bin
* "XView apps" OPEN_MENU "/usr/openwin/bin"
* // some X11 apps in different directories
* "X11 apps" OPEN_MENU /usr/X11/bin $HOME/bin/X11
* // set some background images
* "Background" OPEN_MENU -noext $HOME/images /usr/share/images WITH wmsetbg -u -t
* // inserts the style.menu in this entry
* "Style" OPEN_MENU style.menu
* "Test" END
*/
#include "wmmacros"
"Апликације" MENU
"Информације" MENU
"Информациони панел" INFO_PANEL
"Права" LEGAL_PANEL
"Системска конзола" EXEC xconsole
"Искоришћеност система" SHEXEC xosview || xload
"Листа процеса" EXEC xterm -e top
"Прегледач упутства" EXEC xman
"Информације" END
"Покрени..." SHEXEC %a(Покрени,Унесите наредбу за покретање:)
"XTerm" EXEC xterm -sb
"Mozilla Firefox" EXEC firefox
"Радне површине" WORKSPACE_MENU
"Апликације" MENU
"Gimp" SHEXEC gimp >/dev/null
"Ghostview" EXEC ghostview %a(GhostView,Enter file to view)
"Xpdf" EXEC xpdf %a(Xpdf,Enter PDF to view)
"Abiword" EXEC abiword
"Dia" EXEC dia
"OpenOffice.org" MENU
"OpenOffice.org" EXEC ooffice
"Писач" EXEC oowriter
"Табела" EXEC oocalc
"Цртање" EXEC oodraw
"Презентације" EXEC ooimpress
"OpenOffice.org" END
"Уређивачи" MENU
"XEmacs" EXEC xemacs
"Emacs" EXEC emacs
"XJed" EXEC xjed
"VI" EXEC xterm -e vi
"GVIM" EXEC gvim
"NEdit" EXEC nedit
"Xedit" EXEC xedit
"Уређивачи" END
"Мултимедија" MENU
"XMMS" MENU
"XMMS" EXEC xmms
"XMMS пусти/паузирај" EXEC xmms -t
"XMMS заустави" EXEC xmms -s
"XMMS" END
"Видео плејер Xine" EXEC xine
"MPlayer" EXEC mplayer
"Мултимедија" END
"Апликације" END
"Помоћни програми" MENU
"Калкулатор" EXEC xcalc
"Особине прозора" SHEXEC xprop | xmessage -center -title 'xprop' -file -
"Бирач фонта" EXEC xfontsel
"Лупа" EXEC wmagnify
"Мапа боја" EXEC xcmap
"Убиј X апликацију" EXEC xkill
"Помоћни програми" END
"Избор" MENU
"Копирај" SHEXEC echo '%s' | wxcopy
"Пошаљи мејлом на" EXEC xterm -name mail -T "Pine" -e pine %s
"Прегледај веб читачем" EXEC netscape %s
"Тражи у упутству" SHEXEC MANUAL_SEARCH(%s)
"Избор" END
"Наредбе" MENU
"Сакриј остале" HIDE_OTHERS
"Прикажи све" SHOW_ALL
"Поређај иконе" ARRANGE_ICONS
"Освежи" REFRESH
"Закључај" EXEC xlock -allowroot -usefirst
"Наредбе" END
"Изглед" OPEN_MENU "appearance.menu"
"Сесија" MENU
"Сачувај сесију" SAVE_SESSION
"Очисти сесију" CLEAR_SESSION
"Поново покрени Window Maker" RESTART
"Покрени BlackBox" RESTART blackbox
"Покрени IceWM" RESTART icewm
"Изађи" EXIT
"Сесија" END
"Апликације" END
+76
View File
@@ -0,0 +1,76 @@
("Апликације",
("Информације",
("Информациони панел", INFO_PANEL),
("Права", LEGAL_PANEL),
("Системска конзола", EXEC, "xconsole"),
("Искоришћеност система", SHEXEC, "xosview || xload"),
("Листа процеса", EXEC, "xterm -e top"),
("Прегледач упутства", EXEC, "xman")
),
("Покрени...", SHEXEC, "%a(Покрени,Унесите наредбу за покретање:)"),
("XTerm", EXEC, "xterm -sb"),
("Mozilla Firefox", EXEC, "firefox"),
("Радне површине", WORKSPACE_MENU),
("Апликације",
("Gimp", SHEXEC, "gimp >/dev/null"),
("Ghostview", EXEC, "ghostview %a(Enter file to view)"),
("Xpdf", EXEC, "xpdf %a(Enter PDF to view)"),
("Abiword", EXEC, "abiword"),
("Dia", EXEC, "dia"),
("OpenOffice.org",
("OpenOffice.org", EXEC, "ooffice"),
("Писач", EXEC, "oowriter"),
("Табела", EXEC, "oocalc"),
("Цртање", EXEC, "oodraw"),
("Презентације", EXEC, "ooimpress")
),
("Уређивачи",
("XEmacs", EXEC, "xemacs"),
("Emacs", EXEC, "emacs"),
("XJed", EXEC, "xjed"),
("VI", EXEC, "xterm -e vi"),
("GVIM", EXEC, "gvim"),
("NEdit", EXEC, "nedit"),
("Xedit", EXEC, "xedit")
),
("Мултимедија",
("XMMS",
("XMMS", EXEC, "xmms"),
("XMMS пусти/паузирај", EXEC, "xmms -t"),
("XMMS заустави", EXEC, "xmms -s")
),
("Видео плејер Xine", EXEC, "xine"),
("MPlayer", EXEC, "mplayer")
)
),
("Помоћни програми",
("Калкулатор", EXEC, "xcalc"),
("Особине прозора", SHEXEC, "xprop | xmessage -center -title 'xprop' -file -"),
("Бирач фонта", EXEC, "xfontsel"),
("Лупа", EXEC, "wmagnify"),
("Мапа боја", EXEC, "xcmap"),
("Убиј X апликацију", EXEC, "xkill")
),
("Избор",
("Копирај", SHEXEC, "echo '%s' | wxcopy"),
("Пошаљи мејлом на", EXEC, "xterm -name mail -T Pine -e pine %s"),
("Прегледај веб читачем", EXEC, "mozilla %s"),
("Тражи у упутству", EXEC, "MANUAL_SEARCH(%s)")
),
("Наредбе",
("Сакриј остале", HIDE_OTHERS),
("Прикажи све", SHOW_ALL),
("Поређај иконе", ARRANGE_ICONS),
("Освежи", REFRESH),
("Закључај", EXEC, "xlock -allowroot -usefirst")
),
("Изглед", OPEN_MENU, "appearance.menu"),
("Сесија",
("Сачувај сесију", SAVE_SESSION),
("Очисти сесију", CLEAR_SESSION),
("Поново покрени Window Maker", RESTART),
("Покрени BlackBox", RESTART, blackbox),
("Покрени IceWM", RESTART, icewm),
("Изађи", EXIT)
)
)
-1
View File
@@ -4,4 +4,3 @@ Comment=This session logs you into Window Maker
Exec=wmaker Exec=wmaker
TryExec=wmaker TryExec=wmaker
DesktopNames=WindowMaker DesktopNames=WindowMaker
X-GDM-SessionRegisters=true
+9 -19
View File
@@ -1,26 +1,16 @@
#!/bin/sh #!/bin/sh
srcdir=$(dirname $0)
test -z "$srcdir" && srcdir=.
# Generate the documentation about compiling Window Maker # Generate the documentation about compiling Window Maker
./script/generate-txt-from-texi.sh "doc/build/Compilation.texi" -o "INSTALL-WMAKER" $srcdir/script/generate-txt-from-texi.sh "$srcdir/doc/build/Compilation.texi" \
./script/generate-txt-from-texi.sh "doc/build/Translations.texi" -o "README.i18n" -o "$srcdir/INSTALL-WMAKER"
$srcdir/script/generate-txt-from-texi.sh "$srcdir/doc/build/Translations.texi" \
-o "$srcdir/README.i18n"
# Change date of the files to the past so they will be regenerated by 'make' # Change date of the files to the past so they will be regenerated by 'make'
touch -d '2000-01-01' INSTALL-WMAKER README.i18n touch -d '2000-01-01' $srcdir/INSTALL-WMAKER $srcdir/README.i18n
# Generate the configure script from the 'configure.ac' # Generate the configure script from the 'configure.ac'
autoreconf -vfi -I m4 autoreconf -vfi -I m4 $srcdir
exit 0
if [ -x config.status -a -z "$*" ]; then
./config.status --recheck
else
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
echo "If you do not wish to run ./configure, press Ctrl-C now."
trap 'echo "configure aborted" ; exit 0' 1 2 15
sleep 1
fi
./configure "$@"
fi
+72 -14
View File
@@ -2,7 +2,7 @@ dnl ============================================================================
dnl dnl
dnl Window Maker autoconf input dnl Window Maker autoconf input
dnl dnl
AC_COPYRIGHT([Copyright (c) 2001-2015 The Window Maker Team]) AC_COPYRIGHT([Copyright (c) 2001-2023 The Window Maker Team])
dnl dnl
dnl ============================================================================ dnl ============================================================================
dnl dnl
@@ -34,7 +34,7 @@ AC_PREREQ([2.69])
dnl Configuration for Autoconf and Automake dnl Configuration for Autoconf and Automake
dnl ======================================= dnl =======================================
AC_INIT([WindowMaker],[0.95.9],[wmaker-dev@googlegroups.com],[WindowMaker],[http://www.windowmaker.org/]) AC_INIT([WindowMaker],[0.96.0],[wmaker-dev@googlegroups.com],[WindowMaker],[http://www.windowmaker.org/])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
@@ -71,16 +71,16 @@ dnl 6. If any interfaces have been removed or changed since the last
dnl public release, then set age to 0. dnl public release, then set age to 0.
dnl dnl
dnl libwraster dnl libwraster
WRASTER_CURRENT=6 WRASTER_CURRENT=8
WRASTER_REVISION=0 WRASTER_REVISION=0
WRASTER_AGE=0 WRASTER_AGE=2
WRASTER_VERSION=$WRASTER_CURRENT:$WRASTER_REVISION:$WRASTER_AGE WRASTER_VERSION=$WRASTER_CURRENT:$WRASTER_REVISION:$WRASTER_AGE
AC_SUBST(WRASTER_VERSION) AC_SUBST(WRASTER_VERSION)
dnl dnl
dnl libWINGs dnl libWINGs
WINGS_CURRENT=4 WINGS_CURRENT=6
WINGS_REVISION=0 WINGS_REVISION=0
WINGS_AGE=1 WINGS_AGE=3
WINGS_VERSION=$WINGS_CURRENT:$WINGS_REVISION:$WINGS_AGE WINGS_VERSION=$WINGS_CURRENT:$WINGS_REVISION:$WINGS_AGE
AC_SUBST(WINGS_VERSION) AC_SUBST(WINGS_VERSION)
dnl dnl
@@ -97,7 +97,6 @@ dnl ===================
AC_PROG_CC AC_PROG_CC
WM_PROG_CC_C11 WM_PROG_CC_C11
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_GCC_TRADITIONAL
LT_INIT LT_INIT
@@ -131,6 +130,20 @@ AS_IF([test "x$debug" = "xyes"],
]) ])
dnl Native CPU Optimizations Option
dnl =================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([native],
[AS_HELP_STRING([--enable-native], [enable native option, @<:@default=no@:>@])],
[AS_CASE(["$enableval"],
[yes], [native=yes],
[no], [native=no],
[AC_MSG_ERROR([bad value $enableval for --enable-native])] )],
[native=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$native" = "xyes"],
[AX_CFLAGS_GCC_OPTION([-march=native])])
AX_CFLAGS_GCC_OPTION([-Wall]) AX_CFLAGS_GCC_OPTION([-Wall])
AX_CFLAGS_GCC_OPTION([-Wextra -Wno-sign-compare]) AX_CFLAGS_GCC_OPTION([-Wextra -Wno-sign-compare])
dnl dnl
@@ -270,8 +283,8 @@ supported_gfx=""
dnl Platform-specific Makefile setup dnl Platform-specific Makefile setup
dnl ================================ dnl ================================
AS_CASE(["$host"], AS_CASE(["$host"],
[*-*-linux*|*-*-cygwin*|*-gnu*], [WM_OSDEP="linux" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"], [*-*-linux*|*-*-cygwin*|*-gnu*], [WM_OSDEP="linux" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=700"],
[*-*-freebsd*|*-k*bsd-gnu*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD"], [*-*-freebsd*|*-k*bsd-gnu*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=700 -DFREEBSD"],
[*-*-netbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DNETBSD"], [*-*-netbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DNETBSD"],
[*-*-openbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DOPENBSD"], [*-*-openbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DOPENBSD"],
[*-*-dragonfly*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DDRAGONFLYBSD"], [*-*-dragonfly*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DDRAGONFLYBSD"],
@@ -387,7 +400,7 @@ AC_FUNC_MEMCMP
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
WM_FUNC_SECURE_GETENV WM_FUNC_SECURE_GETENV
AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \ AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \
setsid mallinfo mkstemp sysconf) setsid mallinfo2 mkstemp sysconf)
AC_SEARCH_LIBS([strerror], [cposix]) AC_SEARCH_LIBS([strerror], [cposix])
dnl nanosleep is generally available in standard libc, although not always the dnl nanosleep is generally available in standard libc, although not always the
@@ -455,7 +468,6 @@ AC_CHECK_HEADERS([syslog.h], [AC_DEFINE([HAVE_SYSLOG], [1], [Check for syslog])]
dnl Checks for header files dnl Checks for header files
dnl ======================= dnl =======================
AC_HEADER_SYS_WAIT AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h libintl.h poll.h malloc.h ctype.h \ AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h libintl.h poll.h malloc.h ctype.h \
string.h strings.h) string.h strings.h)
@@ -543,7 +555,9 @@ AC_ARG_ENABLE([modelock],
m4_divert_pop([INIT_PREPARE])dnl m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_modelock" = "xyes"], AS_IF([test "x$enable_modelock" = "xyes"],
[AC_DEFINE([XKB_MODELOCK], [1], [whether XKB language MODELOCK should be enabled]) ]) [WM_XEXT_CHECK_XKBFILE
AS_IF([test "x$enable_modelock" = "xyes"],
[AC_DEFINE([XKB_MODELOCK], [1], [whether XKB language MODELOCK should be enabled])])])
dnl XDND Drag-nd-Drop support dnl XDND Drag-nd-Drop support
@@ -580,6 +594,18 @@ AS_IF([test "x$enable_wmreplace" = "xyes"],
[define to support ICCCM protocol for window manager replacement]) [define to support ICCCM protocol for window manager replacement])
supported_xext="$supported_xext WMReplace"]) supported_xext="$supported_xext WMReplace"])
dnl XRes support
dnl ==============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([res],
[AS_HELP_STRING([--disable-res], [disable resource window extension support])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-res]) ]) ],
[enable_res=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_XEXT_CHECK_XRES
dnl XShape support dnl XShape support
dnl ============== dnl ==============
@@ -631,11 +657,11 @@ dnl RandR support
dnl ============= dnl =============
m4_divert_push([INIT_PREPARE])dnl m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([randr], AC_ARG_ENABLE([randr],
[AS_HELP_STRING([--enable-randr], [enable RandR extension support (NOT recommended, buggy)])], [AS_HELP_STRING([--enable-randr], [enable RandR extension support for multi-monitor live reconfiguration])],
[AS_CASE(["$enableval"], [AS_CASE(["$enableval"],
[yes|no], [], [yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-randr]) ]) ], [AC_MSG_ERROR([bad value $enableval for --enable-randr]) ]) ],
[enable_randr=no]) [enable_randr=auto])
m4_divert_pop([INIT_PREPARE])dnl m4_divert_pop([INIT_PREPARE])dnl
WM_XEXT_CHECK_XRANDR WM_XEXT_CHECK_XRANDR
@@ -756,6 +782,19 @@ m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_JPEG WM_IMGFMT_CHECK_JPEG
dnl JXL Support
dnl ============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([jxl],
[AS_HELP_STRING([--disable-jxl], [disable JXL support through libjxl])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-jxl])] )],
[enable_jxl=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_JXL
dnl GIF Support dnl GIF Support
dnl ============ dnl ============
m4_divert_push([INIT_PREPARE])dnl m4_divert_push([INIT_PREPARE])dnl
@@ -834,6 +873,22 @@ AM_CONDITIONAL([ICON_EXT_XPM], [test "x$ICONEXT" = "xxpm"])
AM_CONDITIONAL([ICON_EXT_TIFF], [test "x$ICONEXT" = "xtiff"]) AM_CONDITIONAL([ICON_EXT_TIFF], [test "x$ICONEXT" = "xtiff"])
dnl Archive Support for wmiv
dnl =================================
dnl Check for libarchive (comprehensive archive support)
AC_CHECK_LIB([archive], [archive_read_new], [
AC_CHECK_HEADER([archive.h], [
AC_DEFINE([HAVE_LIBARCHIVE], [1], [Define if libarchive is available])
LIBARCHIVE_LIBS="-larchive"
], [
AC_MSG_WARN([libarchive header not found, archive support disabled])
])
], [
AC_MSG_WARN([libarchive not found, archive support disabled])
])
AC_SUBST([LIBARCHIVE_LIBS])
dnl ============================================== dnl ==============================================
dnl End of Graphic Format Libraries dnl End of Graphic Format Libraries
dnl ============================================== dnl ==============================================
@@ -998,6 +1053,9 @@ echo "Supported graphic format libraries :$supported_gfx"
echo "Unsupported features :$unsupported" echo "Unsupported features :$unsupported"
echo "Pango text layout support in WINGs : $pango" echo "Pango text layout support in WINGs : $pango"
echo "Translated languages to support :$supported_locales" echo "Translated languages to support :$supported_locales"
AS_IF([test "x$native" = "xyes"],
[AS_ECHO(["Target architecture : native"]) ],
[AS_ECHO(["Target architecture : generic"]) ])
AS_IF([test "x$WEB_REPO_ROOT" != "x"], AS_IF([test "x$WEB_REPO_ROOT" != "x"],
[AS_ECHO(["Git repository for WMaker's Website : $WEB_REPO_ROOT"]) ]) [AS_ECHO(["Git repository for WMaker's Website : $WEB_REPO_ROOT"]) ])
AS_IF([test "x$debug" = "xyes"], AS_IF([test "x$debug" = "xyes"],
+16
View File
@@ -204,6 +204,11 @@ Note that if you don't have it, @command{configure} will issue a big warning in
this is because JPEG images are often used in themes and for background images this is because JPEG images are often used in themes and for background images
so you probably want this format supported. so you probably want this format supported.
@item @emph{libjxl} 0.7.0 or newer
For @emph{JXL} image support,
@uref{https://github.com/libjxl/libjxl}
@item @emph{libgif} 2.2 or @emph{libungif} @item @emph{libgif} 2.2 or @emph{libungif}
For @emph{GIF} image support, For @emph{GIF} image support,
@@ -477,6 +482,9 @@ Disable GIF support in @emph{WRaster} library; when enabled use @file{libgif} or
@item --disable-jpeg @item --disable-jpeg
Disable JPEG support in @emph{WRaster} library; when enabled use @file{libjpeg}. Disable JPEG support in @emph{WRaster} library; when enabled use @file{libjpeg}.
@item --disable-jxl
Disable JPEG-XL support in @emph{WRaster} library; when enabled use @file{libjxl}.
@item --without-libbsd @item --without-libbsd
Refuse use of the @file{libbsd} compatibility library in @emph{WINGs} utility library, Refuse use of the @file{libbsd} compatibility library in @emph{WINGs} utility library,
even if your system provides it. even if your system provides it.
@@ -551,6 +559,10 @@ Disable use of the @emph{MIT shared memory} extension.
This will slow down texture generation a little bit, but in some cases it seems to be necessary due This will slow down texture generation a little bit, but in some cases it seems to be necessary due
to a bug that manifests as messed icons and textures. to a bug that manifests as messed icons and textures.
@item --disable-res
Disables support for @emph{XRes} resource window extension support.
Which is used to find the underlying processes (and PIDs) displaying the windows.
@item --disable-shape @item --disable-shape
Disables support for @emph{shaped} windows (for @command{oclock}, @command{xeyes}, etc.). Disables support for @emph{shaped} windows (for @command{oclock}, @command{xeyes}, etc.).
@@ -639,6 +651,10 @@ appropriate requirements and works with this.
Despite all this, if you think there's a use for it and feel in the mood to help, do not hesitate to Despite all this, if you think there's a use for it and feel in the mood to help, do not hesitate to
discuss on the mailing list @value{emailsupport} to get it working. discuss on the mailing list @value{emailsupport} to get it working.
@item --enable-native
Enable native CPU optimizations by adding @option{-march=native} to the compiler flags, tuning the
generated code for the build machine at the expense of portability.
@item --with-web-repo=@i{PATH} @item --with-web-repo=@i{PATH}
Enable generation of HTML documentation to be uploaded to @sc{Window Maker}'s website. Enable generation of HTML documentation to be uploaded to @sc{Window Maker}'s website.
The @file{@i{PATH}} is the directory where you have cloned the homepage's repository. The @file{@i{PATH}} is the directory where you have cloned the homepage's repository.
+8 -8
View File
@@ -12,7 +12,7 @@ necessary.
.SH "OPTIONS" .SH "OPTIONS"
.TP .TP
.BI \-display " host:display.screen" .BI \-display " host:display.screen"
specify display to use. specify the display to use.
On multiheaded machines, Window Maker will automatically manage all screens. On multiheaded machines, Window Maker will automatically manage all screens.
If you want Window Maker to manage only a specific screen, you must supply If you want Window Maker to manage only a specific screen, you must supply
the screen number you want to have managed with the the screen number you want to have managed with the
@@ -24,13 +24,13 @@ wmaker -display :0.1
.EE .EE
.TP .TP
.B \-\-dont\-restore .B \-\-dont\-restore
do not restore saved session do not restore the saved session
.TP .TP
.B \-\-global_defaults_path .B \-\-global_defaults_path
print the path where the files for the default configuration are installed and exit print the path where the files for the default configuration are installed and exit
.TP .TP
.B \-\-help .B \-\-help
print the list of command line options supported, one per line, and exit print the list of supported command line options, one per line, and exit
.TP .TP
.BI \-\-locale " locale" .BI \-\-locale " locale"
specify the locale (i18n language) to use; Window Maker will also set the variable specify the locale (i18n language) to use; Window Maker will also set the variable
@@ -38,7 +38,7 @@ specify the locale (i18n language) to use; Window Maker will also set the variab
which will be inherited by all applications started from Window Maker which will be inherited by all applications started from Window Maker
.TP .TP
.B \-\-no\-autolaunch .B \-\-no\-autolaunch
do not launch at start-up the applications that were marked in the configuration as autolanched do not launch at start-up the applications that were marked in the configuration as autolaunched
.TP .TP
.B \-\-no\-clip .B \-\-no\-clip
do not show the workspace Clip do not show the workspace Clip
@@ -53,7 +53,7 @@ disable the Drawers in the Dock
@!HAVE_INOTIFY@disable the periodic check on the configuration file to reload it automatically @!HAVE_INOTIFY@disable the periodic check on the configuration file to reload it automatically
@USE_ICCCM_WMREPLACE@.TP @USE_ICCCM_WMREPLACE@.TP
@USE_ICCCM_WMREPLACE@.B \-\-replace @USE_ICCCM_WMREPLACE@.B \-\-replace
@USE_ICCCM_WMREPLACE@ask the currently running window manager to let Window Maker take his place @USE_ICCCM_WMREPLACE@ask the currently running window manager to let Window Maker take its place
.TP .TP
.B \-\-static .B \-\-static
do not update or save automatically the configuration do not update or save automatically the configuration
@@ -88,7 +88,7 @@ few options not available using the Attributes Editor.
.B @pkgconfdir@/ .B @pkgconfdir@/
All the above-mentioned files are READ from here if not found except All the above-mentioned files are READ from here if not found except
for WMState, which is COPIED from here. No matter where they are read for WMState, which is COPIED from here. No matter where they are read
from, if it's necessary to write configuration changes back into this from, if it's necessary to write configuration changes back into these
files, user's files will be written to. files, user's files will be written to.
.TP .TP
.B ~/GNUstep/Library/WindowMaker/autostart .B ~/GNUstep/Library/WindowMaker/autostart
@@ -108,7 +108,7 @@ might be shut down before the script is executed.
The menu file indicated in WMRootMenu is looked for here... The menu file indicated in WMRootMenu is looked for here...
.TP .TP
.B @pkgdatadir@/ .B @pkgdatadir@/
and here, in that order. Unless, the indicated path is an absolute path. and here, in that order. Unless the indicated path is an absolute path.
.TP .TP
.B ~/GNUstep/Library/WindowMaker/Pixmaps/ .B ~/GNUstep/Library/WindowMaker/Pixmaps/
Window Maker looks for \fBpixmaps\fP here Window Maker looks for \fBpixmaps\fP here
@@ -131,7 +131,7 @@ Window Maker looks for theme files here (ibid)
System-wide (Window Maker-specific) pixmaps are located here System-wide (Window Maker-specific) pixmaps are located here
.TP .TP
.B @pkgdatadir@/Styles/ .B @pkgdatadir@/Styles/
System wide styles are here System-wide styles are here
.TP .TP
.B @pkgdatadir@/Themes/ .B @pkgdatadir@/Themes/
Guess... ;-) Guess... ;-)
+26 -17
View File
@@ -3,11 +3,14 @@
wmiv \- quick image viewer using wrlib wmiv \- quick image viewer using wrlib
.SH SYNOPSIS .SH SYNOPSIS
.B wmiv .B wmiv
.RI [ \,image(s)\/ | \,directory\/ ] .RI [ \,image(s)\/ | \,directory\/ | \,archive\/]
.SH OPTIONS .SH OPTIONS
.TP .TP
.B \-\-help .B \-\-help
print help text display this help
.TP
.B \-\-ignore-unknown
ignore unknown image format
.TP .TP
.B \-\-version .B \-\-version
print version print version
@@ -19,21 +22,6 @@ zoom in
[\-] [\-]
zoom out zoom out
.TP .TP
[Esc]
actual size
.TP
[D]
launch diaporama mode
.TP
[L]
rotate image on the left
.TP
[Q]
quit
.TP
[R]
rotate image on the right
.TP
[▸] [▸]
next image next image
.TP .TP
@@ -45,6 +33,27 @@ first image
.TP .TP
[▾] [▾]
last image last image
.TP
[Ctrl+C]
copy image to clipboard
.TP
[D]
start slideshow
.TP
[Esc]
actual size
.TP
[F]
toggle full-screen mode
.TP
[L]
rotate image on the left
.TP
[Q]
quit
.TP
[R]
rotate image on the right
.SH AUTHOR .SH AUTHOR
.B wmiv .B wmiv
is a part of Window Maker. It was written by David Maciejak. is a part of Window Maker. It was written by David Maciejak.
+8 -8
View File
@@ -80,14 +80,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)], AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown" VAR,[VAR="no, unknown"
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_C AC_LANG(C)
ac_save_[]FLAGS="$[]FLAGS" ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl for ac_arg dnl
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
# #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done done
FLAGS="$ac_save_[]FLAGS" FLAGS="$ac_save_[]FLAGS"
@@ -116,14 +116,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)], AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown" VAR,[VAR="no, unknown"
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG(C++)
ac_save_[]FLAGS="$[]FLAGS" ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl for ac_arg dnl
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
# #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done done
FLAGS="$ac_save_[]FLAGS" FLAGS="$ac_save_[]FLAGS"
@@ -151,14 +151,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)], AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown" VAR,[VAR="no, unknown"
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_C AC_LANG(C)
ac_save_[]FLAGS="$[]FLAGS" ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl for ac_arg dnl
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
# #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done done
FLAGS="$ac_save_[]FLAGS" FLAGS="$ac_save_[]FLAGS"
@@ -187,14 +187,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)], AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown" VAR,[VAR="no, unknown"
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG(C++)
ac_save_[]FLAGS="$[]FLAGS" ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl for ac_arg dnl
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
# #
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done done
FLAGS="$ac_save_[]FLAGS" FLAGS="$ac_save_[]FLAGS"

Some files were not shown because too many files have changed in this diff Show More