Commit graph

6111 commits

Author SHA1 Message Date
Thomas Lübking
e8021e3697 handle DISPLAY :x and :x.0 idem
Patch originally provided by Francesco Poli to Debian

BUG: 1052
2016-09-03 20:08:14 +02:00
Thomas Lübking
2cfffee19b handle subdirs and symlinks in $wallpaperdir
Thanks for the base patch, kindly provided by some Anonymous coward
on the bugtracker ;-)

BUG: 1065
2016-09-03 20:08:14 +02:00
GreenLunar
db97f28e25 Update Translation.m 2016-09-03 20:05:50 +02:00
Thomas Lübking
3058861f89 indicate iconified windows in iconbar 2016-09-03 19:29:52 +02:00
Thomas Lübking
e99d940f40 do not confine transients to desktop layer
Originally patch #170 by gregor_b
Desktop stype windows will typically have their config dialogs as
transients. If those are confined to the desktop layer, they're stashed
behind everything else, so we don't force them there.

If the transient already is in the desktop layer otherwise it's a(nother)
desktop, not a dialog, and belongs to that layer, there's no need to
artificially raise it.
It's entirely sufficient to leave these windows untouched.
2016-09-01 22:51:45 +02:00
Thomas Lübking
14e25f4a65 delay mouse driven tab focus by autoraise interval
REQUEST: 190
2016-09-01 22:51:45 +02:00
Thomas Lübking
3254816b6b expose and fix ActivateTabCmd
The function failed if the last event window was actually the tab.
2016-09-01 22:51:45 +02:00
Thomas Lübking
0d1b204121 re-use position sanitization for modal placement 2016-08-31 20:37:37 +02:00
Thomas Lübking
6ca6422344 introduce a 5s timeout for emacs shortcuts
The user needs to enter his chain within 5 seconds
Otherwise the chain is reset.

REQUEST: 291
2016-08-31 20:37:37 +02:00
Thomas Lübking
6c4d1123c0 Relative aligmment when changing window head
So far, altering the head would potentially move the window
out of the workspace area (by moving a far right/bottom window from a
HUUUUUGE to a small screen)

This preserves edge alignments (w/ topleft preference), otherwise
moves the window to it's relative topleft position on the new head
(ie. if it was 10% left and 3% top into the screen, it will still be)
2016-08-30 22:02:59 +02:00
Thomas Lübking
a5b5be5e09 Add "Unclutter" command
Unclutter the desktop by using the MinOverlapPlacement
for all matching windows.

REQUEST: 248
2016-08-30 22:02:59 +02:00
Thomas Lübking
8a6623040e Don't replay presses which are required f/ motions
When trying to doAction(ButtonPress, ...), we check whether the
action would hit for type==MotionNotify.
In this case we do nothing but return "true" to tell the caller that
this event is "for us". Otherwise the event would be replayed to the
client and there'd go out MotionNotify grabs.

tl;du: This fixes MoveX actions.
2016-08-30 22:02:59 +02:00
Mathias Gumz
bb013f5c75 fix compiler warning about std::auto_ptr
fluxbox uses std::unique_ptr<> where it previously used std::auto_ptr<>.

C++0X was approved in 2011. among other things, it deprecates std::auto_ptr.
5 years is long enough for compilers to catch up the standard.
2016-08-28 19:49:30 +02:00
Thomas Lübking
1e235e3f01 Grab keyboard synchronouosly to allow replays
This allows to catch if a grabbed key (combo) is actually w/o effect
(because eg. the OnDesktop condition does not match) and then replay
the event ungrabbed to pass it to the focused client.

Just like mouse grabbing, this BEARS THE POTENTIAL TO LOCK INPUT, thus
needs AS MUCH TESTING AS POSSIBLE

BUG: 1137
2016-08-27 09:36:19 +02:00
Thomas Lübking
2c66471126 Replay toolbar button events
NOTICE!!!! THIS IS HIGHLY EXPERIMENTAL!

The patch alters the button grab mode to GrabSync
in order to ReplayPointer the event.
THIS CAN FREEZE ANY INPUT TO FLUXBOX!!!

The toolbar (and other things?) grab buttons in order to
handle MouseN events for the entire bar, INCLUDING all child
windows.

This causes two problems:
1. The bar handles events which are not meant for fluxbox at all
   (but the systray icons)
BUG: 940

2. The bar will intercept (and suck) *every* press, even if only
   doubleclicks are desired
BUG: 949

The problem with this patch is that an oversight here has the potential
to completely freeze input event processing in fluxbox (ie. the process
needs to be killed from outside), SO IT NEEDS TESTING!
As much as possible.
2016-08-27 09:36:19 +02:00
Thomas Lübking
ecdaab5edf fix titlebar ClickN handling
the tabcontainer is usually true and the releases were only
handled for the WINDOW context.

This relies on the patch to control OnTitlebar ./. OnWindow !

BUG: 1073
2016-08-27 09:34:01 +02:00
Thomas Lübking
08ea27de38 Control OnTitlebar ./. OnWindow
On concurrent shortcuts OnTitlebar implies OnWindow and was so
far resolved to OnWindow while OnTitlebar is the more precise
condition.

This also requires to exclude buttons from the titlebar context,
ie. pass the position to the getContext function on press events

BUG: 1035

The patch depends on the patch to correctly resolve the tab under the
mouse since we're now passing the actual subwindows around
2016-08-27 09:34:01 +02:00
Thomas Lübking
a1d3065994 Search actual tab under mouse
The feature suggests to behave like this bug actually only supported
mouse clicks (because the latest event window needed to be the tab)
This condition will break with two future patches (OnTitlebar context
selection and Sync Pointer grabbing) so the code to determine the tab
client needs to be a bit more sophisticated and, as a bonus, keyboard
shortcuts to activate the tab under the pointer will work as well =)
2016-08-27 09:34:01 +02:00
Thomas Lübking
8d88d9be17 add apps key to ignore XSizeHints
BUG: 1075
2016-08-27 08:54:26 +02:00
Thomas Lübking
3df681da2d apply size hints when applying the state
There's a setting about maximization which allows to control whether the
resize increments should be honored when maximizing windows.
This is currently used to control whether maximized windows may resize
themselves via (rare) configure events, but not when maximizing windows
- what's somehow not what the config item sells.

BUG: 914
2016-08-27 08:54:26 +02:00
Thomas Lübking
299e098f5f handle oversized windows
Clients can still be stupid (feh constrains itself to the root window
...) or lazy (llpp uses the last size - if that was in pivot mode ...)
and create windows which exceed the workspace dimensions, resulting in
both opposing edges being off-screen (for all tested placements)

This applies partial maximization instead and resizes the (restored)
window to soem sane size (size constraints applied)

CCBUG: 688
CCBUG: 984
2016-08-27 08:54:26 +02:00
Thomas Lübking
4304e66787 catch absurd but possible div-by-zero 2016-08-27 00:37:52 +02:00
Thomas Lübking
d4e9bb7656 emit resize signal when altering the iconbar mode
Otherwise the iconbar would be capped when showing more (eg. all instead
of iconified) windows
2016-08-27 00:37:52 +02:00
Thomas Lübking
f176c10881 Grab Server when showing or switching desktop
Should reduce exposure events, notably since the
windows are not in stack order.
2016-08-26 08:34:00 +02:00
Thomas Lübking
9613d2cd83 XAllowEvent's for CurrentTime
ML confirms that be.time seems to be dated or junk and
causes permanent freezes. Seen such myself but couldn't
sufficiently reproduce to pin a culprit.
2016-08-26 08:33:54 +02:00
Thomas Lübking
fbb2d16639 allow to alter button labels via fluxbox-remote
Command is "RelabelButton button.foo $LABEL"

This is useful to eg. hint the amount of unread mails in a
button to start your MUA, reflect the $USER in a session menu button
etc.
2016-08-26 08:18:48 +02:00
Thomas Lübking
393ba45f91 toolbar: allow labeled general action buttons
With this patch you can add buttons like
*.toolbar.button.foo.label: F
*.toolbar.button.foo.commands: RootMenu:Exec foo
*.toolbar.tools: button.foo, iconbar, ...

button.*.label is mandatory
button.*.commands suppots 5 mouse buttons, but the way
stringtok works, it's required to add a blank
(or some junk) between to colons to skip a button
2016-08-26 08:18:29 +02:00
Thomas Lübking
5c1bb0a21f support FbTk::TextButton's in ButtonTool
required to allow labeled general action
buttons in the toolbar
2016-08-26 08:17:42 +02:00
Thomas Lübking
1473bcf655 add functions to toggle slit/toolbar hidden 2016-08-26 08:06:47 +02:00
Thomas Lübking
10a9574738 Fix autohiding/raising timer logics
Trying to control a timer bound to an unconditional toggle, caused by
opposing events does not work. <- That's a period.
The toolbar implementation would act too seldom, the slit to often.

Instead, fire the timer whenever the state does not match the event and
bind it to a function that queries the pointer position and acts
accordingly.
2016-08-26 08:06:47 +02:00
Thomas Lübking
fe8ff87292 add autoraising to toolbar and slit 2016-08-26 08:06:47 +02:00
Thomas Lübking
6c0565c482 add commands to toggle toolbar and slit layer
toggle(Toolbar|Slit)Above toggles the resp. item between its
regular and the AboveDock layer (ie. above everything, even visible on
active fullscreen windows)

Also required step for autoraising.

REQUEST: 222
2016-08-26 08:06:47 +02:00
Thomas Lübking
f22435d60b add support for artificial struts (per head)
Allows to maintain access to desktop fractions etc. against
maximized windows. Also permits to OnToolbar clicks in this case, eg. to
raise it.

REQUEST: 150
2016-08-26 08:06:47 +02:00
Thomas Lübking
3bde5c8aee Improve stretching (RELATIVE) toolbar items
The available space is distributed reg. the preferred width
of items (spacers and the iconbar ;-) instead of evenly.

The preferred width of the iconbar is calculated from its buttons.

This allows to align the iconbar using spacers and makes better use of
the available space
2016-08-26 07:33:44 +02:00
Thomas Lübking
10e3f10b55 Adjust RELATIVE ::repositionItems (more relative)
The evenly distributed space causes a lot of whitespace and otoh. cut
items, so we use the items internal size as indicator IF the item is a
textbutton (the regular usecase in fluxbox)

Also publish the function to be triggered from outside (because the
caller can, in theory, much better compress several text changes)
2016-08-06 17:09:30 +02:00
Thomas Lübking
cc80230bd8 expose a preferredWidth of *Button's 2016-08-06 17:09:30 +02:00
Thomas Lübking
59d9b0703b delay title updates
Notably shells will cause brief interim titles when calling
short-lived commands (try "ls"...)
This covers such by waiting 100ms after every title update before
reacting (the title will have returned in the mentioned cases, the UI
remains steady)
2016-08-06 17:09:29 +02:00
Thomas Lübking
a8b0b3632b signal title changes
so that interested parties (the iconbar ;-) can use/forward them
2016-08-06 17:09:29 +02:00
Thomas Lübking
f6e1f555f9 Add SpacerTool
This allows to add random spacers, fixed size or stretching, to the toolbar.

CCBUG: 1141
2016-08-06 17:09:05 +02:00
Thomas Lübking
50b6102bbf flag slit for reconfiguration and act on show
According to Peter Ganzhorn, there's a transparency issue when using an
autohiding slit, but I don't use a slit at all.
However, the explanations in the bug do make sense and this is just an
alternative approach on the problem (that does not require interim
showing)

BUG: 1132
2016-07-30 18:38:28 +02:00
Thomas Lübking
dc226902a7 fix transient dialog placement
dialogs can be bigger than the mainwindow and the unsigned dimensions
then overflow in the subtraction (the window would still be moved into
screen bounds but appear on ugly 0,0)
2016-07-30 18:38:28 +02:00
Thomas Lübking
58491165d3 hide window before restoring the client on unmaps
otherwise compositors will update the texture and operate on (fade) the
frame instead of the client.
Didn't test why this only happens on ARGBs, but could be the colormap
installation.

BUG: 1110
2016-07-30 18:27:21 +02:00
Thomas Lübking
5e08a23f6c reposition visible submenus when changing style
a fixed position of the style menu won't help (the menu geometry changes
*because* the item geometries do) - warping the pointer would likely be
possible, but warping the pointer is cc. "evil"

BUG: 715
2016-07-30 18:22:49 +02:00
Thomas Lübking
bccb185cd9 reconfigTheme's on loading a new style
Also reconfigure menus (recursively) on style load
The most critical call is the shape update - the menus often become
cut-off, preventing mouse interaction with lower items, but also colors
are not applied correctly to menus w/o updating them.

BUG 1022 is most likely this and only a misinterpretation (for the
mentioned items are those with lacking color updates on style updates)

BUG: 1146
BUG: 1017
CCBUG: 1022
2016-07-30 18:22:49 +02:00
Thomas Lübking
6defd9391d handle both Focusable's as m_cycling_next
m_cycling_next can either be WinClient or a FluxboxWindow
In case of the latter, client->fbwindow() needs to be matched in
setFocusedWindow when protecting against client side focus juggling.

BUG: 1148
2016-07-30 15:10:21 +02:00
Thomas Lübking
f6132b7602 explicitly set s_focusedWindow for cycle protection 2016-07-30 15:10:21 +02:00
Thomas Lübking
87c0182ea5 Do not reset cycle focus when unsetting focus only 2016-07-30 15:10:21 +02:00
Thomas Lübking
635f14e5c9 Do not protect focus while cycling
We've better things to do and the focus is moving around anyway
BUG: 1048
2016-07-30 15:10:21 +02:00
Thomas Lübking
2758485d35 do not lock focus against unfocusing.
Latter happens when eg. closing windows, including such with
locked focus
2016-07-30 15:10:20 +02:00
Thomas Lübking
34bf7d31c4 prefer m_cycling_next over s_focused_window
as cycle start (former is where we wanted to go and X11 is still async)
2016-07-30 15:08:41 +02:00