mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
More moving towards using signed types.
I'm still feeling this out, but I am starting to like the general idea.
This commit is contained in:
parent
beda478821
commit
9624b54703
Notes:
sideshowbarker
2024-07-19 15:37:54 +09:00
Author: https://github.com/awesomekling
Commit: 9624b54703
48 changed files with 234 additions and 250 deletions
|
@ -63,7 +63,7 @@ void GWindow::show()
|
|||
request.window.opacity = m_opacity_when_windowless;
|
||||
request.window.size_increment = m_size_increment;
|
||||
request.window.base_size = m_base_size;
|
||||
ASSERT(m_title_when_windowless.length() < sizeof(request.text));
|
||||
ASSERT(m_title_when_windowless.length() < (ssize_t)sizeof(request.text));
|
||||
strcpy(request.text, m_title_when_windowless.characters());
|
||||
request.text_length = m_title_when_windowless.length();
|
||||
auto response = GEventLoop::main().sync_request(request, WSAPI_ServerMessage::Type::DidCreateWindow);
|
||||
|
@ -81,9 +81,6 @@ void GWindow::hide()
|
|||
WSAPI_ClientMessage request;
|
||||
request.type = WSAPI_ClientMessage::Type::DestroyWindow;
|
||||
request.window_id = m_window_id;
|
||||
ASSERT(m_title_when_windowless.length() < sizeof(request.text));
|
||||
strcpy(request.text, m_title_when_windowless.characters());
|
||||
request.text_length = m_title_when_windowless.length();
|
||||
GEventLoop::main().post_message_to_server(request);
|
||||
}
|
||||
|
||||
|
@ -96,7 +93,7 @@ void GWindow::set_title(String&& title)
|
|||
WSAPI_ClientMessage request;
|
||||
request.type = WSAPI_ClientMessage::Type::SetWindowTitle;
|
||||
request.window_id = m_window_id;
|
||||
ASSERT(m_title_when_windowless.length() < sizeof(request.text));
|
||||
ASSERT(m_title_when_windowless.length() < (ssize_t)sizeof(request.text));
|
||||
strcpy(request.text, m_title_when_windowless.characters());
|
||||
request.text_length = m_title_when_windowless.length();
|
||||
GEventLoop::main().post_message_to_server(request);
|
||||
|
@ -110,9 +107,6 @@ String GWindow::title() const
|
|||
WSAPI_ClientMessage request;
|
||||
request.type = WSAPI_ClientMessage::Type::GetWindowTitle;
|
||||
request.window_id = m_window_id;
|
||||
ASSERT(m_title_when_windowless.length() < sizeof(request.text));
|
||||
strcpy(request.text, m_title_when_windowless.characters());
|
||||
request.text_length = m_title_when_windowless.length();
|
||||
auto response = GEventLoop::main().sync_request(request, WSAPI_ServerMessage::Type::DidGetWindowTitle);
|
||||
return String(response.text, response.text_length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue