Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Main
- Use glfwGetMonitorWorkarea for accurate screen size in GetScreenSize and remove unusable_height estimation hack (PR #7469)
- Upgrade stdgpu third-party library to commit d7c07d0.
- Fix performance for non-contiguous NumPy array conversion in pybind vector converters. This change removes restrictive `py::array::c_style` flags and adds a runtime contiguity check, improving Pandas-to-Open3D conversion speed by up to ~50×. (issue #5250)(PR #7343).
- Corrected documentation for Link Open3D in C++ projects (broken links).
Expand Down
13 changes: 3 additions & 10 deletions cpp/open3d/visualization/gui/GLFWWindowSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,9 @@ Size GLFWWindowSystem::GetScreenSize(OSWindow w) {
monitor = glfwGetPrimaryMonitor();
}
if (monitor) {
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
if (mode) {
screen_width = mode->width;
screen_height = mode->height;
}
// TODO: if we can update GLFW we can replace the above with this
// Also, see below.
// int xpos, ypos;
// glfwGetMonitorWorkarea(monitor, &xpos, &ypos,
// &screen_width, &screen_height);
int xpos, ypos;
glfwGetMonitorWorkarea(monitor, &xpos, &ypos,
&screen_width, &screen_height);
Comment thread
ssheorey marked this conversation as resolved.
}

return Size(screen_width, screen_height);
Expand Down
8 changes: 1 addition & 7 deletions cpp/open3d/visualization/gui/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,13 +991,7 @@ void Window::OnResize() {

w = std::min(screen_size.width,
int(std::round(pref.width / impl_->imgui_.scaling)));
// screen_height is the screen height, not the usable screen height.
// If we cannot call glfwGetMonitorWorkarea(), then we need to guess
// at the size. The window titlebar is about 2 * em, and then there
// is often a global menubar (Linux/GNOME, macOS) or a toolbar
// (Windows). A toolbar is somewhere around 2 - 3 ems.
int unusable_height = 4 * impl_->theme_.font_size;
h = std::min(screen_size.height - unusable_height,
h = std::min(screen_size.height,
int(std::round(pref.height / impl_->imgui_.scaling)));
Comment on lines 992 to 995
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dannyboy0103 please check this.

ws.SetWindowSize(impl_->window_, w, h);
}
Expand Down