Commit graph

6056 commits

Author SHA1 Message Date
Thomas Lübking
d741b6fe6e improve fbrun completion
- streamline code
- indicate completion by making use of selection
- fix buggy behavior (notably subsequent completions and FS path
  following)
- support "~" in paths
- support chunk completion
  (ie. "mp[layer] ~/vid[eos/favporn.mp4]" can be completed in both
   tokens; buggy with paths including spaces in non-leafs)

REQUEST: 223
2016-07-23 16:58:04 +02:00
Thomas Lübking
ed75e883db clear selection on text input
Entering upcase chars would auto-select them
Seems I don't need upcase chars very often ;-)
2016-07-23 16:58:04 +02:00
Thomas Lübking
69756527d5 list strict mouse focus in FOCUS POLICY section
of man 1 fluxbox.

BUG: 950
2016-07-03 09:35:41 +02:00
Thomas Lübking
7525226fe2 less bashisms in fluxbox-generate_menu
still works with bash or zsh, but fish (now) complains about "cat << EOF" ...

no "grep -q"
BUG: 961

echo is troublesome
POSIX doesn't know a "local" keyword
BUG: 975

seems double comments ## aren't supported everywhere
BUG: 1057
2016-07-03 09:30:51 +02:00
Thomas Lübking
abd5c9e478 smart handling of NotifyUngrab crossing events
closing a keyboard driven popup had the sideeffect to return the focus
where the pointer is, regardless of whether that window had the focus
before (due to a NotifyUngrab crossing event), bug #597
This was resolved by simply ignoring NotifyUngrab mode crossings, but
that had the unfortunate sideeffects to break focus passing when the
mouse was actually moved (in a DnD operation, 730) or the focus shall be
passed on for strict mouse focus and a mouse triggered lower action (1012)

So instead we record the window that was last entered by a *real*
crossing and only ignore the NotifyUngrab event if this window didn't
change.

BUG: 1012
BUG: 730
CCBUG: 597
2016-07-03 09:29:07 +02:00
Thomas Lübking
848875eb92 Revert "bugfix: fbsetroot needs to use 24bit visuals as well"
This reverts commit 4f4d5e25d9.

The patch resolved a problem introduced by the ::setDepth abuse in
FbRootWindow, but this fails if the root window is *really* 32bit
With commit dcdde4d, the broken workaround depth selection is no longer
required.

BUG: 1093
2016-07-02 05:36:34 +02:00
Thomas Lübking
b6f620597b document "transient" section
BUG: 1092
2016-07-02 05:35:49 +02:00
Thomas Lübking
ca452a5886 ignore font for empty title height calculation
and align calculation on init and reconfigure

As a result, if a menu has no label, the title height is determined
only by menu.titleHeight (and the border sizes), not by the unused font.
2016-07-01 20:14:04 +02:00
Thomas Lübking
ea306493f9 re-fix alt+tab'bing through tabbed windows
commit 98313bf broke (i'm terribly sorry) this because m_cycling_last stores
the first client in a tabgroup, thus cannot be abused for this purpose.
So we explicitly store a value and btw. do it before sending the focus,
ie. "in time" for sure instead of "for sure™"
2016-07-01 19:42:28 +02:00
Thomas Lübking
e85cf49035 fix tabbing of unfocusable clients
this affects all java clients, because java uses the retarded
WM_TAKE_FOCUS protocol, but also very important clients like xeyes ;-)

BUG: 1055
2016-07-01 19:42:22 +02:00
Thomas Lübking
2aba567ea6 do not leave stale oplock behind
deiconify'ing a client on a different workspace left an oplock by a
shortcut return, turning the client semi- to inaccessible

BUG: 1010
2016-07-01 19:42:14 +02:00
Thomas Lübking
9d34cdbfa9 avoid calling into XLib
Testing one bug, the function seems usually be called with the root
window as parameter, so we can save a pointless lookup for the root of
the root by testing against window before testing against window_root.

Elegantly, this will "fix" the bug where XGetGeometry of the second
heads root will either report the first heads root or some junk (xephyr
case?)

BUG: 1128
2016-07-01 19:41:59 +02:00
Thomas Lübking
9dccccb84d ensure to update the current client tab from menu
the menu focuses which tries to set the current tab, but fails because
the iconified client won't have the input focus (yet), so we pass it a
dedicated "set this client and do not try to set input because we're
going to do next anyway explicitly" call =)

BUG: 997
2016-07-01 19:41:16 +02:00
Thomas Lübking
0951134ced do not move unfocused windows to the desktop layer
While usually™ the window is just reset to its original layer, ensuring
to show the active window is certainly a good idea, but it's not
required to lower the fullscreen window to the desktop layer, the other
windows layer + an extra raise is entirely sufficient and it's rather
odd to see conky when activating a utility window to a video player ;-)

CCBUG: 894
2016-07-01 19:40:55 +02:00
Thomas Lübking
666e7b0337 add _NET_WM_NAME to FbWindow::setName
since fluxbox is a f**** WM it should be able to use f**** NETWM hints
in its toolkit ;-)

CCBUG: 702
(does not fix input)
2016-07-01 19:40:47 +02:00
Thomas Lübking
475e966f19 fix tab selection by mousepress
Tabs outside the titlebar are not selectable by mouseclicks (ie. the
feature does not work)
The patch clones the enterNotifyEvent code and ignores (for now) the
actual button (no idea whether it makes any sense to restrict it the
left button?)

BUG: 1103
2016-07-01 19:40:34 +02:00
Thomas Lübking
6907dc2c23 document FocusProtection feature 2016-06-26 16:35:37 +02:00
Thomas Lübking
07d8fbfba8 merge remember focusnew into focusprotection
The FocusNewWindow key is still read, but not written and OVERRIDDEN in
case of conflict with the FocusProtection key
2016-06-26 16:35:26 +02:00
Thomas Lübking
1a61881ec3 Add FocusProtection features
The apps file gets a new key
FocusProtection
supporting a comma separated list.
* None : regular behavior
* Lock : If this window has the focus, no other may claim it
* Deny : This window is not allowed to focus itself

I addition there's preparation for a follow-up patch to incorporate and
substitute the present FocusNewWindow feature:
* Gain : Pass focus to new window
* Refuse : Do not pass focus to new window

rationale:
clients stealing the focus sucks badly and while there's an input driven
timeout, that only protects actual typing flow, but if eg. vlc proceeds on
the playlist, you'll suddenly control vlc instead of your browser
(ie. typing ctrl+w doesn't close the tab, but the playlist ...)
2016-06-26 16:35:16 +02:00
Thomas Lübking
69b0f0fa97 remove strut when property is withdrawn
CCBUG: 1133
2016-06-26 16:31:37 +02:00
Thomas Lübking
bfe4737427 fix tracking of MWM hints in case of removal 2016-06-26 16:31:22 +02:00
Thomas Lübking
dcdde4d32c replace FbRootWindow::depth with maxDepth
The depth member of FbWindow was abused to store the maximum depth
but that gets overridden with geometry changes of the root window
(screen layout changes) so we store and read the value explicitly while
::depth() maintains the actual depth of the root window

The result of this is that frames for ARGB windows were created with a
wrong depth and failed to reparent the client window.

BUG: 1102
BUG: 1058
2016-06-26 16:29:34 +02:00
Thomas Lübking
484c33bf25 prevent clients from positioning out of workspace
Still enough stupid ones around which ask for 0,0
(despite there's a panel ...) or restore a position
on a VGA screen which they stored while being on a 4k
screen.

Otoh, do not forcefully position the window just because
the topleft position is outside any head, this can still
be desired and isn't a problem.
Actually, the corner could be covered by the close button
and if *only* it is onscreen the window can hardly by used
or seen.
2016-06-26 16:21:02 +02:00
Thomas Lübking
6201286cdf keep cmd menus off struts when the mouse is in it
the mouse is likely the trigger, so the popup would cover the
trigger item.
The present behavior of the iconbar suggests such behavior is
desired.
2016-06-26 16:16:04 +02:00
Mathias Gumz
b9ed1c16de improve consistency
for a std::string::size_type, the right value to use is not "-1", but
std::string::npos.
2016-05-28 16:57:43 +02:00
Mathias Gumz
a9e17d4091 fix broken text selection for FbTk::TextBox
uninitialized variables cause all kind of problems.
2016-05-28 16:52:28 +02:00
Thomas Lübking
98313bfb91 harden focus cycling against client focussing
Clients which implement a client-side modality might cause
livelocks by reverting the focus to the transient (after the
WM tried to put it on the leader as the transient's modality
is unknown)

So while cycling we revert the focus whenever it moves somewhere
where we don't expect it.
When done, we also focus the window that should have the focus anyway
to allow the client to redistribute the focus (as we prevented it
during cycling)

Hall of Shame: Softmaker Freeoffice uses (only) client side modality.
2016-05-28 11:05:45 +02:00
Thomas Lübking
cb1a82ba9f document -preselect in fbrun manpage 2016-05-28 10:36:41 +02:00
Mathias Gumz
a11035440c fix fbsetbg in combination with picky shells
in *BSD, /bin/sh is Almquist Shell(ash). the 'hash' built-in command of ash
returns 0, always. 'hash' is not usable for find_it() function in
util/fbsetbg and util/fluxbox-generate_menu.in.

this patch changes the behavior of find_it(): when 'hash' is detected to
not work correctly, switch back to 'which'.


this patch is the work of Yamashiro, Jun and appeared first as patch-160
on sourceforge: https://sourceforge.net/p/fluxbox/patches/160/. i submit
it on behalf of the author.
2016-04-25 20:11:14 +02:00
Juan Gonzalez Lopez
5d90b7984c Fix menus over a single column wide
Fixes menus more than 1 column wide (such as the Placement menus for
the Toolbar/Slit/Tabs) which stopped working with commit 3e4570b.
2016-04-25 19:30:38 +02:00
Thomas Lübking
7b8e4413f8 Allow to preselect preset text 2016-04-25 19:04:13 +02:00
Thomas Lübking
58b50fb786 Allow text selection
FbTk::TextBox now acts like any contemporary input field ;-)
2016-04-25 19:04:13 +02:00
Thomas Lübking
2e8766174e place transient centered on its parent
so far, transients are simply unplaced, resulting in a static
0,0 position.
2016-04-06 21:54:26 +02:00
Arkadiusz Bokowy
53de872163 Mixed relative and absolute values for apps
Allow setting relative value for x and y or width and height separately in
the apps configuration file. This makes these settings compatible with ones
available in the keys file.

Previous buggy behavior:
If someone has specified, e.g. "[Dimensions] {50% 100}" it was parsed as
"{50% 100%}" not as "{50% 100px}" which was inconsistent with the "keys"
configuration file.

From now on it is possible to write something like this:
[app]
  [Position] (RIGHT) {50% 0}
  [Dimensions] {300 100%}
[end]

Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
2016-02-28 14:55:36 +01:00
John Sennesael
22866c4d30 fixes bug #1138 2016-01-09 20:20:53 +01:00
Mathias Gumz
3c06e9e93f minor code cosmetics 2016-01-09 18:30:22 +01:00
foobar0815
6346368b58 send ConfigureNotify using root coordinates 2016-01-09 17:45:23 +01:00
Ulrich Eckhardt
fa6a1e5cf1 Add documentation for edge snap feature when resizing. 2016-01-04 21:54:30 +01:00
Nephiel
1f1d43bdbf Add Resize Snap
Make windows snap to edges when resizing them, as well as when moving.
From http://darkshed.net/files/patches/fluxbox/fluxbox-resize-snap-try2.diff
2016-01-04 21:17:26 +01:00
Mathias Gumz
3e4570becc merge pull-request 14 2016-01-04 20:41:01 +01:00
Oliver Gondža
c7462f09a4 fbsetbg: Report wallpaper directory path when invalid 2015-08-10 21:52:49 +02:00
Ken Moore
a1f647d09c Update MinOverlapPlacement.cc
Skip any windows which are not in the same layer as the window to be placed.
2015-07-29 12:26:15 -04:00
Ken Moore
5905c4623e Update ColSmartPlacement.cc
Skip any window that is not in the same layer as the window to be placed.
2015-07-29 12:22:22 -04:00
Ken Moore
17f8a936ce Update RowSmartPlacement.cc
Skip any window that does not exist in the same layer as the window to be placed.
2015-07-29 12:17:51 -04:00
Peter Ganzhorn
69d13337fe Fix hidden toolbar placement 2015-05-14 14:50:34 +02:00
Mathias Gumz
169d640610 Simplify code
* assume 'pattern' to always be lowercase
* rename some variables
2015-05-02 15:45:16 +02:00
Mathias Gumz
533c9a2aa5 Fix bug in detecting text in MenuSearch
A bug sneaked into my implementation of Boyer-Moore-Horspool. This lead
to not finding certain patterns. Given the text 'abcdde' and the pattern
'dd', the faulty implementation would not find 'dd':

1. 'ab' does not match, skip 2 (length of pattern)
2. 'cd' does not match, skip 2 (length of pattern) <- the bug.
3. 'de' does not match, end of string

The bug in step 2 is to not use 'd' to detect how far to skip but to
use 'c' (which is not in the skip-table) and thus 2 bytes are skipped).
2015-05-02 14:04:50 +02:00
Lajos Koszti
c8a1c67494 Make sure render new styles into full menu
Different styles makes the menu width different.
When the original menu width is bigger than the newly selected style's
width, the rendering produces pretty strange effects:
The old style's frame not cleared, so it was rendered and visible next
to the new style edge.

With this change, the menu width will be as wide as the widest menu
item.

Style switching still not perfect, because the height of a menu item is
from the "first" selected menu, also font color are not updated.
2015-05-01 22:16:03 +02:00
Peter Ganzhorn
e117f5acd6 Fix RIGHTCENTER placement of the toolbar. Instead of subtracting borderwidth (bw) from (frame.height))/2 they were multiplied causing wrong placement for this case. 2015-05-01 14:19:58 +02:00
Peter Ganzhorn
949e973dd2 Shape only toolbar corners not touching any edges of the screen. It just looks better this way. 2015-05-01 14:19:49 +02:00