aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-02-25 10:55:06 (GMT)
committerPaul Tagliamonte <paultag@ubuntu.com>2011-11-28 19:19:13 (GMT)
commit1583beb95327e2f04fe293ce598f2714db66861b (patch)
tree32958e422a35f75ef2ae963a8c6d4de87039f671 /src/Screen.cc
parent2223c879bf41d2b4f40fa43db478ba1bce8523de (diff)
downloadfluxbox_paul-1583beb95327e2f04fe293ce598f2714db66861b.zip
fluxbox_paul-1583beb95327e2f04fe293ce598f2714db66861b.tar.bz2
first draft of the 'SingleTrigger' feature for menussingle-shot
using the type-a-head feature of the fluxbox-menu creates a number of matches (if there are any). with enabled 'SingleTrigger' the user triggers that match instantly without any further ado. a menu inherits the 'SingleTrigger' setting of its parent. new resources for .fluxbox/init: menu.window.singleTrigger: true|false menu.root.singleTrigger: true|false menu.workspace.singleTrigger: true|false
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 86799da..a35a7eb 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -276,22 +276,30 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
276 auto_raise(rm, true, scrname+".autoRaise", altscrname+".AutoRaise"), 276 auto_raise(rm, true, scrname+".autoRaise", altscrname+".AutoRaise"),
277 click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), 277 click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"),
278 default_deco(rm, "NORMAL", scrname+".defaultDeco", altscrname+".DefaultDeco"), 278 default_deco(rm, "NORMAL", scrname+".defaultDeco", altscrname+".DefaultDeco"),
279 tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"),
280 windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu", altscrname+".WindowMenu"),
281 typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay", altscrname+".NoFocusWhileTypingDelay"), 279 typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay", altscrname+".NoFocusWhileTypingDelay"),
282 workspaces(rm, 4, scrname+".workspaces", altscrname+".Workspaces"), 280 workspaces(rm, 4, scrname+".workspaces", altscrname+".Workspaces"),
283 edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"), 281 edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"),
284 focused_alpha(rm, 255, scrname+".window.focus.alpha", altscrname+".Window.Focus.Alpha"), 282 focused_alpha(rm, 255, scrname+".window.focus.alpha", altscrname+".Window.Focus.Alpha"),
285 unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha", altscrname+".Window.Unfocus.Alpha"), 283 unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha", altscrname+".Window.Unfocus.Alpha"),
284
285 tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"),
286
286 menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"), 287 menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"),
287 menu_delay(rm, 200, scrname + ".menuDelay", altscrname+".MenuDelay"), 288 menu_delay(rm, 200, scrname + ".menuDelay", altscrname+".MenuDelay"),
288 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"),
289 tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"),
290 allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"),
291 clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap", altscrname+".ClientMenu.UsePixmap"), 289 clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap", altscrname+".ClientMenu.UsePixmap"),
290 windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu", altscrname+".WindowMenu"),
291 windowmenu_singletrigger(rm, false, scrname+".menu.window.singleTrigger", altscrname+".Menu.Window.SingleTrigger"),
292 rootmenu_singletrigger(rm, false, scrname+".menu.root.singleTrigger", altscrname+".Menu.Root.SingleTrigger"),
293 workspacemenu_singletrigger(rm, false, scrname+".menu.workspace.singleTrigger", altscrname+".Menu.Workspace.SingleTrigger"),
294
295 tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"),
296 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"),
292 tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap", altscrname+".Tabs.UsePixmap"), 297 tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap", altscrname+".Tabs.UsePixmap"),
293 max_over_tabs(rm, false, scrname+".tabs.maxOver", altscrname+".Tabs.MaxOver"), 298 max_over_tabs(rm, false, scrname+".tabs.maxOver", altscrname+".Tabs.MaxOver"),
294 default_internal_tabs(rm, true /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") { 299 default_internal_tabs(rm, true /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar"),
300
301 allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions")
302{
295 303
296 304
297} 305}
@@ -335,8 +343,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
335 // TODO fluxgen: check if this is the right place (it was not -lis) 343 // TODO fluxgen: check if this is the right place (it was not -lis)
336 // 344 //
337 // Create the first one, initXinerama will expand this if needed. 345 // Create the first one, initXinerama will expand this if needed.
338 m_head_areas.resize(1); 346 m_head_areas.push_back(new HeadArea());
339 m_head_areas[0] = new HeadArea();
340 347
341 initXinerama(); 348 initXinerama();
342 349
@@ -1413,8 +1420,11 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
1413 1420
1414void BScreen::initMenus() { 1421void BScreen::initMenus() {
1415 m_workspacemenu.reset(MenuCreator::createMenuType("workspacemenu", screenNumber())); 1422 m_workspacemenu.reset(MenuCreator::createMenuType("workspacemenu", screenNumber()));
1423 m_workspacemenu->setSingleTrigger(*resource.workspacemenu_singletrigger);
1416 m_rootmenu->reloadHelper()->setMainFile(Fluxbox::instance()->getMenuFilename()); 1424 m_rootmenu->reloadHelper()->setMainFile(Fluxbox::instance()->getMenuFilename());
1425 m_rootmenu->setSingleTrigger(*resource.rootmenu_singletrigger);
1417 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename()); 1426 m_windowmenu->reloadHelper()->setMainFile(windowMenuFilename());
1427 m_windowmenu->setSingleTrigger(*resource.windowmenu_singletrigger);
1418} 1428}
1419 1429
1420 1430