Commit graph

6035 commits

Author SHA1 Message Date
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
Peter Ganzhorn
95b7c77409 Fix shaped toolbar being drawn incorrectly at TOPCENTER Fix round corners being drawn incorrectly on the TOP instead BOTTOM of the toolbar when toolbar placement is TOPCENTER. Also align the _values[] table a bit more nicely to make it easier to spot bugs like this. The bug was introduced in commit 67c31b49bd 'Refactor Toolbar.cc, less noise'. 2015-05-01 11:24:25 +02:00
Mathias Gumz
5b6fe35287 roll back 7e17056: m_index does not exist anymore
m_index was removed in 03ce82a.
2015-05-01 10:50:50 +02:00
Mario J. Rugiero
dce4721c84 TextBox::textStartPos can be const. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
6aff2f7c28 ButtonTheme::name can be const. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
9667d538eb Make Layer::getLayerNum() const. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
7e17056c35 Initialize m_index in MenuItem's constructors. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
2238c004aa Reduce the scope of the variable err in stringTokensBetween. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
2275e1e6e4 doSubmenu function in menutest.cc avoids copying labelstr by using a const reference. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
bf607341da addMatching and insertFromParent functions from FocusableList now avoid copying m_parent->clientList() and use a const reference instead. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
63f89cb433 Pass pre_command to CommandDialog as const reference to avoid unnecessary copying. 2015-05-01 10:46:20 +02:00
Casey Dahlin
79a358346a Don't assume ICONV_NULL = 0
We define the value ICONV_NULL = -1, but when we attempt to set the
s_iconv_convs array to all NULL values, we zero the array instead of setting
its entries to -1.

This patch properly initializes and wipes s_iconv_convs.
2015-04-11 08:25:59 +02:00
Mathias Gumz
88a74ff1cd Final notes 2015-02-08 11:44:34 +01:00
Mathias Gumz
7c3b9a34f3 Prepare manpages for 1.3.7 2015-02-08 11:20:53 +01:00
Arkadiusz Bokowy
e3300411eb Fix: typo during refactoring
Commit 63d9d69 introduced a bug, which has manifested itself by setting
window transparent state to the fully opaque (255).
2015-02-08 11:14:48 +01:00
Mathias Gumz
9f824b89fd Move internal code to internal side of FbTk::Transparent 2015-02-08 11:06:58 +01:00
Mathias Gumz
495846f1ee Add .mailmap file 2015-02-08 10:47:52 +01:00
Volkan Gezer
140b9717d7 Update Turkish translation
This adds missing strings as well as fixes the typos and grammar issues.
2015-02-07 18:27:22 +01:00
Mathias Gumz
09abda1482 Update ChangeLog and NEWS 2015-02-07 18:22:39 +01:00
Mathias Gumz
f84671ef8e Minor 2015-02-07 18:05:41 +01:00
Mathias Gumz
bd983fab55 Create buttons for titlebar with proper sizes
Instead of creating the titlebar buttons with a size of 10x10 pixels
and rely on resizing later on we now pick the correct dimensions
right on.

This fixes also bug #1125 ("Detaching a window from a tab-group renders
app-icon to 1/2"); the problem also occurred on restart.

I took the chance to refactor a little bit.
2015-02-07 17:59:37 +01:00
Mathias Gumz
c30b75091a Fix glitch of TabOptions menu 2015-02-07 11:46:00 +01:00