aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/asciidoc/fluxbox.132
-rw-r--r--doc/asciidoc/fluxbox.txt16
-rw-r--r--doc/fluxbox.1.in32
-rw-r--r--src/FbTk/Menu.cc4
-rw-r--r--src/FbTk/MenuTheme.cc3
-rw-r--r--src/FbTk/MenuTheme.hh9
-rw-r--r--src/Screen.cc17
-rw-r--r--src/Screen.hh2
9 files changed, 22 insertions, 96 deletions
diff --git a/ChangeLog b/ChangeLog
index fe11533..675b073 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.1.2 2Changes for 1.1.2
3*08/10/13:
4 * Merge menuDelay and menuDelayClose options in init (Mark)
5 Screen.cc/hh FbTk/MenuTheme.cc/hh FbTk/Menu.cc
3*08/10/07: 6*08/10/07:
4 * Allow relative paths for background images in style files (Mark) 7 * Allow relative paths for background images in style files (Mark)
5 RootTheme.cc FbTk/Image.cc/hh 8 RootTheme.cc FbTk/Image.cc/hh
diff --git a/doc/asciidoc/fluxbox.1 b/doc/asciidoc/fluxbox.1
index 9eae541..11cea60 100644
--- a/doc/asciidoc/fluxbox.1
+++ b/doc/asciidoc/fluxbox.1
@@ -1,12 +1,12 @@
1.\" Title: fluxbox 1.\" Title: fluxbox
2.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] 2.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> 3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4.\" Date: 10/04/2008 4.\" Date: 10/12/2008
5.\" Manual: [FIXME: manual] 5.\" Manual: [FIXME: manual]
6.\" Source: [FIXME: source] 6.\" Source: [FIXME: source]
7.\" Language: English 7.\" Language: English
8.\" 8.\"
9.TH "FLUXBOX" "1" "10/04/2008" "[FIXME: source]" "[FIXME: manual]" 9.TH "FLUXBOX" "1" "10/12/2008" "[FIXME: source]" "[FIXME: manual]"
10.\" ----------------------------------------------------------------- 10.\" -----------------------------------------------------------------
11.\" * (re)Define some macros 11.\" * (re)Define some macros
12.\" ----------------------------------------------------------------- 12.\" -----------------------------------------------------------------
@@ -845,26 +845,6 @@ Button 3 (Un)Maximize window horizontally\&.
845.SS "Workspace Menu" 845.SS "Workspace Menu"
846.sp 846.sp
847The workspace menu can be found by middle clicking on the background\&. A menu will popup giving you the option to add or remove a workspace\&. You will also see your workspaces listed there; middle clicking on a workspace name will take you to that workspace, whereas clicking on a window name in one of the per\-workspace submenus will take you to the workspace that window is on, and select the window\&. Last but not least you will notice the Icons menu\&. This is for applications which have been `iconified\'\&. 847The workspace menu can be found by middle clicking on the background\&. A menu will popup giving you the option to add or remove a workspace\&. You will also see your workspaces listed there; middle clicking on a workspace name will take you to that workspace, whereas clicking on a window name in one of the per\-workspace submenus will take you to the workspace that window is on, and select the window\&. Last but not least you will notice the Icons menu\&. This is for applications which have been `iconified\'\&.
848.SS "Menu Behavior"
849.sp
850The behavior of the submenus in a menu can be configured in the `init\' file, with the following entries (default for both is 0):
851.sp
852.if n \{\
853.RS 4
854.\}
855.fam C
856.ps -1
857.nf
858.BB lightgray
859session\&.screen0\&.menuDelay: <msec>
860session\&.screen0\&.menuDelayClose: <msec>
861.EB lightgray
862.fi
863.fam
864.ps +1
865.if n \{\
866.RE
867.\}
868.SS "Menu Syntax" 848.SS "Menu Syntax"
869.sp 849.sp
870There are up to four fields in a menu line\&. They are of the form: 850There are up to four fields in a menu line\&. They are of the form:
@@ -1789,12 +1769,8 @@ session\&.screen0\&.defaultDeco: <string>
1789 the APPLICATIONS section\&. Default: NORMAL\&. 1769 the APPLICATIONS section\&. Default: NORMAL\&.
1790 1770
1791session\&.screen0\&.menuDelay: <integer> 1771session\&.screen0\&.menuDelay: <integer>
1792 This sets the delay in milliseconds for submenus to open with the previous 1772 This sets the delay in milliseconds for submenus to open when you hover
1793 option set to `Delay\'\&. Default: 0 1773 over them or to close when you hover over another item\&. Default: 200
1794
1795session\&.screen0\&.menuDelayClose: 0
1796 This value sets the delay in milliseconds that you would like the menu to
1797 remain visible after you\'ve clicked out of it\&. Default: 0
1798 1774
1799session\&.screen0\&.focusNewWindows: <boolean> 1775session\&.screen0\&.focusNewWindows: <boolean>
1800 This sets whether or not new windows will become focused automatically\&. 1776 This sets whether or not new windows will become focused automatically\&.
diff --git a/doc/asciidoc/fluxbox.txt b/doc/asciidoc/fluxbox.txt
index 179818b..1bb9123 100644
--- a/doc/asciidoc/fluxbox.txt
+++ b/doc/asciidoc/fluxbox.txt
@@ -367,14 +367,6 @@ workspace that window is on, and select the window. Last but not least
367you will notice the Icons menu. This is for applications which have 367you will notice the Icons menu. This is for applications which have
368been `iconified'. 368been `iconified'.
369 369
370Menu Behavior
371~~~~~~~~~~~~~
372The behavior of the submenus in a menu can be configured in the `init'
373file, with the following entries (default for both is 0):
374
375 session.screen0.menuDelay: <msec>
376 session.screen0.menuDelayClose: <msec>
377
378Menu Syntax 370Menu Syntax
379~~~~~~~~~~~ 371~~~~~~~~~~~
380There are up to four fields in a menu line. They are of the form: 372There are up to four fields in a menu line. They are of the form:
@@ -837,12 +829,8 @@ session.screen0.defaultDeco: <string>
837 the APPLICATIONS section. Default: NORMAL. 829 the APPLICATIONS section. Default: NORMAL.
838 830
839session.screen0.menuDelay: <integer> 831session.screen0.menuDelay: <integer>
840 This sets the delay in milliseconds for submenus to open with the previous 832 This sets the delay in milliseconds for submenus to open when you hover
841 option set to `Delay'. Default: 0 833 over them or to close when you hover over another item. Default: 200
842
843session.screen0.menuDelayClose: 0
844 This value sets the delay in milliseconds that you would like the menu to
845 remain visible after you've clicked out of it. Default: 0
846 834
847session.screen0.focusNewWindows: <boolean> 835session.screen0.focusNewWindows: <boolean>
848 This sets whether or not new windows will become focused automatically. 836 This sets whether or not new windows will become focused automatically.
diff --git a/doc/fluxbox.1.in b/doc/fluxbox.1.in
index 9eae541..11cea60 100644
--- a/doc/fluxbox.1.in
+++ b/doc/fluxbox.1.in
@@ -1,12 +1,12 @@
1.\" Title: fluxbox 1.\" Title: fluxbox
2.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] 2.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> 3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4.\" Date: 10/04/2008 4.\" Date: 10/12/2008
5.\" Manual: [FIXME: manual] 5.\" Manual: [FIXME: manual]
6.\" Source: [FIXME: source] 6.\" Source: [FIXME: source]
7.\" Language: English 7.\" Language: English
8.\" 8.\"
9.TH "FLUXBOX" "1" "10/04/2008" "[FIXME: source]" "[FIXME: manual]" 9.TH "FLUXBOX" "1" "10/12/2008" "[FIXME: source]" "[FIXME: manual]"
10.\" ----------------------------------------------------------------- 10.\" -----------------------------------------------------------------
11.\" * (re)Define some macros 11.\" * (re)Define some macros
12.\" ----------------------------------------------------------------- 12.\" -----------------------------------------------------------------
@@ -845,26 +845,6 @@ Button 3 (Un)Maximize window horizontally\&.
845.SS "Workspace Menu" 845.SS "Workspace Menu"
846.sp 846.sp
847The workspace menu can be found by middle clicking on the background\&. A menu will popup giving you the option to add or remove a workspace\&. You will also see your workspaces listed there; middle clicking on a workspace name will take you to that workspace, whereas clicking on a window name in one of the per\-workspace submenus will take you to the workspace that window is on, and select the window\&. Last but not least you will notice the Icons menu\&. This is for applications which have been `iconified\'\&. 847The workspace menu can be found by middle clicking on the background\&. A menu will popup giving you the option to add or remove a workspace\&. You will also see your workspaces listed there; middle clicking on a workspace name will take you to that workspace, whereas clicking on a window name in one of the per\-workspace submenus will take you to the workspace that window is on, and select the window\&. Last but not least you will notice the Icons menu\&. This is for applications which have been `iconified\'\&.
848.SS "Menu Behavior"
849.sp
850The behavior of the submenus in a menu can be configured in the `init\' file, with the following entries (default for both is 0):
851.sp
852.if n \{\
853.RS 4
854.\}
855.fam C
856.ps -1
857.nf
858.BB lightgray
859session\&.screen0\&.menuDelay: <msec>
860session\&.screen0\&.menuDelayClose: <msec>
861.EB lightgray
862.fi
863.fam
864.ps +1
865.if n \{\
866.RE
867.\}
868.SS "Menu Syntax" 848.SS "Menu Syntax"
869.sp 849.sp
870There are up to four fields in a menu line\&. They are of the form: 850There are up to four fields in a menu line\&. They are of the form:
@@ -1789,12 +1769,8 @@ session\&.screen0\&.defaultDeco: <string>
1789 the APPLICATIONS section\&. Default: NORMAL\&. 1769 the APPLICATIONS section\&. Default: NORMAL\&.
1790 1770
1791session\&.screen0\&.menuDelay: <integer> 1771session\&.screen0\&.menuDelay: <integer>
1792 This sets the delay in milliseconds for submenus to open with the previous 1772 This sets the delay in milliseconds for submenus to open when you hover
1793 option set to `Delay\'\&. Default: 0 1773 over them or to close when you hover over another item\&. Default: 200
1794
1795session\&.screen0\&.menuDelayClose: 0
1796 This value sets the delay in milliseconds that you would like the menu to
1797 remain visible after you\'ve clicked out of it\&. Default: 0
1798 1774
1799session\&.screen0\&.focusNewWindows: <boolean> 1775session\&.screen0\&.focusNewWindows: <boolean>
1800 This sets whether or not new windows will become focused automatically\&. 1776 This sets whether or not new windows will become focused automatically\&.
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index a61bbc7..7cf2ac9 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -998,7 +998,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
998 // start submenu open delay 998 // start submenu open delay
999 timeval timeout; 999 timeval timeout;
1000 timeout.tv_sec = 0; 1000 timeout.tv_sec = 0;
1001 timeout.tv_usec = theme()->delayOpen() * 1000; // transformed to usec 1001 timeout.tv_usec = theme()->getDelay() * 1000; // transformed to usec
1002 m_submenu_timer.setTimeout(timeout); 1002 m_submenu_timer.setTimeout(timeout);
1003 m_submenu_timer.start(); 1003 m_submenu_timer.start();
1004 } else if (isItemSelectable(w)){ 1004 } else if (isItemSelectable(w)){
@@ -1191,7 +1191,7 @@ void Menu::closeMenu() {
1191void Menu::startHide() { 1191void Menu::startHide() {
1192 timeval timeout; 1192 timeval timeout;
1193 timeout.tv_sec = 0; 1193 timeout.tv_sec = 0;
1194 timeout.tv_usec = theme()->delayClose() * 1000; // transformed to usec 1194 timeout.tv_usec = theme()->getDelay() * 1000; // transformed to usec
1195 m_hide_timer.setTimeout(timeout); 1195 m_hide_timer.setTimeout(timeout);
1196 m_hide_timer.start(); 1196 m_hide_timer.start();
1197} 1197}
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index b6e8f93..28bcc35 100644
--- a/src/FbTk/MenuTheme.cc
+++ b/src/FbTk/MenuTheme.cc
@@ -72,8 +72,7 @@ MenuTheme::MenuTheme(int screen_num):
72 d_text_gc(RootWindow(m_display, screen_num)), 72 d_text_gc(RootWindow(m_display, screen_num)),
73 hilite_gc(RootWindow(m_display, screen_num)), 73 hilite_gc(RootWindow(m_display, screen_num)),
74 m_alpha(255), 74 m_alpha(255),
75 m_delayopen(0), // no delay as default 75 m_delay(0), // no delay as default
76 m_delayclose(0), // no delay as default
77 m_real_title_height(*m_title_height), 76 m_real_title_height(*m_title_height),
78 m_real_item_height(*m_item_height) 77 m_real_item_height(*m_item_height)
79{ 78{
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh
index 59fcbaf..c10615b 100644
--- a/src/FbTk/MenuTheme.hh
+++ b/src/FbTk/MenuTheme.hh
@@ -111,10 +111,8 @@ public:
111 // this isn't actually a theme item 111 // this isn't actually a theme item
112 // but we'll let it be here for now, until there's a better way to 112 // but we'll let it be here for now, until there's a better way to
113 // get resources into menu 113 // get resources into menu
114 void setDelayOpen(int msec) { m_delayopen = msec; } 114 void setDelay(int msec) { m_delay = msec; }
115 void setDelayClose(int msec) { m_delayclose = msec; } 115 int getDelay() const { return m_delay; }
116 int delayOpen() const { return m_delayopen; }
117 int delayClose() const { return m_delayclose; }
118 116
119 const Color &borderColor() const { return *m_border_color; } 117 const Color &borderColor() const { return *m_border_color; }
120 Shape::ShapePlace shapePlaces() const { return *m_shapeplace; } 118 Shape::ShapePlace shapePlaces() const { return *m_shapeplace; }
@@ -157,8 +155,7 @@ private:
157 GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; 155 GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc;
158 156
159 unsigned char m_alpha; 157 unsigned char m_alpha;
160 unsigned int m_delayopen; ///< in msec 158 unsigned int m_delay; ///< in msec
161 unsigned int m_delayclose; ///< in msec
162 unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight) 159 unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight)
163 unsigned int m_real_item_height; ///< the calculated item height (from font and menu.itemHeight) 160 unsigned int m_real_item_height; ///< the calculated item height (from font and menu.itemHeight)
164}; 161};
diff --git a/src/Screen.cc b/src/Screen.cc
index e6d10ff..776dd29 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -305,7 +305,6 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
305 unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha", altscrname+".Window.Unfocus.Alpha"), 305 unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha", altscrname+".Window.Unfocus.Alpha"),
306 menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"), 306 menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"),
307 menu_delay(rm, 200, scrname + ".menuDelay", altscrname+".MenuDelay"), 307 menu_delay(rm, 200, scrname + ".menuDelay", altscrname+".MenuDelay"),
308 menu_delay_close(rm, 200, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"),
309 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"), 308 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"),
310 tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"), 309 tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"),
311 allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"), 310 allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"),
@@ -455,13 +454,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
455 if (*resource.menu_delay < 0) 454 if (*resource.menu_delay < 0)
456 *resource.menu_delay = 0; 455 *resource.menu_delay = 0;
457 456
458 if (*resource.menu_delay_close > 5000) 457 m_menutheme->setDelay(*resource.menu_delay);
459 *resource.menu_delay_close = 5000;
460 if (*resource.menu_delay_close < 0)
461 *resource.menu_delay_close = 0;
462
463 m_menutheme->setDelayOpen(*resource.menu_delay);
464 m_menutheme->setDelayClose(*resource.menu_delay_close);
465 458
466 focusedWinFrameTheme()->reconfigSig().attach(this);// for geom window 459 focusedWinFrameTheme()->reconfigSig().attach(this);// for geom window
467 460
@@ -915,13 +908,7 @@ void BScreen::reconfigure() {
915 if (*resource.menu_delay < 0) 908 if (*resource.menu_delay < 0)
916 *resource.menu_delay = 0; 909 *resource.menu_delay = 0;
917 910
918 if (*resource.menu_delay_close > 5000) 911 m_menutheme->setDelay(*resource.menu_delay);
919 *resource.menu_delay_close = 5000;
920 if (*resource.menu_delay_close < 0)
921 *resource.menu_delay_close = 0;
922
923 m_menutheme->setDelayOpen(*resource.menu_delay);
924 m_menutheme->setDelayClose(*resource.menu_delay_close);
925 912
926 // realize the number of workspaces from the init-file 913 // realize the number of workspaces from the init-file
927 const unsigned int nr_ws = *resource.workspaces; 914 const unsigned int nr_ws = *resource.workspaces;
diff --git a/src/Screen.hh b/src/Screen.hh
index 91cf94a..2267d86 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -545,7 +545,7 @@ private:
545 FbTk::Resource<std::string> windowmenufile; 545 FbTk::Resource<std::string> windowmenufile;
546 FbTk::Resource<unsigned int> typing_delay; 546 FbTk::Resource<unsigned int> typing_delay;
547 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, 547 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha,
548 unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, 548 unfocused_alpha, menu_alpha, menu_delay,
549 tab_width, tooltip_delay; 549 tab_width, tooltip_delay;
550 FbTk::Resource<bool> allow_remote_actions; 550 FbTk::Resource<bool> allow_remote_actions;
551 FbTk::Resource<bool> clientmenu_use_pixmap; 551 FbTk::Resource<bool> clientmenu_use_pixmap;