aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-07-02 03:02:19 (GMT)
committermarkt <markt>2007-07-02 03:02:19 (GMT)
commit4e5e7668504ee511b0a422df08f2338f3f68e0fe (patch)
treec9fd3b695cd9bb8f509ef79e7582b2ba8effb104
parenta2aca6a343af4f5263c31069c984dfdd1ee6a0fa (diff)
downloadfluxbox-4e5e7668504ee511b0a422df08f2338f3f68e0fe.zip
fluxbox-4e5e7668504ee511b0a422df08f2338f3f68e0fe.tar.bz2
fix DOS when toolbar.button.borderWidth is large and toolbar.bevelWidth > 0
move transparency menu up with the other submenus
-rw-r--r--src/Screen.cc47
-rw-r--r--src/Toolbar.cc3
2 files changed, 27 insertions, 23 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index b0dc62f..293247b 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1885,29 +1885,6 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1885 1885
1886 menu.insert(tabmenu_label, tab_menu); 1886 menu.insert(tabmenu_label, tab_menu);
1887 1887
1888 Configmenus::iterator it = m_configmenu_list.begin();
1889 Configmenus::iterator it_end = m_configmenu_list.end();
1890 for (; it != it_end; ++it)
1891 menu.insert(it->first, it->second);
1892
1893 _BOOLITEM(menu, Configmenu, ImageDithering,
1894 "Image Dithering", "Image Dithering",
1895 *resource.image_dither, save_and_reconfigure);
1896 _BOOLITEM(menu, Configmenu, OpaqueMove,
1897 "Opaque Window Moving",
1898 "Window Moving with whole window visible (as opposed to outline moving)",
1899 *resource.opaque_move, saverc_cmd);
1900 _BOOLITEM(menu, Configmenu, WorkspaceWarping,
1901 "Workspace Warping",
1902 "Workspace Warping - dragging windows to the edge and onto the next workspace",
1903 *resource.workspace_warping, saverc_cmd);
1904 _BOOLITEM(menu, Configmenu, DecorateTransient,
1905 "Decorate Transient Windows", "Decorate Transient Windows",
1906 *resource.decorate_transient, saverc_cmd);
1907 _BOOLITEM(menu, Configmenu, ClickRaises,
1908 "Click Raises", "Click Raises",
1909 *resource.click_raises, saverc_cmd);
1910
1911#ifdef HAVE_XRENDER 1888#ifdef HAVE_XRENDER
1912 if (FbTk::Transparent::haveRender() || 1889 if (FbTk::Transparent::haveRender() ||
1913 FbTk::Transparent::haveComposite()) { 1890 FbTk::Transparent::haveComposite()) {
@@ -1958,6 +1935,30 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1958 menu.insert(alphamenu_label, alpha_menu); 1935 menu.insert(alphamenu_label, alpha_menu);
1959 } 1936 }
1960#endif // HAVE_XRENDER 1937#endif // HAVE_XRENDER
1938
1939 Configmenus::iterator it = m_configmenu_list.begin();
1940 Configmenus::iterator it_end = m_configmenu_list.end();
1941 for (; it != it_end; ++it)
1942 menu.insert(it->first, it->second);
1943
1944 _BOOLITEM(menu, Configmenu, ImageDithering,
1945 "Image Dithering", "Image Dithering",
1946 *resource.image_dither, save_and_reconfigure);
1947 _BOOLITEM(menu, Configmenu, OpaqueMove,
1948 "Opaque Window Moving",
1949 "Window Moving with whole window visible (as opposed to outline moving)",
1950 *resource.opaque_move, saverc_cmd);
1951 _BOOLITEM(menu, Configmenu, WorkspaceWarping,
1952 "Workspace Warping",
1953 "Workspace Warping - dragging windows to the edge and onto the next workspace",
1954 *resource.workspace_warping, saverc_cmd);
1955 _BOOLITEM(menu, Configmenu, DecorateTransient,
1956 "Decorate Transient Windows", "Decorate Transient Windows",
1957 *resource.decorate_transient, saverc_cmd);
1958 _BOOLITEM(menu, Configmenu, ClickRaises,
1959 "Click Raises", "Click Raises",
1960 *resource.click_raises, saverc_cmd);
1961
1961#undef _BOOLITEM 1962#undef _BOOLITEM
1962 1963
1963 // finaly update menu 1964 // finaly update menu
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index a1906c0..4a174bd 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -1034,6 +1034,7 @@ void Toolbar::rearrangeItems() {
1034 (*item_it)->hide(); 1034 (*item_it)->hide();
1035 // make sure it still gets told the toolbar height 1035 // make sure it still gets told the toolbar height
1036 tmpw = 1; tmph = height - 2*(bevel_width+borderW); 1036 tmpw = 1; tmph = height - 2*(bevel_width+borderW);
1037 if (tmph >= (1<<30)) tmph = 1;
1037 FbTk::translateSize(orient, tmpw, tmph); 1038 FbTk::translateSize(orient, tmpw, tmph);
1038 (*item_it)->resize(tmpw, tmph); // width of 0 changes to 1 anyway 1039 (*item_it)->resize(tmpw, tmph); // width of 0 changes to 1 anyway
1039 continue; 1040 continue;
@@ -1070,6 +1071,8 @@ void Toolbar::rearrangeItems() {
1070 tmpw = itemw; 1071 tmpw = itemw;
1071 tmph = height - size_offset; 1072 tmph = height - size_offset;
1072 } 1073 }
1074 if (tmpw >= (1<<30)) tmpw = 1;
1075 if (tmph >= (1<<30)) tmph = 1;
1073 next_x += tmpw + bevel_width; 1076 next_x += tmpw + bevel_width;
1074 if (bevel_width != 0) 1077 if (bevel_width != 0)
1075 next_x += 2*borderW; 1078 next_x += 2*borderW;