show tooltips for tabs
on the run (yes sucks, sorry) fixes a bug where windows were not activated on hovering the tab (for focus-follows-mouse policies) REQUEST: 95 The iconbar already shows tooltips and I doubt the claim that (untabbed) titlebars are "often" too short for the window title.
This commit is contained in:
parent
bc1ad61a7d
commit
c69d5afb64
3 changed files with 14 additions and 5 deletions
|
@ -66,6 +66,7 @@ public:
|
|||
bool setOrientation(FbTk::Orientation orient);
|
||||
|
||||
virtual unsigned int preferredWidth() const;
|
||||
void showTooltip();
|
||||
|
||||
const FbTk::Signal<> &titleChanged() { return m_title_changed; }
|
||||
|
||||
|
@ -74,7 +75,6 @@ protected:
|
|||
private:
|
||||
void reconfigAndClear();
|
||||
void setupWindow();
|
||||
void showTooltip();
|
||||
|
||||
/// Refresh all pixmaps and windows
|
||||
/// @param setup Wether to setup window again.
|
||||
|
|
|
@ -2774,10 +2774,13 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
|
|||
Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0,
|
||||
Keys::ON_WINDOW, m_client);
|
||||
|
||||
WinClient *client = 0;
|
||||
if (screen().focusControl().isMouseTabFocus()) {
|
||||
// determine if we're in a label button (tab)
|
||||
client = winClientOfLabelButtonWindow(ev.window);
|
||||
// determine if we're in a label button (tab)
|
||||
WinClient *client = winClientOfLabelButtonWindow(ev.window);
|
||||
if (client) {
|
||||
if (IconButton *tab = m_labelbuttons[client]) {
|
||||
m_has_tooltip = true;
|
||||
tab->showTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
if (ev.window == frame().window() ||
|
||||
|
@ -2818,6 +2821,11 @@ void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_has_tooltip) {
|
||||
m_has_tooltip = false;
|
||||
screen().hideTooltip();
|
||||
}
|
||||
|
||||
// still inside?
|
||||
if (ev.x_root > frame().x() && ev.y_root > frame().y() &&
|
||||
ev.x_root <= (int)(frame().x() + frame().width()) &&
|
||||
|
|
|
@ -576,6 +576,7 @@ private:
|
|||
WinClient *m_client; ///< current client
|
||||
typedef std::map<WinClient *, IconButton *> Client2ButtonMap;
|
||||
Client2ButtonMap m_labelbuttons;
|
||||
bool m_has_tooltip;
|
||||
|
||||
SizeHints m_size_hint;
|
||||
struct {
|
||||
|
|
Loading…
Reference in a new issue