forge
Explore
Log in

Don't you dare go Hollow

6a9ed5bc7c7afc53ae50773b49e73e7ffa6855d5Patrick GaskinParent: dd75865
- ext-foreign-toplevel-list
- input event time
- misc bugfixes and refactors
Cargo.lockmodified+312 -41
@@ -66,7 +66,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
6666 checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
6767 dependencies = [
6868 "cfg-if",
69- "getrandom 0.3.4",
7069 "once_cell",
7170 "version_check",
7271 "zerocopy",
@@ -872,6 +871,17 @@ dependencies = [
872871 "objc2",
873872 ]
874873
874+[[package]]
875+name = "displaydoc"
876+version = "0.2.7"
877+source = "registry+https://github.com/rust-lang/crates.io-index"
878+checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
879+dependencies = [
880+ "proc-macro2",
881+ "quote",
882+ "syn 3.0.3",
883+]
884+
875885 [[package]]
876886 name = "dlib"
877887 version = "0.5.3"
@@ -1067,6 +1077,15 @@ version = "0.2.0"
10671077 source = "registry+https://github.com/rust-lang/crates.io-index"
10681078 checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
10691079
1080+[[package]]
1081+name = "form_urlencoded"
1082+version = "1.2.2"
1083+source = "registry+https://github.com/rust-lang/crates.io-index"
1084+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
1085+dependencies = [
1086+ "percent-encoding",
1087+]
1088+
10701089 [[package]]
10711090 name = "futures-channel"
10721091 version = "0.3.33"
@@ -1587,6 +1606,109 @@ version = "0.4.3"
15871606 source = "registry+https://github.com/rust-lang/crates.io-index"
15881607 checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
15891608
1609+[[package]]
1610+name = "icu_collections"
1611+version = "2.2.0"
1612+source = "registry+https://github.com/rust-lang/crates.io-index"
1613+checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"
1614+dependencies = [
1615+ "displaydoc",
1616+ "potential_utf",
1617+ "utf8_iter",
1618+ "yoke",
1619+ "zerofrom",
1620+ "zerovec",
1621+]
1622+
1623+[[package]]
1624+name = "icu_locale_core"
1625+version = "2.2.0"
1626+source = "registry+https://github.com/rust-lang/crates.io-index"
1627+checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"
1628+dependencies = [
1629+ "displaydoc",
1630+ "litemap",
1631+ "tinystr",
1632+ "writeable",
1633+ "zerovec",
1634+]
1635+
1636+[[package]]
1637+name = "icu_normalizer"
1638+version = "2.2.0"
1639+source = "registry+https://github.com/rust-lang/crates.io-index"
1640+checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"
1641+dependencies = [
1642+ "icu_collections",
1643+ "icu_normalizer_data",
1644+ "icu_properties",
1645+ "icu_provider",
1646+ "smallvec",
1647+ "zerovec",
1648+]
1649+
1650+[[package]]
1651+name = "icu_normalizer_data"
1652+version = "2.2.0"
1653+source = "registry+https://github.com/rust-lang/crates.io-index"
1654+checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"
1655+
1656+[[package]]
1657+name = "icu_properties"
1658+version = "2.2.0"
1659+source = "registry+https://github.com/rust-lang/crates.io-index"
1660+checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"
1661+dependencies = [
1662+ "icu_collections",
1663+ "icu_locale_core",
1664+ "icu_properties_data",
1665+ "icu_provider",
1666+ "zerotrie",
1667+ "zerovec",
1668+]
1669+
1670+[[package]]
1671+name = "icu_properties_data"
1672+version = "2.2.0"
1673+source = "registry+https://github.com/rust-lang/crates.io-index"
1674+checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"
1675+
1676+[[package]]
1677+name = "icu_provider"
1678+version = "2.2.0"
1679+source = "registry+https://github.com/rust-lang/crates.io-index"
1680+checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"
1681+dependencies = [
1682+ "displaydoc",
1683+ "icu_locale_core",
1684+ "writeable",
1685+ "yoke",
1686+ "zerofrom",
1687+ "zerotrie",
1688+ "zerovec",
1689+]
1690+
1691+[[package]]
1692+name = "idna"
1693+version = "1.1.0"
1694+source = "registry+https://github.com/rust-lang/crates.io-index"
1695+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
1696+dependencies = [
1697+ "idna_adapter",
1698+ "smallvec",
1699+ "utf8_iter",
1700+]
1701+
1702+[[package]]
1703+name = "idna_adapter"
1704+version = "1.2.2"
1705+source = "registry+https://github.com/rust-lang/crates.io-index"
1706+checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
1707+dependencies = [
1708+ "icu_normalizer",
1709+ "icu_properties",
1710+]
1711+
15901712 [[package]]
15911713 name = "indexmap"
15921714 version = "2.14.0"
@@ -1910,7 +2032,7 @@ dependencies = [
19102032 "bitflags",
19112033 "libc",
19122034 "plain",
1913- "redox_syscall 0.9.1",
2035+ "redox_syscall",
19142036 ]
19152037
19162038 [[package]]
@@ -1988,6 +2110,12 @@ version = "0.12.1"
19882110 source = "registry+https://github.com/rust-lang/crates.io-index"
19892111 checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
19902112
2113+[[package]]
2114+name = "litemap"
2115+version = "0.8.3"
2116+source = "registry+https://github.com/rust-lang/crates.io-index"
2117+checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
2118+
19912119 [[package]]
19922120 name = "log"
19932121 version = "0.4.33"
@@ -2396,11 +2524,10 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
23962524
23972525 [[package]]
23982526 name = "orbclient"
2399-version = "0.3.55"
2527+version = "0.4.6"
24002528 source = "registry+https://github.com/rust-lang/crates.io-index"
2401-checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747"
2529+checksum = "01f140a738f180203d7912dfd369936fff2fb0ad6f426c0aa007ed3e2b443e6b"
24022530 dependencies = [
2403- "libc",
24042531 "libredox",
24052532 ]
24062533
@@ -2667,6 +2794,15 @@ version = "1.14.0"
26672794 source = "registry+https://github.com/rust-lang/crates.io-index"
26682795 checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
26692796
2797+[[package]]
2798+name = "potential_utf"
2799+version = "0.1.6"
2800+source = "registry+https://github.com/rust-lang/crates.io-index"
2801+checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661"
2802+dependencies = [
2803+ "zerovec",
2804+]
2805+
26702806 [[package]]
26712807 name = "ppv-lite86"
26722808 version = "0.2.21"
@@ -2896,12 +3032,13 @@ dependencies = [
28963032 ]
28973033
28983034 [[package]]
2899-name = "redox_syscall"
2900-version = "0.5.18"
3035+name = "redox_event"
3036+version = "0.4.8"
29013037 source = "registry+https://github.com/rust-lang/crates.io-index"
2902-checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
3038+checksum = "c5018d583d6d2f5499352aea8d177e9067d1eb03ab17c78169d5ba7a30001b15"
29033039 dependencies = [
29043040 "bitflags",
3041+ "libredox",
29053042 ]
29063043
29073044 [[package]]
@@ -3270,7 +3407,7 @@ checksum = "e8e2fb0f499abb4d162f2bedad68f5ef91a1682b5a03596ddb67efd37768d100"
32703407 [[package]]
32713408 name = "smithay"
32723409 version = "0.7.0"
3273-source = "git+https://github.com/Smithay/smithay.git?rev=4cf0b62028039661477d482ec4758b687d8f4392#4cf0b62028039661477d482ec4758b687d8f4392"
3410+source = "git+https://github.com/Smithay/smithay.git?rev=0ff00983b6007257a7a161a4fe8b14a778e2ac8f#0ff00983b6007257a7a161a4fe8b14a778e2ac8f"
32743411 dependencies = [
32753412 "aliasable",
32763413 "appendlist",
@@ -3321,20 +3458,18 @@ dependencies = [
33213458
33223459 [[package]]
33233460 name = "smithay-client-toolkit"
3324-version = "0.20.0"
3461+version = "0.21.1"
33253462 source = "registry+https://github.com/rust-lang/crates.io-index"
3326-checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0"
3463+checksum = "74dc9ee14b0fdcb535f9556141bacac070c994a977d2240ee455d7438a617f00"
33273464 dependencies = [
33283465 "bitflags",
33293466 "calloop",
33303467 "calloop-wayland-source",
33313468 "cursor-icon",
3332- "libc",
33333469 "log",
33343470 "memmap2",
33353471 "rustix 1.1.4",
33363472 "thiserror 2.0.20",
3337- "wayland-backend",
33383473 "wayland-client",
33393474 "wayland-csd-frame",
33403475 "wayland-cursor",
@@ -3349,7 +3484,7 @@ dependencies = [
33493484 [[package]]
33503485 name = "smithay-drm-extras"
33513486 version = "0.1.0"
3352-source = "git+https://github.com/Smithay/smithay.git?rev=4cf0b62028039661477d482ec4758b687d8f4392#4cf0b62028039661477d482ec4758b687d8f4392"
3487+source = "git+https://github.com/Smithay/smithay.git?rev=0ff00983b6007257a7a161a4fe8b14a778e2ac8f#0ff00983b6007257a7a161a4fe8b14a778e2ac8f"
33533488 dependencies = [
33543489 "drm",
33553490 "libdisplay-info",
@@ -3365,6 +3500,12 @@ dependencies = [
33653500 "serde",
33663501 ]
33673502
3503+[[package]]
3504+name = "stable_deref_trait"
3505+version = "1.2.1"
3506+source = "registry+https://github.com/rust-lang/crates.io-index"
3507+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
3508+
33683509 [[package]]
33693510 name = "static_assertions"
33703511 version = "1.1.0"
@@ -3438,6 +3579,17 @@ dependencies = [
34383579 "unicode-ident",
34393580 ]
34403581
3582+[[package]]
3583+name = "synstructure"
3584+version = "0.13.2"
3585+source = "registry+https://github.com/rust-lang/crates.io-index"
3586+checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
3587+dependencies = [
3588+ "proc-macro2",
3589+ "quote",
3590+ "syn 2.0.119",
3591+]
3592+
34413593 [[package]]
34423594 name = "system-deps"
34433595 version = "7.0.8"
@@ -3540,6 +3692,16 @@ dependencies = [
35403692 "cfg-if",
35413693 ]
35423694
3695+[[package]]
3696+name = "tinystr"
3697+version = "0.8.4"
3698+source = "registry+https://github.com/rust-lang/crates.io-index"
3699+checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643"
3700+dependencies = [
3701+ "displaydoc",
3702+ "zerovec",
3703+]
3704+
35433705 [[package]]
35443706 name = "toml"
35453707 version = "1.1.4+spec-1.1.0"
@@ -3748,6 +3910,24 @@ version = "0.2.2"
37483910 source = "registry+https://github.com/rust-lang/crates.io-index"
37493911 checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
37503912
3913+[[package]]
3914+name = "url"
3915+version = "2.5.8"
3916+source = "registry+https://github.com/rust-lang/crates.io-index"
3917+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
3918+dependencies = [
3919+ "form_urlencoded",
3920+ "idna",
3921+ "percent-encoding",
3922+ "serde",
3923+]
3924+
3925+[[package]]
3926+name = "utf8_iter"
3927+version = "1.0.4"
3928+source = "registry+https://github.com/rust-lang/crates.io-index"
3929+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
3930+
37513931 [[package]]
37523932 name = "utf8parse"
37533933 version = "0.2.2"
@@ -3945,9 +4125,9 @@ dependencies = [
39454125
39464126 [[package]]
39474127 name = "wayland-protocols-experimental"
3948-version = "20250721.0.1"
4128+version = "20251230.0.3"
39494129 source = "registry+https://github.com/rust-lang/crates.io-index"
3950-checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1"
4130+checksum = "91c6c3e7178e553d093d46999032bc79aafea9dedd71dd702c8ace7bbc25cf13"
39514131 dependencies = [
39524132 "bitflags",
39534133 "wayland-backend",
@@ -4251,9 +4431,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
42514431
42524432 [[package]]
42534433 name = "winit"
4254-version = "0.31.0-beta.2"
4434+version = "0.31.0-beta.3"
42554435 source = "registry+https://github.com/rust-lang/crates.io-index"
4256-checksum = "2879d2854d1a43e48f67322d4bd097afcb6eb8f8f775c8de0260a71aea1df1aa"
4436+checksum = "f431156a3e4f0f1b35eaaf37674e55838e3652908c8088f570466274d1902e2b"
42574437 dependencies = [
42584438 "bitflags",
42594439 "cfg_aliases",
@@ -4278,9 +4458,9 @@ dependencies = [
42784458
42794459 [[package]]
42804460 name = "winit-android"
4281-version = "0.31.0-beta.2"
4461+version = "0.31.0-beta.3"
42824462 source = "registry+https://github.com/rust-lang/crates.io-index"
4283-checksum = "51d9c0d2cd93efec3a9f9ad819cfaf0834782403af7c0d248c784ec0c61761df"
4463+checksum = "d5d60d944a564986b9311e325334cc22e7e4cf726dd0ff7475fd925404215af4"
42844464 dependencies = [
42854465 "android-activity",
42864466 "bitflags",
@@ -4294,9 +4474,9 @@ dependencies = [
42944474
42954475 [[package]]
42964476 name = "winit-appkit"
4297-version = "0.31.0-beta.2"
4477+version = "0.31.0-beta.3"
42984478 source = "registry+https://github.com/rust-lang/crates.io-index"
4299-checksum = "21310ca07851a49c348e0c2cc768e36b52ca65afda2c2354d78ed4b90074d8aa"
4479+checksum = "23343ec0ea7ac6aa72f38009a6ff66fb63bcf6395e0622fba72794d2a762ab42"
43004480 dependencies = [
43014481 "bitflags",
43024482 "block2",
@@ -4317,13 +4497,16 @@ dependencies = [
43174497
43184498 [[package]]
43194499 name = "winit-common"
4320-version = "0.31.0-beta.2"
4500+version = "0.31.0-beta.3"
43214501 source = "registry+https://github.com/rust-lang/crates.io-index"
4322-checksum = "45375fbac4cbb77260d83a30b1f9d8105880dbac99a9ae97f56656694680ff69"
4502+checksum = "e90422ff1c04502aaaac1dad1d099791c2bbb3fbb3f823019e0ce5cdeee04025"
43234503 dependencies = [
4504+ "block2",
4505+ "dpi",
43244506 "memmap2",
43254507 "objc2",
43264508 "objc2-core-foundation",
4509+ "objc2-foundation",
43274510 "smol_str",
43284511 "tracing",
43294512 "winit-core",
@@ -4333,9 +4516,9 @@ dependencies = [
43334516
43344517 [[package]]
43354518 name = "winit-core"
4336-version = "0.31.0-beta.2"
4519+version = "0.31.0-beta.3"
43374520 source = "registry+https://github.com/rust-lang/crates.io-index"
4338-checksum = "e4f0ccd7abb43740e2c6124ac7cae7d865ecec74eec63783e8922577ac232583"
4521+checksum = "b8af6307236c51847199950c15cf80e0481a250bb96ce9132f5026df4ad3d0f9"
43394522 dependencies = [
43404523 "bitflags",
43414524 "cursor-icon",
@@ -4343,20 +4526,22 @@ dependencies = [
43434526 "keyboard-types",
43444527 "raw-window-handle",
43454528 "smol_str",
4529+ "url",
43464530 "web-time",
43474531 ]
43484532
43494533 [[package]]
43504534 name = "winit-orbital"
4351-version = "0.31.0-beta.2"
4535+version = "0.31.0-beta.3"
43524536 source = "registry+https://github.com/rust-lang/crates.io-index"
4353-checksum = "51ea1fb262e7209f265f12bd0cc792c399b14355675e65531e9c8a87db287d46"
4537+checksum = "278a8ae837902a3bc95dd2fd696d680da33f32130eecc29905358c9089cf6c50"
43544538 dependencies = [
43554539 "bitflags",
43564540 "dpi",
4541+ "libredox",
43574542 "orbclient",
43584543 "raw-window-handle",
4359- "redox_syscall 0.5.18",
4544+ "redox_event",
43604545 "smol_str",
43614546 "tracing",
43624547 "winit-core",
@@ -4364,9 +4549,9 @@ dependencies = [
43644549
43654550 [[package]]
43664551 name = "winit-uikit"
4367-version = "0.31.0-beta.2"
4552+version = "0.31.0-beta.3"
43684553 source = "registry+https://github.com/rust-lang/crates.io-index"
4369-checksum = "680a356e798837d8eb274d4556e83bceaf81698194e31aafc5cfb8a9f2fab643"
4554+checksum = "83315a3ea1739c8466cf23d35e3b0a2cb20c9515d8857666b633afef484740b5"
43704555 dependencies = [
43714556 "bitflags",
43724557 "block2",
@@ -4385,17 +4570,18 @@ dependencies = [
43854570
43864571 [[package]]
43874572 name = "winit-wayland"
4388-version = "0.31.0-beta.2"
4573+version = "0.31.0-beta.3"
43894574 source = "registry+https://github.com/rust-lang/crates.io-index"
4390-checksum = "8ce5afb2ba07da603f84b722c95f9f9396d2cedae3944fb6c0cda4a6f88de545"
4575+checksum = "8b64ceed06de0c45886eef05102106abe1413e703384e337bc57c7e95b71f803"
43914576 dependencies = [
4392- "ahash",
43934577 "bitflags",
43944578 "calloop",
43954579 "cursor-icon",
43964580 "dpi",
4581+ "foldhash",
43974582 "libc",
43984583 "memmap2",
4584+ "percent-encoding",
43994585 "raw-window-handle",
44004586 "rustix 1.1.4",
44014587 "smithay-client-toolkit",
@@ -4411,9 +4597,9 @@ dependencies = [
44114597
44124598 [[package]]
44134599 name = "winit-web"
4414-version = "0.31.0-beta.2"
4600+version = "0.31.0-beta.3"
44154601 source = "registry+https://github.com/rust-lang/crates.io-index"
4416-checksum = "8c2490a953fb776fbbd5e295d54f1c3847f4f15b6c3929ec53c09acda6487a92"
4602+checksum = "f539be45f95cc297bdfb80569aef38d925d64aec4133852a4d3fc5cb3660f1c9"
44174603 dependencies = [
44184604 "atomic-waker",
44194605 "bitflags",
@@ -4434,9 +4620,9 @@ dependencies = [
44344620
44354621 [[package]]
44364622 name = "winit-win32"
4437-version = "0.31.0-beta.2"
4623+version = "0.31.0-beta.3"
44384624 source = "registry+https://github.com/rust-lang/crates.io-index"
4439-checksum = "644ea78af0e858aa3b092e5d1c67c41995a98220c81813f1353b28bc8bb91eaa"
4625+checksum = "25fb480c41df01d351f656cbf3ad74013f8a9d22bb5b2dcab59f9167e7a0b6ec"
44404626 dependencies = [
44414627 "bitflags",
44424628 "cursor-icon",
@@ -4445,15 +4631,17 @@ dependencies = [
44454631 "smol_str",
44464632 "tracing",
44474633 "unicode-segmentation",
4448- "windows-sys 0.59.0",
4634+ "url",
4635+ "windows-sys 0.61.2",
4636+ "winit-common",
44494637 "winit-core",
44504638 ]
44514639
44524640 [[package]]
44534641 name = "winit-x11"
4454-version = "0.31.0-beta.2"
4642+version = "0.31.0-beta.3"
44554643 source = "registry+https://github.com/rust-lang/crates.io-index"
4456-checksum = "aa5b600756534c7041aa93cd0d244d44b09fca1b89e202bd1cd80dd9f3636c46"
4644+checksum = "bb5746cd907e514b7895491a1c6f7d0cb70077f9e16928cd74ae6f987ffd96aa"
44574645 dependencies = [
44584646 "bitflags",
44594647 "bytemuck",
@@ -4488,6 +4676,12 @@ version = "0.57.1"
44884676 source = "registry+https://github.com/rust-lang/crates.io-index"
44894677 checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
44904678
4679+[[package]]
4680+name = "writeable"
4681+version = "0.6.4"
4682+source = "registry+https://github.com/rust-lang/crates.io-index"
4683+checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
4684+
44914685 [[package]]
44924686 name = "x11-dl"
44934687 version = "2.21.0"
@@ -4584,6 +4778,29 @@ version = "1.0.1"
45844778 source = "registry+https://github.com/rust-lang/crates.io-index"
45854779 checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
45864780
4781+[[package]]
4782+name = "yoke"
4783+version = "0.8.3"
4784+source = "registry+https://github.com/rust-lang/crates.io-index"
4785+checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5"
4786+dependencies = [
4787+ "stable_deref_trait",
4788+ "yoke-derive",
4789+ "zerofrom",
4790+]
4791+
4792+[[package]]
4793+name = "yoke-derive"
4794+version = "0.8.2"
4795+source = "registry+https://github.com/rust-lang/crates.io-index"
4796+checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"
4797+dependencies = [
4798+ "proc-macro2",
4799+ "quote",
4800+ "syn 2.0.119",
4801+ "synstructure",
4802+]
4803+
45874804 [[package]]
45884805 name = "zbus"
45894806 version = "5.18.0"
@@ -4701,6 +4918,60 @@ dependencies = [
47014918 "syn 2.0.119",
47024919 ]
47034920
4921+[[package]]
4922+name = "zerofrom"
4923+version = "0.1.8"
4924+source = "registry+https://github.com/rust-lang/crates.io-index"
4925+checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
4926+dependencies = [
4927+ "zerofrom-derive",
4928+]
4929+
4930+[[package]]
4931+name = "zerofrom-derive"
4932+version = "0.1.7"
4933+source = "registry+https://github.com/rust-lang/crates.io-index"
4934+checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"
4935+dependencies = [
4936+ "proc-macro2",
4937+ "quote",
4938+ "syn 2.0.119",
4939+ "synstructure",
4940+]
4941+
4942+[[package]]
4943+name = "zerotrie"
4944+version = "0.2.5"
4945+source = "registry+https://github.com/rust-lang/crates.io-index"
4946+checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f"
4947+dependencies = [
4948+ "displaydoc",
4949+ "yoke",
4950+ "zerofrom",
4951+]
4952+
4953+[[package]]
4954+name = "zerovec"
4955+version = "0.11.8"
4956+source = "registry+https://github.com/rust-lang/crates.io-index"
4957+checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8"
4958+dependencies = [
4959+ "yoke",
4960+ "zerofrom",
4961+ "zerovec-derive",
4962+]
4963+
4964+[[package]]
4965+name = "zerovec-derive"
4966+version = "0.11.6"
4967+source = "registry+https://github.com/rust-lang/crates.io-index"
4968+checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da"
4969+dependencies = [
4970+ "proc-macro2",
4971+ "quote",
4972+ "syn 3.0.3",
4973+]
4974+
47044975 [[package]]
47054976 name = "zmij"
47064977 version = "1.0.23"
Cargo.tomlmodified+2 -2
@@ -28,13 +28,13 @@ tracy-client = { version = "0.18.4", default-features = false }
2828 [workspace.dependencies.smithay]
2929 # version = "0.4.1"
3030 git = "https://github.com/Smithay/smithay.git"
31-rev = "4cf0b62028039661477d482ec4758b687d8f4392"
31+rev = "0ff00983b6007257a7a161a4fe8b14a778e2ac8f"
3232 default-features = false
3333
3434 [workspace.dependencies.smithay-drm-extras]
3535 # version = "0.1.0"
3636 git = "https://github.com/Smithay/smithay.git"
37-rev = "4cf0b62028039661477d482ec4758b687d8f4392"
37+rev = "0ff00983b6007257a7a161a4fe8b14a778e2ac8f"
3838 # path = "../smithay/smithay-drm-extras"
3939
4040 [package]
src/handlers/mod.rsmodified+3 -7
@@ -39,7 +39,7 @@ use smithay::wayland::keyboard_shortcuts_inhibit::{
3939 };
4040 use smithay::wayland::output::OutputHandler;
4141 use smithay::wayland::pointer_constraints::{
42- with_pointer_constraint, PointerConstraint, PointerConstraintsHandler,
42+ with_pointer_constraint, ConstraintRemove, PointerConstraintsHandler,
4343 };
4444 use smithay::wayland::security_context::{
4545 SecurityContext, SecurityContextHandler, SecurityContextListenerSource,
@@ -206,7 +206,7 @@ impl PointerConstraintsHandler for State {
206206 &mut self,
207207 _surface: &WlSurface,
208208 pointer: &PointerHandle<Self>,
209- _constraint: Option<&PointerConstraint>,
209+ reason: ConstraintRemove,
210210 ) {
211211 // Since a pointer constraint is broken when a surface loses pointer focus, and one surface
212212 // can only have a single pointer constraint at once, assume there can be only one
@@ -219,11 +219,7 @@ impl PointerConstraintsHandler for State {
219219
220220 // If the constraint was broken by the pointer forcibly leaving the surface (e.g. the user
221221 // opened the overview), then it doesn't make much sense to warp it.
222- //
223- // Furthermore, when the constraint is removed as part of the pointer leaving the surface,
224- // this call happens with locked pointer data, and calling set_location() will try to lock
225- // it again and deadlock.
226- if pointer.last_enter().is_none() {
222+ if matches!(reason, ConstraintRemove::PointerLeave(_)) {
227223 return;
228224 }
229225
src/handlers/xdg_shell.rsmodified+34 -35
@@ -2,6 +2,7 @@ use std::cell::Cell;
22
33 use calloop::Interest;
44 use niri_config::PresetSize;
5+use smithay::backend::input::InputTime;
56 use smithay::desktop::{
67 find_popup_root_surface, get_popup_toplevel_coords, layer_map_for_output, utils, LayerSurface,
78 PopupKeyboardGrab, PopupKind, PopupManager, PopupPointerGrab, PopupUngrabStrategy, Window,
@@ -113,33 +114,32 @@ impl XdgShellHandler for State {
113114
114115 // See if this comes from a tablet tool grab.
115116 let mut tablet_tool = None;
116- self.niri.seat.tablet_seat().with_tools(|tools| {
117- for tool in tools.values() {
118- let found = tool.with_grab(|grab_serial, grab| {
119- if grab_serial == serial {
120- let start_data = grab.start_data();
121- if let Some((focus, _)) = &start_data.focus {
122- if focus.id().same_client_as(&wl_surface.id()) {
123- // Deny move requests from DnD grabs to work around
124- // https://gitlab.gnome.org/GNOME/gtk/-/issues/7113
125- let is_dnd_grab = Self::is_dnd_grab(grab.as_any());
126-
127- if !is_dnd_grab {
128- grab_start_data =
129- Some(AnyStartData::TabletTool(start_data.clone()));
130- tablet_tool = Some(tool.clone());
131- return true;
132- }
117+ let tools = self.niri.seat.tablet_seat().get_tools();
118+ for tool in tools.values() {
119+ let found = tool.with_grab(|grab_serial, grab| {
120+ if grab_serial == serial {
121+ let start_data = grab.start_data();
122+ if let Some((focus, _)) = &start_data.focus {
123+ if focus.id().same_client_as(&wl_surface.id()) {
124+ // Deny move requests from DnD grabs to work around
125+ // https://gitlab.gnome.org/GNOME/gtk/-/issues/7113
126+ let is_dnd_grab = Self::is_dnd_grab(grab.as_any());
127+
128+ if !is_dnd_grab {
129+ grab_start_data =
130+ Some(AnyStartData::TabletTool(start_data.clone()));
131+ tablet_tool = Some(tool.clone());
132+ return true;
133133 }
134134 }
135135 }
136- false
137- });
138- if found == Some(true) {
139- break;
140136 }
137+ false
138+ });
139+ if found == Some(true) {
140+ break;
141141 }
142- });
142+ }
143143
144144 let Some(start_data) = grab_start_data else {
145145 return;
@@ -170,7 +170,7 @@ impl XdgShellHandler for State {
170170 }
171171 AnyStartData::TabletTool(_) => {
172172 if let Some(grab) = MoveGrab::new(self, start_data, window.clone(), true, None) {
173- let time = get_monotonic_time().as_millis() as u32;
173+ let time = InputTime::now();
174174 tablet_tool
175175 .unwrap()
176176 .set_grab(self, grab, time, serial, Focus::Clear);
@@ -219,21 +219,20 @@ impl XdgShellHandler for State {
219219
220220 // See if this comes from a tablet tool grab.
221221 let mut tablet_tool = None;
222- self.niri.seat.tablet_seat().with_tools(|tools| {
223- 'outer: for tool in tools.values() {
224- if tool.has_grab(serial) {
225- if let Some(start_data) = tool.grab_start_data() {
226- if let Some((focus, _)) = &start_data.focus {
227- if focus.id().same_client_as(&wl_surface.id()) {
228- grab_start_data = Some(AnyStartData::TabletTool(start_data));
229- tablet_tool = Some(tool.clone());
230- break 'outer;
231- }
222+ let tools = self.niri.seat.tablet_seat().get_tools();
223+ 'outer: for tool in tools.values() {
224+ if tool.has_grab(serial) {
225+ if let Some(start_data) = tool.grab_start_data() {
226+ if let Some((focus, _)) = &start_data.focus {
227+ if focus.id().same_client_as(&wl_surface.id()) {
228+ grab_start_data = Some(AnyStartData::TabletTool(start_data));
229+ tablet_tool = Some(tool.clone());
230+ break 'outer;
232231 }
233232 }
234233 }
235234 }
236- });
235+ }
237236
238237 let Some(start_data) = grab_start_data else {
239238 return;
@@ -301,7 +300,7 @@ impl XdgShellHandler for State {
301300 }
302301 AnyStartData::TabletTool(_) => {
303302 let grab = ResizeGrab::new(start_data, window);
304- let time = get_monotonic_time().as_millis() as u32;
303+ let time = InputTime::now();
305304 tablet_tool
306305 .unwrap()
307306 .set_grab(self, grab, time, serial, Focus::Clear);
src/input/mod.rsmodified+28 -28
@@ -417,7 +417,7 @@ impl State {
417417 let mod_key = self.backend.mod_key(&self.niri.config.borrow());
418418
419419 let serial = SERIAL_COUNTER.next_serial();
420- let time = Event::time_msec(&event);
420+ let time = Event::time(&event);
421421 let pressed = event.state() == KeyState::Pressed;
422422
423423 // Stop bind key repeat on any release. This won't work 100% correctly in cases like:
@@ -447,7 +447,7 @@ impl State {
447447 #[cfg(feature = "dbus")]
448448 let block = {
449449 let block = self.a11y_process_key(
450- Duration::from_millis(u64::from(time)),
450+ Duration::from_micros(time.micros()),
451451 event.key_code(),
452452 event.state(),
453453 );
@@ -2496,7 +2496,7 @@ impl State {
24962496 &RelativeMotionEvent {
24972497 delta: event.delta(),
24982498 delta_unaccel: event.delta_unaccel(),
2499- utime: event.time(),
2499+ time: event.time(),
25002500 },
25012501 );
25022502
@@ -2607,7 +2607,7 @@ impl State {
26072607 &RelativeMotionEvent {
26082608 delta: event.delta(),
26092609 delta_unaccel: event.delta_unaccel(),
2610- utime: event.time(),
2610+ time: event.time(),
26112611 },
26122612 );
26132613
@@ -2627,7 +2627,7 @@ impl State {
26272627 &MotionEvent {
26282628 location: new_pos,
26292629 serial,
2630- time: event.time_msec(),
2630+ time: event.time(),
26312631 },
26322632 );
26332633
@@ -2637,7 +2637,7 @@ impl State {
26372637 &RelativeMotionEvent {
26382638 delta: event.delta(),
26392639 delta_unaccel: event.delta_unaccel(),
2640- utime: event.time(),
2640+ time: event.time(),
26412641 },
26422642 );
26432643
@@ -2728,7 +2728,7 @@ impl State {
27282728 &MotionEvent {
27292729 location: pos,
27302730 serial,
2731- time: event.time_msec(),
2731+ time: event.time(),
27322732 },
27332733 );
27342734
@@ -3094,7 +3094,7 @@ impl State {
30943094 button: button_code,
30953095 state: button_state,
30963096 serial,
3097- time: event.time_msec(),
3097+ time: event.time(),
30983098 },
30993099 );
31003100 pointer.frame(self);
@@ -3113,7 +3113,7 @@ impl State {
31133113 self.niri.pointer_visibility = PointerVisibility::Visible;
31143114 self.niri.tablet_cursor_location = None;
31153115
3116- let timestamp = Duration::from_micros(event.time());
3116+ let timestamp = Duration::from_micros(event.time().micros());
31173117
31183118 let horizontal_amount_v120 = event.amount_v120(Axis::Horizontal);
31193119 let vertical_amount_v120 = event.amount_v120(Axis::Vertical);
@@ -3550,7 +3550,7 @@ impl State {
35503550 let horizontal_amount_v120 = horizontal_amount_v120.map(|x| x * horizontal_factor);
35513551 let vertical_amount_v120 = vertical_amount_v120.map(|x| x * vertical_factor);
35523552
3553- let mut frame = AxisFrame::new(event.time_msec()).source(source);
3553+ let mut frame = AxisFrame::new(event.time()).source(source);
35543554 if horizontal_amount != 0.0 {
35553555 frame = frame
35563556 .relative_direction(Axis::Horizontal, event.relative_direction(Axis::Horizontal));
@@ -3611,7 +3611,7 @@ impl State {
36113611 let tablet_seat = self.niri.seat.tablet_seat();
36123612 let tool = tablet_seat.get_tool(&event.tool());
36133613 if let Some(tool) = tool {
3614- let time = event.time_msec();
3614+ let time = event.time();
36153615
36163616 let frame = tablet::tool::AxisFrame {
36173617 pressure: event.pressure_has_changed().then(|| event.pressure()),
@@ -3655,7 +3655,7 @@ impl State {
36553655 let tip_state = event.tip_state();
36563656
36573657 let serial = SERIAL_COUNTER.next_serial();
3658- let time = event.time_msec();
3658+ let time = event.time();
36593659
36603660 match tip_state {
36613661 TabletToolTipState::Down => {
@@ -3728,7 +3728,7 @@ impl State {
37283728 location: pos,
37293729 };
37303730 let start_data = AnyStartData::TabletTool(start_data);
3731- let start_timestamp = Duration::from_micros(event.time());
3731+ let start_timestamp = Duration::from_micros(event.time().micros());
37323732 let grab = TouchOverviewGrab::new(
37333733 start_data,
37343734 start_timestamp,
@@ -3810,7 +3810,7 @@ impl State {
38103810 let tablet = tablet_seat.get_tablet(&TabletDescriptor::from(&event.device()));
38113811 if let Some(tablet) = tablet {
38123812 let serial = SERIAL_COUNTER.next_serial();
3813- let time = event.time_msec();
3813+ let time = event.time();
38143814
38153815 match event.state() {
38163816 ProximityState::In => {
@@ -3913,7 +3913,7 @@ impl State {
39133913 }
39143914 }
39153915
3916- let time = event.time_msec();
3916+ let time = event.time();
39173917
39183918 tool.button(
39193919 self,
@@ -3959,7 +3959,7 @@ impl State {
39593959 self,
39603960 &GestureSwipeBeginEvent {
39613961 serial,
3962- time: event.time_msec(),
3962+ time: event.time(),
39633963 fingers: event.fingers(),
39643964 },
39653965 );
@@ -4030,7 +4030,7 @@ impl State {
40304030 }
40314031 }
40324032
4033- let timestamp = Duration::from_micros(event.time());
4033+ let timestamp = Duration::from_micros(event.time().micros());
40344034
40354035 let mut handled = false;
40364036 let res = self
@@ -4080,7 +4080,7 @@ impl State {
40804080 pointer.gesture_swipe_update(
40814081 self,
40824082 &GestureSwipeUpdateEvent {
4083- time: event.time_msec(),
4083+ time: event.time(),
40844084 delta: event.delta(),
40854085 },
40864086 );
@@ -4124,7 +4124,7 @@ impl State {
41244124 self,
41254125 &GestureSwipeEndEvent {
41264126 serial,
4127- time: event.time_msec(),
4127+ time: event.time(),
41284128 cancelled: event.cancelled(),
41294129 },
41304130 );
@@ -4142,7 +4142,7 @@ impl State {
41424142 self,
41434143 &GesturePinchBeginEvent {
41444144 serial,
4145- time: event.time_msec(),
4145+ time: event.time(),
41464146 fingers: event.fingers(),
41474147 },
41484148 );
@@ -4158,7 +4158,7 @@ impl State {
41584158 pointer.gesture_pinch_update(
41594159 self,
41604160 &GesturePinchUpdateEvent {
4161- time: event.time_msec(),
4161+ time: event.time(),
41624162 delta: event.delta(),
41634163 scale: event.scale(),
41644164 rotation: event.rotation(),
@@ -4178,7 +4178,7 @@ impl State {
41784178 self,
41794179 &GesturePinchEndEvent {
41804180 serial,
4181- time: event.time_msec(),
4181+ time: event.time(),
41824182 cancelled: event.cancelled(),
41834183 },
41844184 );
@@ -4196,7 +4196,7 @@ impl State {
41964196 self,
41974197 &GestureHoldBeginEvent {
41984198 serial,
4199- time: event.time_msec(),
4199+ time: event.time(),
42004200 fingers: event.fingers(),
42014201 },
42024202 );
@@ -4214,7 +4214,7 @@ impl State {
42144214 self,
42154215 &GestureHoldEndEvent {
42164216 serial,
4217- time: event.time_msec(),
4217+ time: event.time(),
42184218 cancelled: event.cancelled(),
42194219 },
42204220 );
@@ -4326,7 +4326,7 @@ impl State {
43264326 location: pos,
43274327 };
43284328 let start_data = AnyStartData::Touch(start_data);
4329- let start_timestamp = Duration::from_micros(evt.time());
4329+ let start_timestamp = Duration::from_micros(evt.time().micros());
43304330 let grab = TouchOverviewGrab::new(
43314331 start_data,
43324332 start_timestamp,
@@ -4372,7 +4372,7 @@ impl State {
43724372 slot,
43734373 location: pos,
43744374 serial,
4375- time: evt.time_msec(),
4375+ time: evt.time(),
43764376 },
43774377 );
43784378
@@ -4399,7 +4399,7 @@ impl State {
43994399 &UpEvent {
44004400 slot,
44014401 serial,
4402- time: evt.time_msec(),
4402+ time: evt.time(),
44034403 },
44044404 )
44054405 }
@@ -4429,7 +4429,7 @@ impl State {
44294429 &TouchMotionEvent {
44304430 slot,
44314431 location: pos,
4432- time: evt.time_msec(),
4432+ time: evt.time(),
44334433 },
44344434 );
44354435
src/input/move_grab.rsmodified+8 -9
@@ -1,6 +1,6 @@
11 use std::time::Duration;
22
3-use smithay::backend::input::ButtonState;
3+use smithay::backend::input::{ButtonState, InputTime};
44 use smithay::desktop::Window;
55 use smithay::input::pointer::{
66 AxisFrame, ButtonEvent, CursorIcon, CursorImageStatus, GestureHoldBeginEvent,
@@ -20,7 +20,6 @@ use smithay::utils::{IsAlive, Logical, Point, SERIAL_COUNTER};
2020
2121 use crate::input::AnyStartData;
2222 use crate::niri::State;
23-use crate::utils::get_monotonic_time;
2423
2524 pub struct MoveGrab {
2625 start_data: AnyStartData<State>,
@@ -311,7 +310,7 @@ impl PointerGrab<State> for MoveGrab {
311310
312311 // Relative motion takes precedence over normal motion.
313312 if self.relative_delta.is_none() {
314- self.event_timestamp = Some(Duration::from_millis(u64::from(event.time)));
313+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
315314 }
316315 }
317316
@@ -326,7 +325,7 @@ impl PointerGrab<State> for MoveGrab {
326325 handle.relative_motion(data, None, event);
327326
328327 *self.relative_delta.get_or_insert_default() += event.delta;
329- self.event_timestamp = Some(Duration::from_micros(event.utime));
328+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
330329 }
331330
332331 fn button(
@@ -378,7 +377,7 @@ impl PointerGrab<State> for MoveGrab {
378377 self,
379378 data,
380379 SERIAL_COUNTER.next_serial(),
381- get_monotonic_time().as_millis() as u32,
380+ InputTime::now(),
382381 true,
383382 );
384383 }
@@ -511,7 +510,7 @@ impl TouchGrab<State> for MoveGrab {
511510 }
512511
513512 self.new_location = event.location;
514- self.event_timestamp = Some(Duration::from_millis(u64::from(event.time)));
513+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
515514 }
516515
517516 fn frame(&mut self, data: &mut State, handle: &mut TouchInnerHandle<'_, State>) {
@@ -580,7 +579,7 @@ impl TabletToolGrab<State> for MoveGrab {
580579 handle.motion(data, None, event);
581580
582581 self.new_location = event.location;
583- self.event_timestamp = Some(Duration::from_millis(u64::from(event.time)));
582+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
584583 }
585584
586585 fn down(
@@ -624,7 +623,7 @@ impl TabletToolGrab<State> for MoveGrab {
624623 &mut self,
625624 data: &mut State,
626625 handle: &mut TabletToolInnerHandle<'_, State>,
627- time: u32,
626+ time: InputTime,
628627 ) {
629628 handle.frame(data, time);
630629
@@ -634,7 +633,7 @@ impl TabletToolGrab<State> for MoveGrab {
634633 self,
635634 data,
636635 SERIAL_COUNTER.next_serial(),
637- get_monotonic_time().as_millis() as u32,
636+ InputTime::now(),
638637 true,
639638 );
640639 }
src/input/resize_grab.rsmodified+4 -4
@@ -1,3 +1,4 @@
1+use smithay::backend::input::InputTime;
12 use smithay::desktop::Window;
23 use smithay::input::pointer::{
34 AxisFrame, ButtonEvent, CursorImageStatus, GestureHoldBeginEvent, GestureHoldEndEvent,
@@ -15,7 +16,6 @@ use smithay::utils::{IsAlive, Logical, Point, SERIAL_COUNTER};
1516
1617 use crate::input::AnyStartData;
1718 use crate::niri::State;
18-use crate::utils::get_monotonic_time;
1919
2020 pub struct ResizeGrab {
2121 start_data: AnyStartData<State>,
@@ -116,7 +116,7 @@ impl PointerGrab<State> for ResizeGrab {
116116 self,
117117 data,
118118 SERIAL_COUNTER.next_serial(),
119- get_monotonic_time().as_millis() as u32,
119+ InputTime::now(),
120120 true,
121121 );
122122 }
@@ -354,7 +354,7 @@ impl TabletToolGrab<State> for ResizeGrab {
354354 &mut self,
355355 data: &mut State,
356356 handle: &mut TabletToolInnerHandle<'_, State>,
357- time: u32,
357+ time: InputTime,
358358 ) {
359359 handle.frame(data, time);
360360
@@ -364,7 +364,7 @@ impl TabletToolGrab<State> for ResizeGrab {
364364 self,
365365 data,
366366 SERIAL_COUNTER.next_serial(),
367- get_monotonic_time().as_millis() as u32,
367+ InputTime::now(),
368368 true,
369369 );
370370 }
src/input/spatial_movement_grab.rsmodified+4 -4
@@ -1,5 +1,6 @@
11 use std::time::Duration;
22
3+use smithay::backend::input::InputTime;
34 use smithay::input::pointer::{
45 AxisFrame, ButtonEvent, CursorImageStatus, GestureHoldBeginEvent, GestureHoldEndEvent,
56 GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent, GestureSwipeBeginEvent,
@@ -12,7 +13,6 @@ use smithay::utils::{Logical, Point, SERIAL_COUNTER};
1213
1314 use crate::layout::workspace::WorkspaceId;
1415 use crate::niri::State;
15-use crate::utils::get_monotonic_time;
1616
1717 pub struct SpatialMovementGrab {
1818 start_data: PointerGrabStartData<State>,
@@ -159,7 +159,7 @@ impl PointerGrab<State> for SpatialMovementGrab {
159159
160160 // Relative motion takes precedence over normal motion.
161161 if self.relative_delta.is_none() {
162- self.event_timestamp = Some(Duration::from_millis(u64::from(event.time)));
162+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
163163 }
164164 }
165165
@@ -174,7 +174,7 @@ impl PointerGrab<State> for SpatialMovementGrab {
174174 handle.relative_motion(data, None, event);
175175
176176 *self.relative_delta.get_or_insert_default() += event.delta;
177- self.event_timestamp = Some(Duration::from_micros(event.utime));
177+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
178178 }
179179
180180 fn button(
@@ -209,7 +209,7 @@ impl PointerGrab<State> for SpatialMovementGrab {
209209 self,
210210 data,
211211 SERIAL_COUNTER.next_serial(),
212- get_monotonic_time().as_millis() as u32,
212+ InputTime::now(),
213213 true,
214214 );
215215 }
src/input/touch_overview_grab.rsmodified+5 -5
@@ -1,5 +1,6 @@
11 use std::time::Duration;
22
3+use smithay::backend::input::InputTime;
34 use smithay::desktop::Window;
45 use smithay::input::pointer::{CursorIcon, CursorImageStatus};
56 use smithay::input::tablet::tool::{TabletToolGrab, TabletToolInnerHandle};
@@ -15,7 +16,6 @@ use smithay::utils::{IsAlive, Logical, Point, SERIAL_COUNTER};
1516 use crate::input::AnyStartData;
1617 use crate::layout::workspace::{Workspace, WorkspaceId};
1718 use crate::niri::State;
18-use crate::utils::get_monotonic_time;
1919 use crate::window::Mapped;
2020
2121 // When the touch is stationary for this much time, it becomes an interactive move.
@@ -282,7 +282,7 @@ impl TouchGrab<State> for TouchOverviewGrab {
282282 }
283283
284284 self.new_location = event.location;
285- self.event_timestamp = Some(Duration::from_millis(u64::from(event.time)));
285+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
286286 }
287287
288288 fn frame(&mut self, data: &mut State, handle: &mut TouchInnerHandle<'_, State>) {
@@ -351,7 +351,7 @@ impl TabletToolGrab<State> for TouchOverviewGrab {
351351 handle.motion(data, None, event);
352352
353353 self.new_location = event.location;
354- self.event_timestamp = Some(Duration::from_millis(u64::from(event.time)));
354+ self.event_timestamp = Some(Duration::from_micros(event.time.micros()));
355355 }
356356
357357 fn down(
@@ -395,7 +395,7 @@ impl TabletToolGrab<State> for TouchOverviewGrab {
395395 &mut self,
396396 data: &mut State,
397397 handle: &mut TabletToolInnerHandle<'_, State>,
398- time: u32,
398+ time: InputTime,
399399 ) {
400400 handle.frame(data, time);
401401
@@ -405,7 +405,7 @@ impl TabletToolGrab<State> for TouchOverviewGrab {
405405 self,
406406 data,
407407 SERIAL_COUNTER.next_serial(),
408- get_monotonic_time().as_millis() as u32,
408+ InputTime::now(),
409409 true,
410410 );
411411 }
src/niri.rsmodified+6 -11
@@ -20,7 +20,7 @@ use niri_config::{
2020 WorkspaceReference, Xkb,
2121 };
2222 use smithay::backend::allocator::Fourcc;
23-use smithay::backend::input::Keycode;
23+use smithay::backend::input::{InputTime, Keycode};
2424 use smithay::backend::renderer::damage::OutputDamageTracker;
2525 use smithay::backend::renderer::element::memory::MemoryRenderBufferRenderElement;
2626 use smithay::backend::renderer::element::surface::WaylandSurfaceRenderElement;
@@ -875,7 +875,7 @@ impl State {
875875 &MotionEvent {
876876 location,
877877 serial: SERIAL_COUNTER.next_serial(),
878- time: get_monotonic_time().as_millis() as u32,
878+ time: InputTime::now(),
879879 },
880880 );
881881 pointer.frame(self);
@@ -1106,7 +1106,7 @@ impl State {
11061106 &MotionEvent {
11071107 location,
11081108 serial: SERIAL_COUNTER.next_serial(),
1109- time: get_monotonic_time().as_millis() as u32,
1109+ time: InputTime::now(),
11101110 },
11111111 );
11121112
@@ -1336,7 +1336,7 @@ impl State {
13361336 self.niri.seat.get_pointer().unwrap().unset_grab(
13371337 self,
13381338 SERIAL_COUNTER.next_serial(),
1339- get_monotonic_time().as_millis() as u32,
1339+ InputTime::now(),
13401340 );
13411341 self.niri.popup_grab = None;
13421342 }
@@ -1999,7 +1999,7 @@ impl State {
19991999 };
20002000
20012001 // Now that we captured the screenshots, clear grabs like drag-and-drop, etc.
2002- let time = get_monotonic_time().as_millis() as u32;
2002+ let time = InputTime::now();
20032003 self.niri
20042004 .seat
20052005 .get_pointer()
@@ -2009,12 +2009,7 @@ impl State {
20092009 touch.unset_grab(self);
20102010 }
20112011
2012- // Can't unset_grab() from with_tools(), will deadlock on tablet seat mutex...
2013- let mut tools = Vec::new();
2014- self.niri.seat.tablet_seat().with_tools(|map| {
2015- tools = Vec::from_iter(map.values().cloned());
2016- });
2017- for tool in tools {
2012+ for tool in self.niri.seat.tablet_seat().get_tools().into_values() {
20182013 tool.unset_grab(self, SERIAL_COUNTER.next_serial(), time);
20192014 }
20202015
src/protocols/virtual_pointer.rsmodified+12 -10
@@ -3,7 +3,7 @@ use std::sync::Mutex;
33
44 use smithay::backend::input::{
55 AbsolutePositionEvent, Axis, AxisRelativeDirection, AxisSource, ButtonState, Device,
6- DeviceCapability, Event, InputBackend, PointerAxisEvent, PointerButtonEvent,
6+ DeviceCapability, Event, InputBackend, InputTime, PointerAxisEvent, PointerButtonEvent,
77 PointerMotionAbsoluteEvent, PointerMotionEvent, UnusedEvent,
88 };
99 use smithay::input::pointer::AxisFrame;
@@ -69,7 +69,9 @@ impl VirtualPointer {
6969 fn mutate_axis_frame(&self, time: Option<u32>, f: impl FnOnce(AxisFrame) -> AxisFrame) {
7070 let mut frame = self.data().axis_frame.lock().unwrap();
7171
72- *frame = frame.or(time.map(AxisFrame::new)).map(f);
72+ *frame = frame
73+ .or(time.map(InputTime::from_millis).map(AxisFrame::new))
74+ .map(f);
7375 }
7476 }
7577
@@ -103,8 +105,8 @@ pub struct VirtualPointerMotionEvent {
103105 }
104106
105107 impl Event<VirtualPointerInputBackend> for VirtualPointerMotionEvent {
106- fn time(&self) -> u64 {
107- self.time as u64 * 1000 // millis to micros
108+ fn time(&self) -> InputTime {
109+ InputTime::from_millis(self.time)
108110 }
109111
110112 fn device(&self) -> VirtualPointer {
@@ -140,8 +142,8 @@ pub struct VirtualPointerMotionAbsoluteEvent {
140142 }
141143
142144 impl Event<VirtualPointerInputBackend> for VirtualPointerMotionAbsoluteEvent {
143- fn time(&self) -> u64 {
144- self.time as u64 * 1000 // millis to micros
145+ fn time(&self) -> InputTime {
146+ InputTime::from_millis(self.time)
145147 }
146148
147149 fn device(&self) -> VirtualPointer {
@@ -175,8 +177,8 @@ pub struct VirtualPointerButtonEvent {
175177 }
176178
177179 impl Event<VirtualPointerInputBackend> for VirtualPointerButtonEvent {
178- fn time(&self) -> u64 {
179- self.time as u64 * 1000 // millis to micros
180+ fn time(&self) -> InputTime {
181+ InputTime::from_millis(self.time)
180182 }
181183
182184 fn device(&self) -> VirtualPointer {
@@ -200,8 +202,8 @@ pub struct VirtualPointerAxisEvent {
200202 }
201203
202204 impl Event<VirtualPointerInputBackend> for VirtualPointerAxisEvent {
203- fn time(&self) -> u64 {
204- self.frame.time as u64 * 1000 // millis to micros
205+ fn time(&self) -> InputTime {
206+ self.frame.time
205207 }
206208
207209 fn device(&self) -> VirtualPointer {