mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e47316332 | |||
| 55ae5c5b84 |
@@ -266,6 +266,7 @@ const (
|
||||
WM_MOUSEWHEEL = 0x020A
|
||||
WM_MOUSEHWHEEL = 0x020E
|
||||
WM_NCACTIVATE = 0x0086
|
||||
WM_NCLBUTTONDBLCLK = 0x00A3
|
||||
WM_NCHITTEST = 0x0084
|
||||
WM_NCCALCSIZE = 0x0083
|
||||
WM_PAINT = 0x000F
|
||||
|
||||
+8
-6
@@ -1633,6 +1633,14 @@ func (w *window) flushScroll() {
|
||||
if total == (f32.Point{}) {
|
||||
return
|
||||
}
|
||||
if w.scroll.steps == (image.Point{}) {
|
||||
w.fling.xExtrapolation.SampleDelta(w.scroll.time, -w.scroll.dist.X)
|
||||
w.fling.yExtrapolation.SampleDelta(w.scroll.time, -w.scroll.dist.Y)
|
||||
}
|
||||
// Zero scroll distance prior to calling ProcessEvent, otherwise we may recursively
|
||||
// re-process the scroll distance.
|
||||
w.scroll.dist = f32.Point{}
|
||||
w.scroll.steps = image.Point{}
|
||||
w.ProcessEvent(pointer.Event{
|
||||
Kind: pointer.Scroll,
|
||||
Source: pointer.Mouse,
|
||||
@@ -1642,12 +1650,6 @@ func (w *window) flushScroll() {
|
||||
Time: w.scroll.time,
|
||||
Modifiers: w.disp.xkb.Modifiers(),
|
||||
})
|
||||
if w.scroll.steps == (image.Point{}) {
|
||||
w.fling.xExtrapolation.SampleDelta(w.scroll.time, -w.scroll.dist.X)
|
||||
w.fling.yExtrapolation.SampleDelta(w.scroll.time, -w.scroll.dist.Y)
|
||||
}
|
||||
w.scroll.dist = f32.Point{}
|
||||
w.scroll.steps = image.Point{}
|
||||
}
|
||||
|
||||
func (w *window) onPointerMotion(x, y C.wl_fixed_t, t C.uint32_t) {
|
||||
|
||||
@@ -326,6 +326,12 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr
|
||||
mi := windows.GetMonitorInfo(w.hwnd)
|
||||
szp.Rgrc[0] = mi.WorkArea
|
||||
return 0
|
||||
case windows.WM_NCLBUTTONDBLCLK:
|
||||
if !w.config.Decorated {
|
||||
// Override Windows behaviour when we
|
||||
// draw decorations.
|
||||
return 0
|
||||
}
|
||||
case windows.WM_PAINT:
|
||||
w.draw(true)
|
||||
case windows.WM_SIZE:
|
||||
|
||||
Reference in New Issue
Block a user