all repos — fluxbox @ a076bdcbdaef5d61370acd35e8e2870fb7ad9e09

custom fork of the fluxbox windowmanager

merge
Mathias Gumz akira at fluxbox dot org
commit

a076bdcbdaef5d61370acd35e8e2870fb7ad9e09

parent

9a28a8bfec7606f19f373a27df33a89ba6f7de7c

M doc/asciidoc/client-patterns.txtdoc/asciidoc/client-patterns.txt

@@ -32,9 +32,18 @@ (typically, a popup dialog) or not.

*Maximized*;; Either *yes* or *no*, depending on whether the window is maximized or not. +*MaximizedHorizontal*;; + Either *yes* or *no*, depending on whether the window is maximized + horizontally or not. +*MaximizedVertical*;; + Either *yes* or *no*, depending on whether the window is maximized + vertically or not. *Minimized*;; Either *yes* or *no*, depending on whether the window is minimized (iconified) or not. +*Fullscreen*;; + Either *yes* or *no*, depending on whether the window is fullscreen or + not. *Shaded*;; Either *yes* or *no*, depending on whether the window is shaded or not.
M doc/asciidoc/fluxbox-apps.txtdoc/asciidoc/fluxbox-apps.txt

@@ -137,10 +137,10 @@ *NORMAL*;;

Standard decorations *NONE*;; No decorations - *TAB* - Like TAB except keep the tabs - *Border*;; + *BORDER*;; Like NONE except keep the X window border + *TAB*;; + Like BORDER except keep external tabs (if enabled) *TINY*;; Titlebar with only an iconify button *TOOL*;;

@@ -150,8 +150,7 @@ --

+ The 'value' may also be a bitmask for finer-grained control. The bits are, from (1<<0) to (1<<10): Titlebar, Handle/Grips, Border, Iconify Button, Maximize -Button, Close Button, Menu Enabled, Sticky Button, Shade Button, Tabbing -enabled, Focus Enabled. +Button, Close Button, Menu Button, Sticky Button, Shade Button, External Tabs, Focus Enabled. *[Shaded]* {'bool'}:: Whether the window is Shaded (rolled-up) or not.
M doc/fluxbox-apps.5.indoc/fluxbox-apps.5.in

@@ -1,7 +1,7 @@

'\" t .\" Title: fluxbox-apps .\" Author: Jim Ramsay <i.am@jimramsay.com> -.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> .\" Date: 28 October 2011 .\" Manual: Fluxbox Manual .\" Source: fluxbox-apps.txt

@@ -137,18 +137,18 @@ .RS 4

Specify the layer to open the window on (by number)\&. Each layer has a number\&. The named ones are: 2\-AboveDock, 4\-Dock, 6\-Top, 8\-Normal, 10\-Bottom, 12\-Desktop\&. .RE .PP -\fB[Dimensions]\fR {\fIwidth\fR \fIheight\fR} +\fB[Dimensions]\fR {\fIwidth[%]\fR \fIheight[%]\fR} .RS 4 Opens the application with the specified \fIwidth\fR and -\fIheight\fR, in pixels\&. +\fIheight\fR, in pixels\&. If the value is given in percent, then the window size will be based on the current screen\(cqs size\&. .RE .PP -\fB[Position]\fR (\fIanchor\fR) {\fIX\fR \fIY\fR} +\fB[Position]\fR (\fIanchor\fR) {\fIX[%]\fR \fIY[%]\fR} .RS 4 Position the application at a particular spot\&. By default the upper\-left corner is placed at screen coordinates (\fIX\fR,\fIY\fR)\&. If you specify an -\fIanchor\fR, say BottomRight, then the lower\-right corner of the window is positioned (\fIX\fR,\fIY\fR) pixels from the lower\-right corner of the screen\&. +\fIanchor\fR, say BottomRight, then the lower\-right corner of the window is positioned (\fIX\fR,\fIY\fR) pixels from the lower\-right corner of the screen\&. If the value is given in percent, then the coordinates will be based on the current screen\(cqs size\&. .PP \fIanchor\fR may be set to one of: .RS 4

@@ -171,13 +171,16 @@ .PP

\fBNONE\fR .RS 4 No decorations -\fBTAB\fR -Like TAB except keep the tabs .RE .PP -\fBBorder\fR +\fBBORDER\fR .RS 4 Like NONE except keep the X window border +.RE +.PP +\fBTAB\fR +.RS 4 +Like BORDER except keep external tabs (if enabled) .RE .PP \fBTINY\fR

@@ -192,7 +195,7 @@ .RE

.sp The \fIvalue\fR -may also be a bitmask for finer\-grained control\&. The bits are, from (1<<0) to (1<<10): Titlebar, Handle/Grips, Border, Iconify Button, Maximize Button, Close Button, Menu Enabled, Sticky Button, Shade Button, Tabbing enabled, Focus Enabled\&. +may also be a bitmask for finer\-grained control\&. The bits are, from (1<<0) to (1<<10): Titlebar, Handle/Grips, Border, Iconify Button, Maximize Button, Close Button, Menu Button, Sticky Button, Shade Button, External Tabs, Focus Enabled\&. .RE .RE .PP

@@ -348,12 +351,36 @@ or

\fBno\fR, depending on whether the window is maximized or not\&. .RE .PP +\fBMaximizedHorizontal\fR +.RS 4 +Either +\fByes\fR +or +\fBno\fR, depending on whether the window is maximized horizontally or not\&. +.RE +.PP +\fBMaximizedVertical\fR +.RS 4 +Either +\fByes\fR +or +\fBno\fR, depending on whether the window is maximized vertically or not\&. +.RE +.PP \fBMinimized\fR .RS 4 Either \fByes\fR or \fBno\fR, depending on whether the window is minimized (iconified) or not\&. +.RE +.PP +\fBFullscreen\fR +.RS 4 +Either +\fByes\fR +or +\fBno\fR, depending on whether the window is fullscreen or not\&. .RE .PP \fBShaded\fR
M doc/fluxbox-keys.5.indoc/fluxbox-keys.5.in

@@ -1,7 +1,7 @@

'\" t .\" Title: fluxbox-keys .\" Author: Jim Ramsay <i.am@jimramsay.com> -.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> .\" Date: 28 October 2011 .\" Manual: Fluxbox Manual .\" Source: fluxbox-keys.txt

@@ -417,24 +417,24 @@ .RS 4

Remove the current tab from the tab group, placing it in its own window\&. .RE .PP -\fBResizeTo\fR \fIwidth\fR \fIheight\fR +\fBResizeTo\fR \fIwidth[%]\fR \fIheight[%]\fR .RS 4 -Resizes the window to the given width and height\&. +Resizes the window to the given width and height\&. If the value is given in percent, then the window size will be based on the current screen\(cqs size\&. .RE .PP -\fBResize\fR \fIdelta\-width\fR \fIdelta\-height\fR +\fBResize\fR \fIdelta\-width[%]\fR \fIdelta\-height[%]\fR .RS 4 -Resizes the window relative to the current width and height\&. +Resizes the window relative to the current width and height\&. If the value is given in percent, then the window size will be based on the current window\(cqs size\&. .RE .PP -\fBResizeHorizontal\fR \fIdelta\-width\fR / \fBResizeVertical\fR \fIdelta\-height\fR +\fBResizeHorizontal\fR \fIdelta\-width[%]\fR / \fBResizeVertical\fR \fIdelta\-height[%]\fR .RS 4 -Resizes the window in one dimension only +Resizes the window in one dimension only\&. If the value is given in percent, then the window size will be based on the current window\(cqs size\&. .RE .PP -\fBMoveTo\fR \fIx\fR \fIy\fR [\fIanchor\fR] +\fBMoveTo\fR \fIx[%]\fR \fIy[%]\fR [\fIanchor\fR] .RS 4 -Moves the window to the given coordinates, given in pixels\&. +Moves the window to the given coordinates, given in pixels or relatively to the current screen size if % is specified after the value\&. .sp If either \fIx\fR

@@ -1034,12 +1034,36 @@ or

\fBno\fR, depending on whether the window is maximized or not\&. .RE .PP +\fBMaximizedHorizontal\fR +.RS 4 +Either +\fByes\fR +or +\fBno\fR, depending on whether the window is maximized horizontally or not\&. +.RE +.PP +\fBMaximizedVertical\fR +.RS 4 +Either +\fByes\fR +or +\fBno\fR, depending on whether the window is maximized vertically or not\&. +.RE +.PP \fBMinimized\fR .RS 4 Either \fByes\fR or \fBno\fR, depending on whether the window is minimized (iconified) or not\&. +.RE +.PP +\fBFullscreen\fR +.RS 4 +Either +\fByes\fR +or +\fBno\fR, depending on whether the window is fullscreen or not\&. .RE .PP \fBShaded\fR
M src/ClientPattern.ccsrc/ClientPattern.cc

@@ -67,13 +67,17 @@ const char* name;

ClientPattern::WinProperty prop; }; -const Name2WinProperty name_2_winproperties[] = { // sorted for 'bsearch' +// sorted alphabetically for 'bsearch' +const Name2WinProperty name_2_winproperties[] = { { "class", ClientPattern::CLASS }, { "focushidden", ClientPattern::FOCUSHIDDEN }, + { "fullscreen", ClientPattern::FULLSCREEN }, { "head", ClientPattern::HEAD }, { "iconhidden", ClientPattern::ICONHIDDEN }, { "layer", ClientPattern::LAYER }, { "maximized", ClientPattern::MAXIMIZED }, + { "maximizedhorizontal", ClientPattern::HORZMAX }, + { "maximizedvertical", ClientPattern::VERTMAX }, { "minimized", ClientPattern::MINIMIZED }, { "name", ClientPattern::NAME }, { "role", ClientPattern::ROLE },

@@ -132,6 +136,9 @@ { ClientPattern::LAYER, "layer" },

{ ClientPattern::URGENT, "urgent" }, { ClientPattern::SCREEN, "screen" }, { ClientPattern::XPROP, "@" }, + { ClientPattern::FULLSCREEN, "fullscreen" }, + { ClientPattern::VERTMAX, "maximizedvertical" }, + { ClientPattern::HORZMAX, "maximizedhorizontal" }, };

@@ -410,6 +417,15 @@ result = (fbwin && fbwin->isMaximized()) ? "yes" : "no";

break; case MINIMIZED: result = (fbwin && fbwin->isIconic()) ? "yes" : "no"; + break; + case FULLSCREEN: + result = (fbwin && fbwin->isFullscreen()) ? "yes" : "no"; + break; + case VERTMAX: + result = (fbwin && fbwin->isMaximizedVert()) ? "yes" : "no"; + break; + case HORZMAX: + result = (fbwin && fbwin->isMaximizedHorz()) ? "yes" : "no"; break; case SHADED: result = (fbwin && fbwin->isShaded()) ? "yes" : "no";
M src/ClientPattern.hhsrc/ClientPattern.hh

@@ -55,7 +55,7 @@ enum WinProperty {

TITLE = 0, CLASS, NAME, ROLE, TRANSIENT, MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN, WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN, - XPROP + XPROP, FULLSCREEN, VERTMAX, HORZMAX }; /// Does this client match this pattern?
M src/FocusControl.ccsrc/FocusControl.cc

@@ -53,7 +53,7 @@ namespace {

bool doSkipWindow(const Focusable &win, const ClientPattern *pat) { const FluxboxWindow *fbwin = win.fbwindow(); - if (!fbwin || fbwin->isFocusHidden()) + if (!fbwin || fbwin->isFocusHidden() || fbwin->isModal()) return true; // skip if no fbwindow or if focushidden if (pat && !pat->match(win)) return true; // skip if it doesn't match the pattern
M src/Focusable.hhsrc/Focusable.hh

@@ -54,8 +54,10 @@ virtual bool focus() { return false; }

/// @return true if the focusable has input focus virtual bool isFocused() const { return m_focused; } - /// @return return true if it can be focused + /// @return true if it can be focused virtual bool acceptsFocus() const { return true; } + /// @return true if temporarily prevented from being focused + virtual bool isModal() const { return false; } /// @return true if icon button should appear focused bool getAttentionState() const { return m_attention_state; }
M src/Window.ccsrc/Window.cc

@@ -3306,6 +3306,10 @@ bool FluxboxWindow::acceptsFocus() const {

return (m_client ? m_client->acceptsFocus() : false); } +bool FluxboxWindow::isModal() const { + return (m_client ? m_client->isModal() : true); +} + const FbTk::PixmapWithMask &FluxboxWindow::icon() const { return (m_client ? m_client->icon() : m_icon); }

@@ -3609,15 +3613,16 @@ winbtn->setOnClick(shade_cmd);

} break; case WinButton::MENUICON: - winbtn = new WinButton(*this, m_button_theme, - screen().pressedWinButtonTheme(), - dir[i], - frame().titlebar(), - 0, 0, 10, 10); - winbtn->join(titleSig(), + if (m_state.deco_mask & WindowState::DECORM_MENU) { + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), + dir[i], + frame().titlebar(), + 0, 0, 10, 10); + winbtn->join(titleSig(), FbTk::MemFunIgnoreArgs(*winbtn, &WinButton::updateAll)); - - winbtn->setOnClick(show_menu_cmd); + winbtn->setOnClick(show_menu_cmd); + } break; }
M src/Window.hhsrc/Window.hh

@@ -414,6 +414,7 @@ const FbTk::FbWindow &parent() const { return m_parent; }

FbTk::FbWindow &parent() { return m_parent; } bool acceptsFocus() const; + bool isModal() const; const FbTk::PixmapWithMask &icon() const; const FbTk::BiDiString &title() const; const FbTk::FbString &getWMClassName() const;
M src/WindowState.hhsrc/WindowState.hh

@@ -90,10 +90,10 @@

enum Decoration { DECOR_NONE = 0, DECOR_NORMAL = DECORM_LAST - 1, - DECOR_TINY = DECORM_TITLEBAR|DECORM_ICONIFY|DECORM_MENU|DECORM_TAB, - DECOR_TOOL = DECORM_TITLEBAR|DECORM_MENU, - DECOR_BORDER = DECORM_BORDER|DECORM_MENU, - DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB + DECOR_TINY = DECORM_TITLEBAR|DECORM_ICONIFY, + DECOR_TOOL = DECORM_TITLEBAR, + DECOR_BORDER = DECORM_BORDER, + DECOR_TAB = DECORM_BORDER|DECORM_TAB }; enum WindowType {