mirror of
https://github.com/RGBCube/serenity
synced 2025-10-17 19:22:24 +00:00
Make the widgets code build on macOS.
Funny, I haven't looked at this code in a few weeks and there's so much to change!
This commit is contained in:
parent
85b886c2e0
commit
dd502bb54e
3 changed files with 19 additions and 13 deletions
|
@ -14,7 +14,7 @@ TerminalWidget::TerminalWidget(Widget* parent)
|
|||
{
|
||||
g_tw = this;
|
||||
|
||||
setWindowRelativeRect({ 0, 0, (columns() * font().glyphWidth()) + 4, (rows() * font().glyphHeight()) + 4 });
|
||||
setWindowRelativeRect({ 0, 0, int(columns() * font().glyphWidth()) + 4, int(rows() * font().glyphHeight()) + 4 });
|
||||
|
||||
printf("rekt: %d x %d\n", width(), height());
|
||||
m_screen = new CharacterWithAttributes[rows() * columns()];
|
||||
|
@ -24,7 +24,13 @@ TerminalWidget::TerminalWidget(Widget* parent)
|
|||
at(row, column).attribute = 0x07;
|
||||
}
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
g_fd = posix_openpt(O_RDWR);
|
||||
#else
|
||||
g_fd = getpt();
|
||||
#endif
|
||||
|
||||
grantpt(g_fd);
|
||||
unlockpt(g_fd);
|
||||
char buf[1024];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue