aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathias <mathias>2005-04-18 16:05:26 (GMT)
committermathias <mathias>2005-04-18 16:05:26 (GMT)
commite7cf5cbe3cefaf429dd2370d47429c8161858993 (patch)
tree1efb522d1395a633ecc37e9fa44a87fcad27277a
parentebad1ce12f001e6be52825d48d6068af352068a1 (diff)
downloadfluxbox_paul-e7cf5cbe3cefaf429dd2370d47429c8161858993.zip
fluxbox_paul-e7cf5cbe3cefaf429dd2370d47429c8161858993.tar.bz2
fixes a problem with snapping to the slit. slit's borderwith wasnt part of the
strut.
-rw-r--r--src/Slit.cc27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index ea70e6b..9221377 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -359,52 +359,53 @@ void Slit::updateStrut() {
359 return; 359 return;
360 } 360 }
361 361
362 362 unsigned int bw = m_slit_theme->borderWidth();
363 int left = 0, right = 0, top = 0, bottom = 0; 363 int left = 0, right = 0, top = 0, bottom = 0;
364 switch (placement()) { 364 switch (placement()) {
365 case TOPLEFT: 365 case TOPLEFT:
366 if (direction() == HORIZONTAL) 366 if (direction() == HORIZONTAL)
367 top = height(); 367 top = height() + 2 * bw;
368 else 368 else
369 left = width(); 369 left = width() + 2 * bw;
370 break; 370 break;
371 case TOPCENTER: 371 case TOPCENTER:
372 if (direction() == HORIZONTAL) 372 if (direction() == HORIZONTAL)
373 top = height(); 373 top = height() + 2 * bw;
374 break; 374 break;
375 case TOPRIGHT: 375 case TOPRIGHT:
376 if (direction() == HORIZONTAL) 376 if (direction() == HORIZONTAL)
377 top = height(); 377 top = height() + 2 * bw;
378 else 378 else
379 right = width(); 379 right = width() + 2 * bw;
380 break; 380 break;
381 case BOTTOMLEFT: 381 case BOTTOMLEFT:
382 if (direction() == HORIZONTAL) 382 if (direction() == HORIZONTAL)
383 bottom = height(); 383 bottom = height() + 2 * bw;
384 else 384 else
385 left = width(); 385 left = width() + 2 * bw;
386 break; 386 break;
387 case BOTTOMCENTER: 387 case BOTTOMCENTER:
388 // would be strange to have it request size on vertical direction 388 // would be strange to have it request size on vertical direction
389 // each time we add a client 389 // each time we add a client
390 if (direction() == HORIZONTAL) 390 if (direction() == HORIZONTAL)
391 bottom = height(); 391 bottom = height() + 2 * bw;
392 break; 392 break;
393 case BOTTOMRIGHT: 393 case BOTTOMRIGHT:
394 if (direction() == HORIZONTAL) 394 if (direction() == HORIZONTAL)
395 bottom = height(); 395 bottom = height() + 2 * bw;
396 else 396 else
397 right = width(); 397 right = width() + 2 * bw;
398 break; 398 break;
399 case LEFTCENTER: 399 case LEFTCENTER:
400 if (direction() == VERTICAL) 400 if (direction() == VERTICAL)
401 left = width(); 401 left = width() + 2 * bw;
402 break; 402 break;
403 case RIGHTCENTER: 403 case RIGHTCENTER:
404 if (direction() == VERTICAL) 404 if (direction() == VERTICAL)
405 right = width(); 405 right = width() + 2 * bw;
406 break; 406 break;
407 } 407 }
408
408 m_strut = screen().requestStrut(getOnHead(), left, right, top, bottom); 409 m_strut = screen().requestStrut(getOnHead(), left, right, top, bottom);
409 screen().updateAvailableWorkspaceArea(); 410 screen().updateAvailableWorkspaceArea();
410} 411}