Skip to content
Snippets Groups Projects
Commit 83948b4f authored by slevy's avatar slevy
Browse files

Set subwindow size when detaching.

Properly compute window ypos from X geometry spec.
parent 0e7b564a
No related branches found
No related tags found
No related merge requests found
......@@ -316,10 +316,12 @@ char *parti_detachview( char *how ) {
w = make_view_window();
if(ppui.view && ppui.view->w() * ppui.view->h() > 0) {
ppui.freemain->fullscreen_off(50, 50, ppui.view->w(), ppui.view->h());
w->size( ppui.view->w(), ppui.view->h() );
} else {
ppui.freemain->fullscreen_off(50, 50, 512, 512);
}
ppui.freemain->show();
if(w->window() && w->window()->visible()) w->show();
break;
default:
......@@ -394,7 +396,7 @@ char *parti_winsize( CONST char *newsize ) {
ny = nx * oy / ox;
if(posp && 4 == sscanf(posp, "%1[-+]%d%1[-+]%d", cx, &posx, cy, &posy)) {
if(cx[0] == '-') posx = Fl::w() - nx - posx;
if(cy[0] == '-') posy = Fl::w() - ny - posy;
if(cy[0] == '-') posy = Fl::h() - ny - posy;
has_pos = 1;
}
if(ox < 0) { /* Not yet available -- remember for later */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment