void XWindow::focus() const {
- cout << "Focusing window: 0x" << hex << _window << dec << endl;
// this will cause the window to be uniconified also
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
_window);
}
-void XWindow::resize(unsigned int width, unsigned int height) const {
+void XWindow::resizeRel(int dwidth, int dheight) const {
+ // resize in increments if requested by the window
+ unsigned int width = _rect.width(), height = _rect.height();
+
+ unsigned int wdest = width + (dwidth * _inc_x) / _inc_x * _inc_x + _base_x;
+ unsigned int hdest = height + (dheight * _inc_y) / _inc_y * _inc_y + _base_y;
+
+ XResizeWindow(_epist->getXDisplay(), _window, wdest, hdest);
+}
+
+
+void XWindow::resizeAbs(unsigned int width, unsigned int height) const {
// resize in increments if requested by the window
unsigned int wdest = width / _inc_x * _inc_x + _base_x;