]> Dogcows Code - chaz/openbox/commitdiff
set the gravity to center the dialog.
authorDana Jansens <danakj@orodu.net>
Sun, 16 Feb 2003 16:24:01 +0000 (16:24 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Feb 2003 16:24:01 +0000 (16:24 +0000)
size it off the minSize which is already calculated, not off the size() with is nto

otk/messagedialog.cc

index b1f6c61af7abf580f11ee338b0efeb2c63ca46c5..2c06e63ae020422e286c0c318bdc7a36aeae6d7e 100644 (file)
@@ -133,11 +133,12 @@ void MessageDialog::show()
     r = Rect(Point(0, 0), display->screenInfo(screen())->size());
   
   XSizeHints size;
-  size.flags = PMinSize | PPosition;
+  size.flags = PMinSize | PPosition | PWinGravity;
   size.min_width = minSize().width();
   size.min_height = minSize().height();
+  size.win_gravity = CenterGravity;
 
-  Size dest = area().size();
+  Size dest = minSize();
   if (dest.width() < 200 || dest.height() < 100) {
     if (dest.width() < 200 && dest.height() < 100) dest = Size(200, 100);
     else if (dest.width() < 200) dest = Size(200, dest.height());
This page took 0.027228 seconds and 4 git commands to generate.