HackedMoveDelta
From Fluxbox-wiki
Update: used to be hacked (with hardcoded movedelta value). Now updated to have config value.
TWM has configuration variable MoveDelta, which when accompanied with f.deltastop in compound
functions can be used to prevent action if cursor is not moved MoveDelta amount of pixels.
This has been very useful in those setups where window is not always automatically raised when click on window does not always raise a window (but only when window is not moved), as usually the mouse moves a tiny bit -- enough to make window move.
I have especially had problems raising when using this feature (in ChangeLog):
*05/09/04:
* Added Feature Request #1084510 (Mathias)
When Mod1 + LeftMouse are clicked on a Window and the mouse is not
moved, the window is raised at LeftMouseRelease
src/Window.cc
$ svn diff --diff-cmd diff -x -ub
Index: src/Screen.cc
===================================================================
--- src/Screen.cc (revision 4328)
+++ src/Screen.cc (working copy)
@@ -257,6 +257,7 @@
auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"),
click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"),
decorate_transient(rm, false, scrname+".decorateTransient", altscrname+".DecorateTransient"),
+ movedelta(rm, 0, scrname+".moveDelta", altscrname+".MoveDelta"),
rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"),
resize_model(rm, BOTTOMRESIZE, scrname+".resizeMode", altscrname+".ResizeMode"),
tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"),
Index: src/Window.cc
===================================================================
--- src/Window.cc (revision 4328)
+++ src/Window.cc (working copy)
@@ -2757,6 +2757,15 @@
!isResizing()) {
if (! isMoving()) {
+ if (screen().moveDelta() > 0) {
+ int d = screen().moveDelta();
+ if ( (((m_last_button_x > me.x_root) ?
+ m_last_button_x - me.x_root: me.x_root - m_last_button_x) <= d)
+ &&
+ (((m_last_button_y > me.y_root) ?
+ m_last_button_y - me.y_root: me.y_root - m_last_button_y) <= d) )
+ return;
+ }
startMoving(me.window);
// save first event point
m_last_resize_x = me.x_root;
Index: src/Screen.hh
===================================================================
--- src/Screen.hh (revision 4328)
+++ src/Screen.hh (working copy)
@@ -121,6 +121,7 @@
bool doShowWindowPos() const { return *resource.show_window_pos; }
bool antialias() const { return *resource.antialias; }
bool decorateTransient() const { return *resource.decorate_transient; }
+ unsigned int moveDelta() const { return *resource.movedelta; }
const std::string &windowMenuFilename() const { return *resource.windowmenufile; }
FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
// menus
@@ -441,6 +442,7 @@
sloppy_window_grouping, workspace_warping,
desktop_wheeling, reverse_wheeling, show_window_pos,
antialias, auto_raise, click_raises, decorate_transient;
+ FbTk::Resource<unsigned int> movedelta;
FbTk::Resource<std::string> rootcommand;
FbTk::Resource<ResizeModel> resize_model;
FbTk::Resource<FbWinFrame::TabPlacement> tab_placement;
(patch -p 0 in checkouted fluxbox "trunk" directory and copy-paste of the above did the work for me (after ctrl-d pressed twice))

