diff options
author | markt <markt> | 2007-10-22 17:45:39 (GMT) |
---|---|---|
committer | markt <markt> | 2007-10-22 17:45:39 (GMT) |
commit | c6a2605d76927eed881e4ff9df58a9ec600bf4a2 (patch) | |
tree | 468c356ffdad6893d4f4b312f847122b66c997ed /src/CurrentWindowCmd.cc | |
parent | f72633a0e0df146c4860b5b3940e9c3a2f7260b1 (diff) | |
download | fluxbox_pavel-c6a2605d76927eed881e4ff9df58a9ec600bf4a2.zip fluxbox_pavel-c6a2605d76927eed881e4ff9df58a9ec600bf4a2.tar.bz2 |
replaced ModKey with new key commands StartMoving and StartResizing
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r-- | src/CurrentWindowCmd.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 01b8de7..885f4b0 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -115,6 +115,26 @@ void GoToTabCmd::real_execute() { | |||
115 | (*it)->focus(); | 115 | (*it)->focus(); |
116 | } | 116 | } |
117 | 117 | ||
118 | void StartMovingCmd::real_execute() { | ||
119 | const XEvent &last = Fluxbox::instance()->lastEvent(); | ||
120 | if (last.type == ButtonPress) { | ||
121 | const XButtonEvent &be = last.xbutton; | ||
122 | fbwindow().startMoving(be.x_root, be.y_root); | ||
123 | } | ||
124 | } | ||
125 | |||
126 | void StartResizingCmd::real_execute() { | ||
127 | const XEvent &last = Fluxbox::instance()->lastEvent(); | ||
128 | if (last.type == ButtonPress) { | ||
129 | const XButtonEvent &be = last.xbutton; | ||
130 | int x = be.x_root - fbwindow().x() | ||
131 | - fbwindow().frame().window().borderWidth(); | ||
132 | int y = be.y_root - fbwindow().y() | ||
133 | - fbwindow().frame().window().borderWidth(); | ||
134 | fbwindow().startResizing(x, y, fbwindow().getResizeDirection(x, y, m_mode)); | ||
135 | } | ||
136 | } | ||
137 | |||
118 | MoveCmd::MoveCmd(const int step_size_x, const int step_size_y) : | 138 | MoveCmd::MoveCmd(const int step_size_x, const int step_size_y) : |
119 | m_step_size_x(step_size_x), m_step_size_y(step_size_y) { } | 139 | m_step_size_x(step_size_x), m_step_size_y(step_size_y) { } |
120 | 140 | ||