Make 'gb.gtk' compile again.
[GB.GTK] * BUG: Make 'gb.gtk' compile again.
This commit is contained in:
parent
8d652ed193
commit
cf8abc4639
1 changed files with 13 additions and 1 deletions
|
@ -958,7 +958,19 @@ void gMainWindow::center()
|
|||
{
|
||||
if (!isTopLevel()) return;
|
||||
|
||||
#ifdef GTK3
|
||||
PLATFORM.Window.Center(GTK_WINDOW(border));
|
||||
#else
|
||||
GdkRectangle rect;
|
||||
int x, y;
|
||||
|
||||
gDesktop::availableGeometry(screen(), &rect);
|
||||
|
||||
x = rect.x + (rect.width - width()) / 2;
|
||||
y = rect.y + (rect.height - height()) / 2;
|
||||
|
||||
move(x, y);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool gMainWindow::isModal() const
|
||||
|
|
Loading…
Reference in a new issue