diff options
author | fluxgen <fluxgen> | 2003-04-16 00:38:06 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-16 00:38:06 (GMT) |
commit | 21bc356be2200f07cf5235714493f6dc79583713 (patch) | |
tree | ca93e575726f61fea08959db6bb92562bf5840dc /src | |
parent | 80c38380d1ef1394ab3b19ca51680a28fd27fa3a (diff) | |
download | fluxbox_lack-21bc356be2200f07cf5235714493f6dc79583713.zip fluxbox_lack-21bc356be2200f07cf5235714493f6dc79583713.tar.bz2 |
fixed click raise option, patch from Dale P. Smith
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 29 | ||||
-rw-r--r-- | src/Screen.hh | 5 | ||||
-rw-r--r-- | src/Window.cc | 15 |
3 files changed, 26 insertions, 23 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index bac97e9..7f3efd3 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -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: Screen.cc,v 1.123 2003/04/15 23:09:12 rathnor Exp $ | 25 | // $Id: Screen.cc,v 1.124 2003/04/16 00:37:19 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -386,6 +386,7 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm, | |||
386 | focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"), | 386 | focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"), |
387 | antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), | 387 | antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), |
388 | auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), | 388 | auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), |
389 | click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), | ||
389 | rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), | 390 | rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), |
390 | focus_model(rm, Fluxbox::CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), | 391 | focus_model(rm, Fluxbox::CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), |
391 | workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"), | 392 | workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"), |
@@ -1864,23 +1865,23 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1864 | FbTk::Menu *focus_menu = createMenuFromScreen(*this); | 1865 | FbTk::Menu *focus_menu = createMenuFromScreen(*this); |
1865 | 1866 | ||
1866 | focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( | 1867 | focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( |
1867 | ConfigmenuSet, | 1868 | ConfigmenuSet, |
1868 | ConfigmenuClickToFocus, | 1869 | ConfigmenuClickToFocus, |
1869 | "Click To Focus"), | 1870 | "Click To Focus"), |
1870 | *this, | 1871 | *this, |
1871 | Fluxbox::CLICKTOFOCUS, | 1872 | Fluxbox::CLICKTOFOCUS, |
1872 | save_and_reconfigure)); | 1873 | save_and_reconfigure)); |
1873 | focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( | 1874 | focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( |
1874 | ConfigmenuSet, | 1875 | ConfigmenuSet, |
1875 | ConfigmenuSloppyFocus, | 1876 | ConfigmenuSloppyFocus, |
1876 | "Sloppy Focus"), | 1877 | "Sloppy Focus"), |
1877 | *this, | 1878 | *this, |
1878 | Fluxbox::SLOPPYFOCUS, | 1879 | Fluxbox::SLOPPYFOCUS, |
1879 | save_and_reconfigure)); | 1880 | save_and_reconfigure)); |
1880 | focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( | 1881 | focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( |
1881 | ConfigmenuSet, | 1882 | ConfigmenuSet, |
1882 | ConfigmenuSemiSloppyFocus, | 1883 | ConfigmenuSemiSloppyFocus, |
1883 | "Semi Sloppy Focus"), | 1884 | "Semi Sloppy Focus"), |
1884 | *this, | 1885 | *this, |
1885 | Fluxbox::SEMISLOPPYFOCUS, | 1886 | Fluxbox::SEMISLOPPYFOCUS, |
1886 | save_and_reconfigure)); | 1887 | save_and_reconfigure)); |
@@ -1894,6 +1895,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1894 | focus_menu->update(); | 1895 | focus_menu->update(); |
1895 | rootmenuList.push_back(focus_menu); | 1896 | rootmenuList.push_back(focus_menu); |
1896 | 1897 | ||
1898 | |||
1897 | menu.insert(i18n->getMessage( | 1899 | menu.insert(i18n->getMessage( |
1898 | ConfigmenuSet, ConfigmenuFocusModel, | 1900 | ConfigmenuSet, ConfigmenuFocusModel, |
1899 | "Focus Model"), | 1901 | "Focus Model"), |
@@ -1903,8 +1905,8 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1903 | menu.insert("Slit", &getSlit()->menu()); | 1905 | menu.insert("Slit", &getSlit()->menu()); |
1904 | #endif // SLIT | 1906 | #endif // SLIT |
1905 | menu.insert(i18n->getMessage( | 1907 | menu.insert(i18n->getMessage( |
1906 | ToolbarSet, ToolbarToolbarTitle, | 1908 | ToolbarSet, ToolbarToolbarTitle, |
1907 | "Toolbar"), &m_toolbarhandler->getToolbarMenu()); | 1909 | "Toolbar"), &m_toolbarhandler->getToolbarMenu()); |
1908 | menu.insert(new | 1910 | menu.insert(new |
1909 | BoolMenuItem(i18n->getMessage( | 1911 | BoolMenuItem(i18n->getMessage( |
1910 | ConfigmenuSet, ConfigmenuImageDithering, | 1912 | ConfigmenuSet, ConfigmenuImageDithering, |
@@ -1947,6 +1949,9 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1947 | "Desktop MouseWheel Switching"), | 1949 | "Desktop MouseWheel Switching"), |
1948 | *resource.desktop_wheeling, save_and_reconfigure)); | 1950 | *resource.desktop_wheeling, save_and_reconfigure)); |
1949 | 1951 | ||
1952 | menu.insert(new BoolMenuItem("Click Raises", | ||
1953 | *resource.click_raises, | ||
1954 | save_and_reconfigure)); | ||
1950 | // setup antialias cmd to reload style and save resource on toggle | 1955 | // setup antialias cmd to reload style and save resource on toggle |
1951 | menu.insert(new BoolMenuItem("antialias", *resource.antialias, | 1956 | menu.insert(new BoolMenuItem("antialias", *resource.antialias, |
1952 | save_and_reconfigure)); | 1957 | save_and_reconfigure)); |
diff --git a/src/Screen.hh b/src/Screen.hh index 87a7e90..e0d2398 100644 --- a/src/Screen.hh +++ b/src/Screen.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: Screen.hh,v 1.76 2003/04/15 12:14:13 fluxgen Exp $ | 25 | // $Id: Screen.hh,v 1.77 2003/04/16 00:36:09 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
@@ -89,6 +89,7 @@ public: | |||
89 | inline bool isWorkspaceWarping() const { return *resource.workspace_warping; } | 89 | inline bool isWorkspaceWarping() const { return *resource.workspace_warping; } |
90 | inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; } | 90 | inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; } |
91 | inline bool doAutoRaise() const { return *resource.auto_raise; } | 91 | inline bool doAutoRaise() const { return *resource.auto_raise; } |
92 | inline bool clickRaises() const { return *resource.click_raises; } | ||
92 | inline bool doImageDither() const { return *resource.image_dither; } | 93 | inline bool doImageDither() const { return *resource.image_dither; } |
93 | inline bool doMaxOverSlit() const { return *resource.max_over_slit; } | 94 | inline bool doMaxOverSlit() const { return *resource.max_over_slit; } |
94 | inline bool doOpaqueMove() const { return *resource.opaque_move; } | 95 | inline bool doOpaqueMove() const { return *resource.opaque_move; } |
@@ -397,7 +398,7 @@ private: | |||
397 | sloppy_window_grouping, workspace_warping, | 398 | sloppy_window_grouping, workspace_warping, |
398 | desktop_wheeling, show_window_pos, | 399 | desktop_wheeling, show_window_pos, |
399 | focus_last, focus_new, | 400 | focus_last, focus_new, |
400 | antialias, auto_raise; | 401 | antialias, auto_raise, click_raises; |
401 | Resource<std::string> rootcommand; | 402 | Resource<std::string> rootcommand; |
402 | Resource<Fluxbox::FocusModel> focus_model; | 403 | Resource<Fluxbox::FocusModel> focus_model; |
403 | bool ordered_dither; | 404 | bool ordered_dither; |
diff --git a/src/Window.cc b/src/Window.cc index 35f5be9..5839c52 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -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.cc,v 1.138 2003/04/15 23:09:13 rathnor Exp $ | 25 | // $Id: Window.cc,v 1.139 2003/04/16 00:38:06 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -320,13 +320,9 @@ void FluxboxWindow::init() { | |||
320 | m_frame.reconfigure(); | 320 | m_frame.reconfigure(); |
321 | 321 | ||
322 | // redirect events from frame to us | 322 | // redirect events from frame to us |
323 | #ifdef DEBUG | 323 | |
324 | cerr<<"Setting up catch for events in frame"<<endl; | ||
325 | #endif // DEBUG | ||
326 | m_frame.setEventHandler(*this); | 324 | m_frame.setEventHandler(*this); |
327 | #ifdef DEBUG | 325 | |
328 | cerr<<"setup for catching events....done"<<endl; | ||
329 | #endif // DEBUG | ||
330 | lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0; | 326 | lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0; |
331 | 327 | ||
332 | // display connection | 328 | // display connection |
@@ -2192,8 +2188,9 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { | |||
2192 | setInputFocus(); | 2188 | setInputFocus(); |
2193 | } | 2189 | } |
2194 | 2190 | ||
2195 | if (m_frame.clientArea() == be.window) { | 2191 | if (m_frame.clientArea() == be.window) { |
2196 | raise(); | 2192 | if (getScreen().clickRaises()) |
2193 | raise(); | ||
2197 | XAllowEvents(display, ReplayPointer, be.time); | 2194 | XAllowEvents(display, ReplayPointer, be.time); |
2198 | } else { | 2195 | } else { |
2199 | button_grab_x = be.x_root - m_frame.x() - screen.getBorderWidth(); | 2196 | button_grab_x = be.x_root - m_frame.x() - screen.getBorderWidth(); |