diff options
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 | ||