From 57cd3c5c7cdaf99ff27b8a83f20dc8fd556677ab Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 19 May 2002 17:56:55 +0000 Subject: added configurable geometry --- src/Screen.cc | 3 ++- src/Screen.hh | 6 ++++-- src/Window.cc | 21 +++++++++++++-------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index d96029e..50cbd5d 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -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.52 2002/05/17 16:30:24 fluxgen Exp $ +// $Id: Screen.cc,v 1.53 2002/05/19 17:56:55 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -203,6 +203,7 @@ tab_rotate_vertical(rm, true, scrname+".tab.rotatevertical", altscrname+".Tab.Ro sloppy_window_grouping(rm, true, scrname+".sloppywindowgrouping", altscrname+".SloppyWindowGrouping"), workspace_warping(rm, true, scrname+".workspacewarping", altscrname+".WorkspaceWarping"), desktop_wheeling(rm, true, scrname+".desktopwheeling", altscrname+".DesktopWheeling"), +show_window_pos(rm, true, scrname+".showwindowposition", altscrname+".ShowWindowPosition"), focus_last(rm, true, scrname+".focusLastWindow", altscrname+".FocusLastWindow"), focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"), rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), diff --git a/src/Screen.hh b/src/Screen.hh index 8ae34fe..27957ce 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -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.35 2002/05/17 11:55:02 fluxgen Exp $ +// $Id: Screen.hh,v 1.36 2002/05/19 17:56:55 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH @@ -87,6 +87,7 @@ public: inline bool doFullMax(void) { return *resource.full_max; } inline bool doFocusNew(void) { return *resource.focus_new; } inline bool doFocusLast(void) { return *resource.focus_last; } + inline bool doShowWindowPos(void) { return *resource.show_window_pos; } inline const GC &getOpGC() const { return theme->getOpGC(); } @@ -300,7 +301,8 @@ private: image_dither, opaque_move, full_max, max_over_slit, tab_rotate_vertical, sloppy_window_grouping, workspace_warping, - desktop_wheeling, focus_last, focus_new; + desktop_wheeling, show_window_pos, + focus_last, focus_new; Resource rootcommand; bool auto_raise, sloppy_focus, semi_sloppy_focus, ordered_dither; diff --git a/src/Window.cc b/src/Window.cc index 47dc808..2823fdd 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -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.52 2002/05/17 16:35:58 fluxgen Exp $ +// $Id: Window.cc,v 1.53 2002/05/19 17:56:55 fluxgen Exp $ #include "Window.hh" @@ -1805,7 +1805,8 @@ bool FluxboxWindow::setInputFocus(void) { Fluxbox *fluxbox = Fluxbox::instance(); BaseDisplay::GrabGuard gg(*fluxbox); fluxbox->grab(); - if (! validateClient()) return false; + if (! validateClient()) + return false; bool ret = false; @@ -2689,7 +2690,7 @@ void FluxboxWindow::restoreGravity(void) { bool FluxboxWindow::isLowerTab(void) const { Tab* chkTab = (tab ? tab->first() : 0); while (chkTab) { - FluxboxWindow* chkWin = chkTab->getWindow(); + const FluxboxWindow* chkWin = chkTab->getWindow(); if (chkWin && chkWin != this && timercmp(&chkWin->lastFocusTime, &lastFocusTime, >)) return true; @@ -3338,7 +3339,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) { configure(dx, dy, frame.width, frame.height); } - screen->showPosition(dx, dy); + if (screen->doShowWindowPos()) + screen->showPosition(dx, dy); } } else if (functions.resize && (((me->state & Button1Mask) && (me->window == frame.right_grip || @@ -3377,7 +3379,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) { frame.resize_x, frame.resize_y, frame.resize_w, frame.resize_h); - screen->showGeometry(gx, gy); + if (screen->doShowWindowPos()) + screen->showGeometry(gx, gy); } } } @@ -3515,7 +3518,8 @@ void FluxboxWindow::startMoving(Window win) { frame.resize_h = ((shaded) ? frame.title_h : frame.height) + screen->getBorderWidth2x(); - screen->showPosition(frame.x, frame.y); + if (screen->doShowWindowPos()) + screen->showPosition(frame.x, frame.y); XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), frame.move_x, frame.move_y, @@ -3565,8 +3569,9 @@ void FluxboxWindow::startResizing(XMotionEvent *me, bool left) { left_fixsize(&gx, &gy); else right_fixsize(&gx, &gy); - - screen->showGeometry(gx, gy); + + if (screen->doShowWindowPos()) + screen->showGeometry(gx, gy); XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), frame.resize_x, frame.resize_y, -- cgit v0.11.2