mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
app: [Windows] simplify GetWindowRect, delete old workaround
Go issue #34474 was fixed in 1.14 and backported to 1.13. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-4
@@ -190,8 +190,7 @@ func createNativeWindow() (*window, error) {
|
||||
// If anything has changed it emits a ConfigEvent to notify the application.
|
||||
func (w *window) update() {
|
||||
var triggerEvent bool
|
||||
var r windows.Rect
|
||||
windows.GetWindowRect(w.hwnd, &r)
|
||||
r := windows.GetWindowRect(w.hwnd)
|
||||
size := image.Point{
|
||||
X: int(r.Right - r.Left - w.deltas.width),
|
||||
Y: int(r.Bottom - r.Top - w.deltas.height),
|
||||
@@ -607,8 +606,7 @@ func (w *window) Configure(options []Option) {
|
||||
width := int32(w.config.Size.X)
|
||||
height := int32(w.config.Size.Y)
|
||||
// Get the current window size and position.
|
||||
var wr windows.Rect
|
||||
windows.GetWindowRect(w.hwnd, &wr)
|
||||
wr := windows.GetWindowRect(w.hwnd)
|
||||
// Set desired window size.
|
||||
wr.Right = wr.Left + width
|
||||
wr.Bottom = wr.Top + height
|
||||
|
||||
Reference in New Issue
Block a user