]> Dogcows Code - chaz/openbox/blobdiff - src/Window.cc
use the raw screen size not the strut adjusted size to determine max_height and width...
[chaz/openbox] / src / Window.cc
index 2bc7265d5fe93a52575c79c280e99b3259ef2503..0a8452791f9922ba28fc59b63ddb7131b5efe062 100644 (file)
@@ -906,12 +906,18 @@ void BlackboxWindow::getWMNormalHints(void) {
   long icccm_mask;
   XSizeHints sizehint;
 
-  const Rect& screen_area = screen->availableArea();
-
   client.min_width = client.min_height =
     client.width_inc = client.height_inc = 1;
   client.base_width = client.base_height = 0;
+
+  /*
+    use the full screen, not the strut modified size. otherwise when the
+    availableArea changes max_width/height will be incorrect and lead to odd
+    rendering bugs.
+  */
+  const Rect& screen_area = screen->getRect();
   client.max_width = screen_area.width();
+
   client.max_height = screen_area.height();
   client.min_aspect_x = client.min_aspect_y =
     client.max_aspect_x = client.max_aspect_y = 1;
@@ -1119,8 +1125,8 @@ void BlackboxWindow::getTransientInfo(void) {
   client.transient_for = 0;
 
   Window trans_for;
-  if (!XGetTransientForHint(blackbox->getXDisplay(), client.window,
-                            &trans_for)) {
+  if (! XGetTransientForHint(blackbox->getXDisplay(), client.window,
+                             &trans_for)) {
     // transient_for hint not set
     return;
   }
@@ -1447,7 +1453,7 @@ void BlackboxWindow::maximize(unsigned int button) {
       flags currently set.  Otherwise it still thinks it is maximized.
       so we do not need to call configure() because resizing will handle it
     */
-    if (!flags.resizing)
+    if (! flags.resizing)
       configure(blackbox_attrib.premax_x, blackbox_attrib.premax_y,
                 blackbox_attrib.premax_w, blackbox_attrib.premax_h);
 
@@ -1770,7 +1776,7 @@ void BlackboxWindow::restoreAttributes(void) {
                                blackbox->getBlackboxAttributesAtom(),
                                &atom_return, &foo, &nitems, &ulfoo,
                                (unsigned char **) &net);
-  if (ret != Success || !net || nitems != PropBlackboxAttributesElements)
+  if (ret != Success || ! net || nitems != PropBlackboxAttributesElements)
     return;
 
   if (net->flags & AttribShaded &&
@@ -2435,7 +2441,7 @@ void BlackboxWindow::buttonReleaseEvent(XButtonEvent *re) {
 
 
 void BlackboxWindow::motionNotifyEvent(XMotionEvent *me) {
-  if (!flags.resizing && (me->state & Button1Mask) &&
+  if (! flags.resizing && (me->state & Button1Mask) &&
       (functions & Func_Move) &&
       (frame.title == me->window || frame.label == me->window ||
        frame.handle == me->window || frame.window == me->window)) {
@@ -2757,7 +2763,7 @@ void BlackboxWindow::upsize(void) {
 
   if (decorations & Decor_Border) {
     frame.border_w = screen->getBorderWidth();
-    if (!isTransient())
+    if (! isTransient())
       frame.mwm_border_w = screen->getFrameWidth();
     else
       frame.mwm_border_w = 0;
This page took 0.022613 seconds and 4 git commands to generate.