1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-04 23:35:58 +01:00

- Fixed the PPosition/PSize code (I hope) --Dan

- removed "Ignore PPosition/PSize hints" user options, and reverted to
  the old "Keep Inside Screen"
This commit is contained in:
dan
1999-09-17 23:52:59 +00:00
parent c917f68883
commit dfe360e5c0
10 changed files with 43 additions and 34 deletions

View File

@@ -304,6 +304,10 @@ makeFilePanel(WMScreen *scrPtr, char *name, char *title)
WMLoadBrowserColumnZero(fPtr->browser);
WMSetWindowInitialPosition(fPtr->win,
(scrPtr->rootView->size.width - WMWidgetWidth(fPtr->win))/2,
(scrPtr->rootView->size.height - WMWidgetHeight(fPtr->win))/2);
fPtr->flags.canChooseFiles = 1;
fPtr->flags.canChooseDirectories = 1;
fPtr->flags.autoCompletion = 1;
@@ -398,9 +402,6 @@ WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
break;
}
WMSetWindowInitialPosition(panel->win,
(scr->rootView->size.width - WMWidgetWidth(panel->win))/2,
(scr->rootView->size.height - WMWidgetHeight(panel->win))/2);
WMSetLabelText(panel->titleLabel, name);
scr->modalView = W_VIEW(panel->win);

View File

@@ -98,6 +98,7 @@ WMCreateAlertPanel(WMScreen *scrPtr, WMWindow *owner,
WMSetWindowInitialPosition(panel->win,
(scrPtr->rootView->size.width - WMWidgetWidth(panel->win))/2,
(scrPtr->rootView->size.height - WMWidgetHeight(panel->win))/2);
WMSetWindowTitle(panel->win, "");
if (scrPtr->applicationIcon) {

View File

@@ -453,7 +453,8 @@ WMSetWindowInitialPosition(WMWindow *win, int x, int y)
win->upos.x = x;
win->upos.y = y;
if (win->view->flags.realized)
setSizeHints(win);
setSizeHints(win);
WMMoveWidget(win, x, y);
}
@@ -464,7 +465,8 @@ WMSetWindowInitialSize(WMWindow *win, unsigned width, unsigned height)
win->usize.width = width;
win->usize.height = height;
if (win->view->flags.realized)
setSizeHints(win);
setSizeHints(win);
WMResizeWidget(win, width, height);
}