fixed click raise option, patch from Dale P. Smith

This commit is contained in:
fluxgen 2003-04-16 00:38:06 +00:00
parent 80c38380d1
commit 21bc356be2
3 changed files with 26 additions and 23 deletions

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.cc,v 1.123 2003/04/15 23:09:12 rathnor Exp $
// $Id: Screen.cc,v 1.124 2003/04/16 00:37:19 fluxgen Exp $
#include "Screen.hh"
@ -386,6 +386,7 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm,
focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"),
antialias(rm, false, scrname+".antialias", altscrname+".Antialias"),
auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"),
click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"),
rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"),
focus_model(rm, Fluxbox::CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"),
workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"),
@ -1894,6 +1895,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
focus_menu->update();
rootmenuList.push_back(focus_menu);
menu.insert(i18n->getMessage(
ConfigmenuSet, ConfigmenuFocusModel,
"Focus Model"),
@ -1947,6 +1949,9 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
"Desktop MouseWheel Switching"),
*resource.desktop_wheeling, save_and_reconfigure));
menu.insert(new BoolMenuItem("Click Raises",
*resource.click_raises,
save_and_reconfigure));
// setup antialias cmd to reload style and save resource on toggle
menu.insert(new BoolMenuItem("antialias", *resource.antialias,
save_and_reconfigure));

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.hh,v 1.76 2003/04/15 12:14:13 fluxgen Exp $
// $Id: Screen.hh,v 1.77 2003/04/16 00:36:09 fluxgen Exp $
#ifndef SCREEN_HH
#define SCREEN_HH
@ -89,6 +89,7 @@ public:
inline bool isWorkspaceWarping() const { return *resource.workspace_warping; }
inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; }
inline bool doAutoRaise() const { return *resource.auto_raise; }
inline bool clickRaises() const { return *resource.click_raises; }
inline bool doImageDither() const { return *resource.image_dither; }
inline bool doMaxOverSlit() const { return *resource.max_over_slit; }
inline bool doOpaqueMove() const { return *resource.opaque_move; }
@ -397,7 +398,7 @@ private:
sloppy_window_grouping, workspace_warping,
desktop_wheeling, show_window_pos,
focus_last, focus_new,
antialias, auto_raise;
antialias, auto_raise, click_raises;
Resource<std::string> rootcommand;
Resource<Fluxbox::FocusModel> focus_model;
bool ordered_dither;

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Window.cc,v 1.138 2003/04/15 23:09:13 rathnor Exp $
// $Id: Window.cc,v 1.139 2003/04/16 00:38:06 fluxgen Exp $
#include "Window.hh"
@ -320,13 +320,9 @@ void FluxboxWindow::init() {
m_frame.reconfigure();
// redirect events from frame to us
#ifdef DEBUG
cerr<<"Setting up catch for events in frame"<<endl;
#endif // DEBUG
m_frame.setEventHandler(*this);
#ifdef DEBUG
cerr<<"setup for catching events....done"<<endl;
#endif // DEBUG
lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0;
// display connection
@ -2193,6 +2189,7 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
}
if (m_frame.clientArea() == be.window) {
if (getScreen().clickRaises())
raise();
XAllowEvents(display, ReplayPointer, be.time);
} else {