aboutsummaryrefslogtreecommitdiff
path: root/src/Window.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-20 08:12:36 (GMT)
committerrathnor <rathnor>2003-07-20 08:12:36 (GMT)
commit1741ac072dd6516b4dcfdf6dbe9099a335c7bc7d (patch)
tree8dd1331222e35070a16aaae5d4bd059296dd341c /src/Window.hh
parentace3e2e6293fa0ae5a2b9d971f24fa45b317ba2e (diff)
downloadfluxbox_pavel-1741ac072dd6516b4dcfdf6dbe9099a335c7bc7d.zip
fluxbox_pavel-1741ac072dd6516b4dcfdf6dbe9099a335c7bc7d.tar.bz2
fix menus for "extra" things, like remember, so that they will be
added back if the menu is rebuilt.
Diffstat (limited to 'src/Window.hh')
-rw-r--r--src/Window.hh20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/Window.hh b/src/Window.hh
index 5a68a54..4042be9 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.hh,v 1.84 2003/07/17 17:56:28 rathnor Exp $ 25// $Id: Window.hh,v 1.85 2003/07/20 08:12:36 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -198,6 +198,8 @@ public:
198 void moveToLayer(int layernum); 198 void moveToLayer(int layernum);
199 199
200 void reconfigure(); 200 void reconfigure();
201 void setupWindow();
202
201 void installColormap(bool); 203 void installColormap(bool);
202 void restore(WinClient *client, bool remap); 204 void restore(WinClient *client, bool remap);
203 void restore(bool remap); 205 void restore(bool remap);
@@ -288,8 +290,17 @@ public:
288 FbTk::Menu &menu() { return m_windowmenu; } 290 FbTk::Menu &menu() { return m_windowmenu; }
289 const FbTk::Menu &menu() const { return m_windowmenu; } 291 const FbTk::Menu &menu() const { return m_windowmenu; }
290 292
291 FbTk::Menu &layermenu() { return *m_layermenu.get(); } 293 // this should perhaps be a refcount??
292 const FbTk::Menu &layermenu() const { return *m_layermenu.get(); } 294 typedef std::list<std::pair<const char *, FbTk::Menu *> > ExtraMenus;
295
296 // for extras to add menus.
297 // These menus will be marked internal,
298 // and deleted when the window dies (as opposed to Screen
299 void addExtraMenu(const char *label, FbTk::Menu *menu);
300 void removeExtraMenu(FbTk::Menu *menu);
301
302 ExtraMenus &extraMenus() { return m_extramenus; }
303 const ExtraMenus &extraMenus() const { return m_extramenus; }
293 304
294 const FbTk::FbWindow &parent() const { return m_parent; } 305 const FbTk::FbWindow &parent() const { return m_parent; }
295 FbTk::FbWindow &parent() { return m_parent; } 306 FbTk::FbWindow &parent() { return m_parent; }
@@ -403,10 +414,8 @@ private:
403 Display *display; /// display connection 414 Display *display; /// display connection
404 BlackboxAttributes m_blackbox_attrib; 415 BlackboxAttributes m_blackbox_attrib;
405 416
406 std::auto_ptr<FbTk::Menu> m_layermenu;
407 FbTk::Menu m_windowmenu; 417 FbTk::Menu m_windowmenu;
408 418
409
410 timeval m_last_focus_time; 419 timeval m_last_focus_time;
411 420
412 int m_button_grab_x, m_button_grab_y; // handles last button press event for move 421 int m_button_grab_x, m_button_grab_y; // handles last button press event for move
@@ -451,6 +460,7 @@ private:
451 460
452 FbTk::FbWindow &m_parent; ///< window on which we draw move/resize rectangle (the "root window") 461 FbTk::FbWindow &m_parent; ///< window on which we draw move/resize rectangle (the "root window")
453 462
463 ExtraMenus m_extramenus;
454}; 464};
455 465
456 466