diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/PlatGTK.cxx | 16 | ||||
-rw-r--r-- | gtk/ScintillaGTK.cxx | 3 |
2 files changed, 9 insertions, 10 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index f9ee02bfc..6c0432198 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -105,7 +105,7 @@ static GtkWidget *PWidget(WindowID wid) { return static_cast<GtkWidget *>(wid); } -Font::Font() : fid(0) {} +Font::Font() noexcept : fid(0) {} Font::~Font() {} @@ -961,7 +961,7 @@ void Window::Destroy() { } } -PRectangle Window::GetPosition() { +PRectangle Window::GetPosition() const { // Before any size allocated pretend its 1000 wide so not scrolled PRectangle rc(0, 0, 1000, 1000); if (wid) { @@ -1005,15 +1005,15 @@ GdkRectangle MonitorRectangleForWidget(GtkWidget *wid) { } -void Window::SetPositionRelative(PRectangle rc, Window relativeTo) { +void Window::SetPositionRelative(PRectangle rc, const Window *relativeTo) { int ox = 0; int oy = 0; - GdkWindow *wndRelativeTo = WindowFromWidget(PWidget(relativeTo.wid)); + GdkWindow *wndRelativeTo = WindowFromWidget(PWidget(relativeTo->wid)); gdk_window_get_origin(wndRelativeTo, &ox, &oy); ox += rc.left; oy += rc.top; - GdkRectangle rcMonitor = MonitorRectangleForWidget(PWidget(relativeTo.wid)); + GdkRectangle rcMonitor = MonitorRectangleForWidget(PWidget(relativeTo->wid)); /* do some corrections to fit into screen */ int sizex = rc.right - rc.left; @@ -1032,7 +1032,7 @@ void Window::SetPositionRelative(PRectangle rc, Window relativeTo) { gtk_window_resize(GTK_WINDOW(wid), sizex, sizey); } -PRectangle Window::GetClientPosition() { +PRectangle Window::GetClientPosition() const { // On GTK+, the client position is the window position return GetPosition(); } @@ -1143,7 +1143,7 @@ static void list_image_free(gpointer, gpointer value, gpointer) { g_free(list_image); } -ListBox::ListBox() { +ListBox::ListBox() noexcept { } ListBox::~ListBox() { @@ -1866,7 +1866,7 @@ void ListBoxX::SetList(const char *listText, char separator, char typesep) { } } -Menu::Menu() : mid(0) {} +Menu::Menu() noexcept : mid(0) {} void Menu::CreatePopUp() { Destroy(); diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 704d7163b..6a115994b 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -979,8 +979,7 @@ void ScintillaGTK::FullPaint() { } PRectangle ScintillaGTK::GetClientRectangle() const { - Window win = wMain; - PRectangle rc = win.GetClientPosition(); + PRectangle rc = wMain.GetClientPosition(); if (verticalScrollBarVisible) rc.right -= verticalScrollBarWidth; if (horizontalScrollBarVisible && !Wrapping()) |