Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support screen name in various cases #1341

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

support screen name in various cases #1341

wants to merge 34 commits into from

Conversation

rcoreilly
Copy link
Member

@rcoreilly rcoreilly commented Nov 25, 2024

Add screen name to saved window geometry so it prefers to open there, and add option for screen name in opening new windows, in stage and lower level system api. also system.Window.Position() always returns screen-relative position. all working as expected.

Target bugs: #603 #997 and #1140
Also look at #947 and #509
Picks up from progress in #1339

core/mainstage.go Outdated Show resolved Hide resolved
core/mainstage.go Outdated Show resolved Hide resolved
core/mainstage.go Outdated Show resolved Hide resolved
core/renderwindow.go Outdated Show resolved Hide resolved
core/renderwindow.go Outdated Show resolved Hide resolved
examples/demo/demo.go Outdated Show resolved Hide resolved
system/driver/base/app_multi.go Show resolved Hide resolved
system/driver/desktop/window.go Show resolved Hide resolved
system/driver/desktop/window.go Outdated Show resolved Hide resolved
system/screen.go Outdated
if cpos.Y == -32000 {
cpos.Y = 50
if TheApp.Platform() == Windows {
if csz.Y > (scsz.Y - 20) { // leave room for title
Copy link
Member

Choose a reason for hiding this comment

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

There is a programmatic way to determine this with glfwGetWindowFrameSize.

@@ -39,6 +39,9 @@ type WindowMulti[A system.App, D system.Drawer] struct {
// PixSize is the pixel size of the window in raw display dots
PixSize image.Point `label:"Pixel size"`

// FrameSize of the window frame: Min = left, top; Max = right, bottom.
FrameSize image.Rectangle
Copy link
Member

Choose a reason for hiding this comment

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

Use styles.Sides[int].

kkoreilly and others added 8 commits November 27, 2024 12:02
…nly arg -- used for moves to ensure that only the top titlebar is in range.
…nd wingeom does not save Full or anything for that matter.
…eom; scene context menu has exit from fullscreen option when in fullscreen mode, and UpdateFullscreen uses the saved win geom to restore to original position after fullscreen -- all seems to be working on mac.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants