Compare commits
776 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e9c6171b6 | |||
| db1cb04896 | |||
| 4f81b5cd91 | |||
| f297e9198d | |||
| b56ce02e0c | |||
| aae92380a1 | |||
| c06a593b57 | |||
| ac69c05a31 | |||
| bfe201d70a | |||
| 1282cac99d | |||
| 784b236964 | |||
| f8206f18b1 | |||
| 523d5121d3 | |||
| a048da02d5 | |||
| 4d30400987 | |||
| f56a5ee260 | |||
| 891d4e9da3 | |||
| 8780cde919 | |||
| 56f6ac5fcc | |||
| 03b97b0a8b | |||
| 3d30790280 | |||
| 20ecaaa0e1 | |||
| b201438b39 | |||
| dca64da1fe | |||
| ca34428d17 | |||
| 5f13ee0afe | |||
| d11cde0c1c | |||
| 052b7d0ca7 | |||
| 22960c5c20 | |||
| d68898a033 | |||
| 5c6aa76979 | |||
| abefce0961 | |||
| 2ca1fe61a4 | |||
| d3316a37ed | |||
| 6fd951e53d | |||
| 35adc7ed04 | |||
| 52eb7b23cb | |||
| 6f4ebce914 | |||
| 40295441d1 | |||
| d2fe033c21 | |||
| e3c03e98f9 | |||
| 85d34932f3 | |||
| a0818f5bae | |||
| de3e97309f | |||
| d07bfbec1d | |||
| 89f3273651 | |||
| a612a42c11 | |||
| ddb9bae3d4 | |||
| a8c12a4c96 | |||
| b31a80cd64 | |||
| 6748c7116d | |||
| d13b9f797a | |||
| 0b1ca619a7 | |||
| 16ac1a12fc | |||
| 6fee66a9aa | |||
| aec4dc9387 | |||
| 0a9e2d6ed7 | |||
| 395b30dcfe | |||
| 326d101a57 | |||
| 02a02fac56 | |||
| 7ab4c9a68b | |||
| 19a740e277 | |||
| cae5e60113 | |||
| c87b21351c | |||
| f25a5f21fc | |||
| bda6c5ec2b | |||
| 51cef47835 | |||
| f8b7bd6dd6 | |||
| 72b047b084 | |||
| 72eb09f8e8 | |||
| 7647208fba | |||
| 8f325b475b | |||
| ac7dd63b02 | |||
| a7b93d62d5 | |||
| 985e17772b | |||
| 856fb75413 | |||
| 138f104fa4 | |||
| 79e512ab0b | |||
| 91343251b9 | |||
| ecd6b0b9a4 | |||
| de6498f18c | |||
| f89aeecc4f | |||
| eec24a0982 | |||
| a4ab1cfebe | |||
| ba845fa7b2 | |||
| 2a89189f1a | |||
| 0165cce645 | |||
| 6c5489ab25 | |||
| b933d57632 | |||
| c4f8eb7ec9 | |||
| 7208c97c7d | |||
| 69e7ab649c | |||
| 59dfeaceff | |||
| de8329b3ce | |||
| 4d410489c5 | |||
| 4ffe5a4954 | |||
| 850a086adb | |||
| 76b7f2704c | |||
| b8af685a43 | |||
| 50c4fbff72 | |||
| 0bbe4150a8 | |||
| 6da446c1be | |||
| 8f44694d2c | |||
| cf7f7df10c | |||
| 1d62a010ef | |||
| 46cf2849d2 | |||
| 811c7f2266 | |||
| a84b41abfd | |||
| dab79f5d77 | |||
| e792e077fa | |||
| ba31560970 | |||
| cfd21b0991 | |||
| ebda6125a4 | |||
| a1757170da | |||
| 13f6790fdb | |||
| bd4b55ddbf | |||
| 2560af284d | |||
| 0f0dad24f4 | |||
| 9536d3aeaa | |||
| 9cfda52d22 | |||
| 628d94936a | |||
| a91de44755 | |||
| d955636da5 | |||
| f4c366044b | |||
| 847d378fea | |||
| fab2558747 | |||
| 0ac222fab2 | |||
| 6f6b5faaa2 | |||
| ddb7cab4ac | |||
| c5d39c3582 | |||
| aeba990793 | |||
| a51e5551ba | |||
| b46f50079b | |||
| 715dc780fd | |||
| d0b09a8823 | |||
| 146229bd47 | |||
| 1eee1980ed | |||
| 7072d57d12 | |||
| 57b0ac9b42 | |||
| 2e7c6edca8 | |||
| 2674a3a9d4 | |||
| 8d1a37757d | |||
| 7fd47a81e1 | |||
| b7df2c7172 | |||
| 7ee6fb2ec0 | |||
| b34cfc89e6 | |||
| 40af368523 | |||
| 69b43edd55 | |||
| 8d5357ee56 | |||
| c91e65ba10 | |||
| df670047ea | |||
| 989b8ef34a | |||
| d3d9788d71 | |||
| bd2b635b6e | |||
| c4c00461fe | |||
| 33059211f4 | |||
| cec7ff1ba7 | |||
| 88e8a5272e | |||
| 4d5368e56e | |||
| f6e3dfd73e | |||
| 02d1d9714e | |||
| 0eda000cef | |||
| 9f04a52b51 | |||
| f308d2877e | |||
| cbfc2f7443 | |||
| 9a693c7228 | |||
| 5bd8f8c5a3 | |||
| d3cd68f11d | |||
| 96f403d608 | |||
| a1ed9d2a4a | |||
| 47d25d8b97 | |||
| d4943ef2fb | |||
| abe4225d9d | |||
| 8ad9958737 | |||
| 1ec3ed966d | |||
| 3f5f1ec957 | |||
| 045517ae9c | |||
| c989d87c74 | |||
| 954af8f0bb | |||
| e35378ba37 | |||
| 90b737529d | |||
| 2b73b35981 | |||
| 24f9cc76c0 | |||
| c28e247e87 | |||
| 5d9646810f | |||
| bcc2d455e4 | |||
| e1fa808a33 | |||
| e9e8a7b73b | |||
| 2f635ad61b | |||
| 81f19a011b | |||
| 041a4c202b | |||
| ad03ab2ebb | |||
| 8497f07124 | |||
| 0fd8168b3a | |||
| 059137f714 | |||
| 8d2542c867 | |||
| 1c07a20ca4 | |||
| 7284ec12d9 | |||
| ea45c02561 | |||
| 4b6ce6b231 | |||
| 2b983539bb | |||
| 268ca8784d | |||
| 8cafaebe8b | |||
| 0372d98159 | |||
| 498d513c4b | |||
| d1ea91c650 | |||
| 9cec4fd7fd | |||
| 84cfbe3491 | |||
| bdd4cc6661 | |||
| d54b622573 | |||
| a184b5bf51 | |||
| 3d273cc073 | |||
| a04204855d | |||
| 4445dfcbc3 | |||
| be5c0a2fe2 | |||
| 016e8c55ab | |||
| 33829cdec9 | |||
| ec1a48e830 | |||
| 96fd5a24db | |||
| d4868da99c | |||
| e85a298528 | |||
| dfbafa27e7 | |||
| cd673a95c1 | |||
| b543567c9e | |||
| e2d05f0625 | |||
| 4efd805110 | |||
| 39fb8d3cec | |||
| a98001978c | |||
| d2dd065b95 | |||
| f26c026aaf | |||
| bea26415d8 | |||
| bac71be6bb | |||
| 63127d6902 | |||
| a57047c289 | |||
| 3795d0ad8c | |||
| 4e02e292a6 | |||
| c67e3f37da | |||
| b1bbb37154 | |||
| e6209de962 | |||
| c2bc13b8b9 | |||
| 1b3756869a | |||
| 06396838f9 | |||
| 448babd29e | |||
| 3352a9d3bc | |||
| 88efe7f853 | |||
| de04aaf82d | |||
| 963e5dd0c8 | |||
| 1dcd916c7e | |||
| 3caa5bd4fe | |||
| 6a97b1ff27 | |||
| 72513972d7 | |||
| 1ce4f4c514 | |||
| 26f36fcb2a | |||
| e25d5d89d8 | |||
| 629431ba0e | |||
| 653251f69e | |||
| ebafe781b4 | |||
| 22af449b46 | |||
| 007243c151 | |||
| 9574f961c3 | |||
| 69135bcfe3 | |||
| 0d30d36326 | |||
| cc65c67a0d | |||
| 52b2148b28 | |||
| c09b9904c8 | |||
| 2427ebf9ba | |||
| ccc30804d2 | |||
| a0e7a231a8 | |||
| ec1e2fac95 | |||
| d5b42f78aa | |||
| ffe2df7b6a | |||
| d1dcf88d75 | |||
| a3ed7a150b | |||
| 55f46809de | |||
| 0cbeee3857 | |||
| 2dca4e310d | |||
| 844555384b | |||
| 522e5d4fa5 | |||
| 63a0e76646 | |||
| 607b859a0b | |||
| 72d80b8002 | |||
| 5b81864211 | |||
| 9bf9c76365 | |||
| 5413892b7d | |||
| e6f05da6ef | |||
| 1feb169bfa | |||
| dd5fd12343 | |||
| 6f54881851 | |||
| b4d17ebcbe | |||
| 8e99b3f079 | |||
| 4da9692061 | |||
| c80ac1c05d | |||
| 245c67c8c9 | |||
| b1fe8b5ab4 | |||
| e363b3a23c | |||
| c5fe16caa6 | |||
| cadd794d2c | |||
| e0da315783 | |||
| 7733159540 | |||
| 7a90d4b7c3 | |||
| b5f73f1426 | |||
| b4d120fcb4 | |||
| 6ab0addc64 | |||
| b999c8d826 | |||
| 0ebceebe37 | |||
| 3dd3695ac4 | |||
| 6c911248c9 | |||
| 4b953dee70 | |||
| f8e043b864 | |||
| 19a9718542 | |||
| 2b74662b2b | |||
| faa748d4c9 | |||
| 98996aa60b | |||
| b8b966ef80 | |||
| 5e50b493ec | |||
| 1bc6f7ef47 | |||
| 74ff79ef60 | |||
| 30b2e1e7a3 | |||
| bf2d6ab5d6 | |||
| 8b5bddcecc | |||
| 18f56ddf53 | |||
| 8d21c14592 | |||
| c68329819a | |||
| 1ed30e7394 | |||
| b592ded80a | |||
| ab4b85f88c | |||
| d9b436535a | |||
| 8df0c81807 | |||
| 87dfcd8152 | |||
| badbde5041 | |||
| a3e4481959 | |||
| 0b63509d13 | |||
| c76896dadf | |||
| 09819e75d2 | |||
| d839742415 | |||
| 1118708976 | |||
| da7b0af94b | |||
| 40bbcfebcb | |||
| 804ae299a7 | |||
| 79762f0be2 | |||
| de348ba984 | |||
| 04ed7fe7db | |||
| c6036592c9 | |||
| 3f5cf71039 | |||
| c884308da3 | |||
| ae97f04498 | |||
| 0e30a96404 | |||
| 114f374623 | |||
| 7d9a939f99 | |||
| a3ad7fa80f | |||
| 665f8b6b87 | |||
| 947c3e9f72 | |||
| 7a5caf1bc0 | |||
| 3065f47ab5 | |||
| 46a7ffc336 | |||
| 7638bcc8e9 | |||
| cf91cf4825 | |||
| b80bc06b99 | |||
| 40fc27fd55 | |||
| 4c98203d91 | |||
| f1d1d24369 | |||
| 4e8d8724b6 | |||
| 7df7d6dca7 | |||
| 9459be11a9 | |||
| fb998ff52d | |||
| d59b28d5f4 | |||
| 996e22bde9 | |||
| 99472280fb | |||
| 1573ff6803 | |||
| c7c404833f | |||
| 3466bfdf2d | |||
| 87721d0da7 | |||
| d60746ae6c | |||
| e9c4c80102 | |||
| ede4d06192 | |||
| 5762cc0958 | |||
| 7998c53396 | |||
| 52d944ec44 | |||
| 7fd126e2af | |||
| e169c35613 | |||
| 366374a3a0 | |||
| 92f11144f3 | |||
| 2b96159c9d | |||
| 60f69462fc | |||
| 6a507c0b63 | |||
| 1a598c32d9 | |||
| 687b49c18a | |||
| ac30f9b4cc | |||
| c03480cbd3 | |||
| e930c7ef64 | |||
| baddc90c26 | |||
| 31ae4096b5 | |||
| 1f8c019d1e | |||
| aed01a338e | |||
| cb9b7278d6 | |||
| 34d85329a9 | |||
| b510de34ea | |||
| 88fc1640ed | |||
| 45a5ffd056 | |||
| df8e6ea32e | |||
| ae776046fc | |||
| 5858f7c5bd | |||
| 99031f885e | |||
| 85473d942c | |||
| 05df57654f | |||
| ecbed15d47 | |||
| 0e8eedee16 | |||
| c15eb34792 | |||
| 5c73b870c1 | |||
| 948782b7e5 | |||
| a94753429c | |||
| 97f540622a | |||
| 0efc217dda | |||
| 28d6c19135 | |||
| 44d2e6a0f4 | |||
| 4f7c3610d6 | |||
| 8a60e251f4 | |||
| 4db3f142d7 | |||
| 177aeca5a1 | |||
| 530f0c0300 | |||
| 9a46b17a8b | |||
| 69334021a2 | |||
| 1906ed0df5 | |||
| 625035e214 | |||
| f67bad2346 | |||
| 8b9ce87fc7 | |||
| 628245fbf5 | |||
| c823a4d673 | |||
| 0ee7d8bc7c | |||
| adf0cdad05 | |||
| 373dd2a27e | |||
| 6d9a3e3ade | |||
| 9151187e3e | |||
| 86b0b80dfa | |||
| b59aa9af37 | |||
| f28c6d34a7 | |||
| 1a9aa675e4 | |||
| 721ce22a86 | |||
| c3b912722e | |||
| 503ec2fdb7 | |||
| cd78e080b1 | |||
| 1e2d72144a | |||
| 0576aff947 | |||
| c2f51e1de6 | |||
| 2e2e22a270 | |||
| 00aaba4d5b | |||
| c348d78e37 | |||
| db39ce2b16 | |||
| 53a481b01b | |||
| 521a382d79 | |||
| 3b5e10ef4d | |||
| 326077d2ed | |||
| 95fd38426c | |||
| 217158995a | |||
| 00f06f2480 | |||
| 83ebdbdbf4 | |||
| e6e86176dc | |||
| 1697be5e44 | |||
| be159ab93c | |||
| d46aa9f49e | |||
| e12747870b | |||
| 16b4ae8486 | |||
| 1f9f370346 | |||
| 30906f3240 | |||
| 35b9677006 | |||
| 8f7f6bffbc | |||
| fc3bb14b82 | |||
| d36da44f2b | |||
| 95ea8fd932 | |||
| 93faac9d8e | |||
| bcf08abef0 | |||
| 15d71079fe | |||
| 01ca0d2f53 | |||
| 7c343a87d1 | |||
| 74a630321b | |||
| a79c1f40c6 | |||
| 609fb27e11 | |||
| d78d8b245f | |||
| 633f0fa52a | |||
| 3483a3e134 | |||
| 27d7f55aba | |||
| 3236c09d7d | |||
| 98918b689e | |||
| 25c2b8693a | |||
| 0459569b49 | |||
| 5c7fca7405 | |||
| 9ea19ea9b0 | |||
| e6ff990145 | |||
| c8d058137a | |||
| 48088579d8 | |||
| 7360d470c9 | |||
| 73737bcc4f | |||
| dea11781a5 | |||
| e51cfe2349 | |||
| d536fa5aa4 | |||
| 476afca97d | |||
| 0352d88b8a | |||
| adc2f4ad9e | |||
| 15737d7a94 | |||
| a1f43f53b4 | |||
| a2b101ba5b | |||
| f9decb0cd6 | |||
| 85389c4bcf | |||
| 23d6764a6d | |||
| f8dd5b6b84 | |||
| c37bbb2641 | |||
| 76b87660ba | |||
| a5dc7bbfc1 | |||
| cf060b4c7d | |||
| 99bae0fb5f | |||
| 67866bd8bc | |||
| b35cd705a7 | |||
| c5d9c8be2b | |||
| cdd4349bfe | |||
| f06ee688fe | |||
| 92aa63c203 | |||
| dc79e07228 | |||
| 46165b52e5 | |||
| e6ec3f4b95 | |||
| 814d1e7f06 | |||
| 2e5f344e3c | |||
| a4984cfd40 | |||
| 26c75f31f4 | |||
| 7fedb39b4b | |||
| 5a52af20cb | |||
| 12fc9a45ef | |||
| 01d4c29ce3 | |||
| 8c97702a07 | |||
| 5a0891c69d | |||
| 392d4de8a9 | |||
| 4ce11106c8 | |||
| 4480c0ffc6 | |||
| da1686eb47 | |||
| eecd33146e | |||
| 749d940887 | |||
| c67d0f0d1d | |||
| 0fbc3581bc | |||
| d7fb15c822 | |||
| c010a95d8c | |||
| d5264673cb | |||
| 94a2827ed9 | |||
| c27cb675b7 | |||
| 263467ca3d | |||
| 3b91c20eac | |||
| 50aa947e51 | |||
| 04b7853a38 | |||
| 7f12dc2b66 | |||
| e278f38905 | |||
| f5b393fef0 | |||
| 8afd623989 | |||
| b62860b1b8 | |||
| 58cfd44307 | |||
| d8ab9c4259 | |||
| 527a99e598 | |||
| 3997cdf2f4 | |||
| 56eeda6c7c | |||
| 6d98edf89f | |||
| 21e0e3f863 | |||
| 9fdc64f7fc | |||
| 8dfb1d197a | |||
| fa16b682ef | |||
| 98148d9d60 | |||
| afe4f283ed | |||
| 2b0155dbc4 | |||
| 7624f07764 | |||
| a923ee9b87 | |||
| dca7dc8c9c | |||
| c62da2bdaa | |||
| 5e7650729b | |||
| c716776b8f | |||
| f4c705b404 | |||
| 788fef5e80 | |||
| 6f372a811b | |||
| 842599e0f9 | |||
| 58eb628571 | |||
| 35fec1c6b2 | |||
| 93ab478af1 | |||
| f70f2d7cae | |||
| 4c71bf74f1 | |||
| 7b1b3fa0cb | |||
| 7f5fd67d3a | |||
| 46b92412a7 | |||
| 72689c52a5 | |||
| 2647dc1d98 | |||
| 837febc3c3 | |||
| 9944d66165 | |||
| 9fc7c3b1b3 | |||
| 2aba6f0ba4 | |||
| 4f0842c713 | |||
| e77139c6bb | |||
| 965a85a0d3 | |||
| 5be08a4d09 | |||
| 71bdf20cff | |||
| d2931309a5 | |||
| 3c28751dee | |||
| 88e71646de | |||
| 8b5c8a2d06 | |||
| 41330b6c03 | |||
| aac214f1b0 | |||
| b4808c187f | |||
| db1be15699 | |||
| 1b255dd812 | |||
| c08908b488 | |||
| 7c23119e8f | |||
| 7687f9a06f | |||
| f699a299ad | |||
| b68dde91b8 | |||
| e5be27f756 | |||
| 8685538419 | |||
| 14dba9545e | |||
| 603c3ba533 | |||
| 5c2ab46184 | |||
| bf315637e4 | |||
| 1d5b4a80b3 | |||
| 6cf91b5bc0 | |||
| 245ea77da6 | |||
| 6de41e9383 | |||
| d413bbc5f5 | |||
| 2c85be990d | |||
| d1c6766ae1 | |||
| c7b91bc7ae | |||
| 494bc00687 | |||
| 58c36527d0 | |||
| 82b9be3297 | |||
| 4c027d458b | |||
| 53b0c5fd88 | |||
| 22b0400f5e | |||
| 3165c3c257 | |||
| 78dca145f8 | |||
| cca54a0d93 | |||
| e618a49d71 | |||
| 0c51c66bea | |||
| 2e2b647833 | |||
| f2d369732b | |||
| b47ddb09ad | |||
| 4601e0e7ec | |||
| 429a6287e0 | |||
| a097ca0906 | |||
| 6893118510 | |||
| 81ef7eb30b | |||
| 0ae09a2d44 | |||
| dc6ba8d688 | |||
| 369fd7734b | |||
| d9fc2bffdd | |||
| 1f96d57a0f | |||
| fab213a5f9 | |||
| 63b061684d | |||
| a1720b97a4 | |||
| 1c4d5fbe20 | |||
| 878be85d0c | |||
| 0e5d7c6323 | |||
| a7c17ca0c5 | |||
| 601b7c8edf | |||
| fc437410ce | |||
| 56ee5f03c7 | |||
| 2ba067e3bc | |||
| 86ac6d447c | |||
| 343e9cfad4 | |||
| 326df4840f | |||
| 90a006b362 | |||
| 5d46f3c2e7 | |||
| 0494090afa | |||
| 66e2e9c02a | |||
| 011dcf828b | |||
| 840ef37bfd | |||
| 88249f7077 | |||
| 09ec272d47 | |||
| 30367521a8 | |||
| 277c943d63 | |||
| 418b80e6c8 | |||
| a70ecff82d | |||
| fe2370a5ba | |||
| 3a17e80061 | |||
| 4d7d811252 | |||
| 05f409fbdc | |||
| 8ba1a29ee4 | |||
| 5ac59dc3b9 | |||
| 9c8babacae | |||
| 70ebd7e237 | |||
| b50ccaea12 | |||
| cfd530db0d | |||
| b0f24fd8d5 | |||
| 5e8d97ef0b | |||
| 8670b7980d | |||
| 528f780871 | |||
| 2f9431965b | |||
| 09b14437a8 | |||
| e2c34b9db7 | |||
| 9c832b388b | |||
| 9ba0671b32 | |||
| a574404a2e | |||
| 6609a9f061 | |||
| 9ce66b9d05 | |||
| cb1c16021e | |||
| 4cef9f3471 | |||
| 9a65e05748 | |||
| 68bd429edd | |||
| d877325a1e | |||
| e4509d723e | |||
| ed9825e8ca | |||
| b1d55f2c85 | |||
| c9601f1567 | |||
| 3d5f083b75 | |||
| eabaf90076 | |||
| c3deff17a6 | |||
| 44c033ccb8 | |||
| 81c42faa5a | |||
| 43d7747df6 | |||
| 650a3996ba | |||
| e8cd4d4d33 | |||
| 159ad1161f | |||
| 9b11707a52 | |||
| 3822ac74fc | |||
| 11568b158f | |||
| cbf5768e91 | |||
| 1c050bdcf4 | |||
| e229c6fe81 | |||
| c6ce7fedd5 | |||
| 9f9fdd6caa | |||
| 5986e100eb | |||
| 5d38dd5618 | |||
| 6d3138fe6b | |||
| e02148491f | |||
| b5ea2c78d6 | |||
| db7c2afe6b | |||
| 0bffcd8882 | |||
| 8ed65a96b9 | |||
| cf31119bf4 | |||
| 0c6ea4c7b2 | |||
| b55ef8d89a | |||
| 7e2bebb4d5 | |||
| 404f4c6627 | |||
| 4a1dc1abfa | |||
| c17c18e440 | |||
| fb98242e18 | |||
| 156d6fffbe | |||
| d0c351468b | |||
| 55346fbeb9 | |||
| 76e95a702f | |||
| a4bb6cea63 | |||
| 6fdef1055b | |||
| a83066bdc5 | |||
| 2406badb92 | |||
| 822705fe3e | |||
| b9e1ef1558 | |||
| fcc72575a2 | |||
| 6f374e787b | |||
| 5cdca80c0c | |||
| 489fb1783b | |||
| a1a99bef83 | |||
| 6116c0a0b4 | |||
| edcddf6561 | |||
| d9a9ede7a2 | |||
| c6e5030c61 | |||
| 1bc188b1f4 | |||
| 402445920b | |||
| 3eec04802c | |||
| 276aa563ba | |||
| 0d6cff45c3 | |||
| eeb896d648 | |||
| f37673927c | |||
| dc896f0910 | |||
| e5b05d2478 | |||
| 37dd37178f | |||
| a4e4b136c9 | |||
| 44b2f6792b | |||
| 40264c7ab3 | |||
| 62d68ce88c | |||
| 5ad1316b1e | |||
| 725892b653 | |||
| fb2fa8348d | |||
| af6487d70c | |||
| 2aa62b31b4 | |||
| e34037b015 | |||
| e860ac5cf6 | |||
| 66bd6d88de |
+43
-15
@@ -1,29 +1,33 @@
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v2
|
||||
|
||||
stages:
|
||||
- build
|
||||
- docs
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- _ccache/
|
||||
|
||||
fedora-autotools:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
|
||||
fedora-distcheck:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
variables:
|
||||
DO_DISTCHECK: "yes"
|
||||
when: manual
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
|
||||
fedora-meson: &fedora-meson-defaults
|
||||
fedora-meson:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
@@ -31,35 +35,59 @@ fedora-meson: &fedora-meson-defaults
|
||||
- "_build/meson-logs"
|
||||
- "_build/testsuite/reftests/output"
|
||||
|
||||
fedora-meson-staticlibs:
|
||||
debian-meson:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/debian-gtk3:v1
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
|
||||
<<: *fedora-meson-defaults
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
- "_build/testsuite/reftests/output"
|
||||
|
||||
msys2-mingw32-meson:
|
||||
reference:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
stage: docs
|
||||
variables:
|
||||
MSYSTEM: "MINGW32"
|
||||
EXTRA_MESON_FLAGS: "--buildtype=release -Dgtk_doc=true -Dman=true"
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
- ninja -C _build gdk3-doc gtk3-doc
|
||||
- tar -c -J -f gdk3-docs.tar.xz _build/docs/reference/gdk
|
||||
- tar -c -J -f gtk3-docs.tar.xz _build/docs/reference/gtk
|
||||
artifacts:
|
||||
paths:
|
||||
- gdk3-docs.tar.xz
|
||||
- gtk3-docs.tar.xz
|
||||
|
||||
msys2-mingw64-meson:
|
||||
variables:
|
||||
MSYSTEM: "MINGW64"
|
||||
CHERE_INVOKING: "yes"
|
||||
stage: build
|
||||
tags:
|
||||
- win32
|
||||
- win32-ps
|
||||
script:
|
||||
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-meson.sh"
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
|
||||
name: "gtk3-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
|
||||
msys2-mingw32-autotools:
|
||||
msys2-mingw64-autotools:
|
||||
when: manual
|
||||
variables:
|
||||
MSYSTEM: "MINGW32"
|
||||
MSYSTEM: "MINGW64"
|
||||
CHERE_INVOKING: "yes"
|
||||
stage: build
|
||||
tags:
|
||||
- win32
|
||||
- win32-ps
|
||||
script:
|
||||
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-autotools.sh"
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
FROM debian:buster
|
||||
|
||||
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
adwaita-icon-theme \
|
||||
ccache \
|
||||
dconf-gsettings-backend \
|
||||
g++ \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
gobject-introspection \
|
||||
gvfs \
|
||||
hicolor-icon-theme \
|
||||
itstool \
|
||||
libatk-bridge2.0-dev \
|
||||
libatk1.0-dev \
|
||||
libc6-dev \
|
||||
libcairo2-dev \
|
||||
libcairo-gobject2 \
|
||||
libcolord-dev \
|
||||
libcups2-dev \
|
||||
libegl1-mesa-dev \
|
||||
libepoxy-dev \
|
||||
libfontconfig1-dev \
|
||||
libfreetype6-dev \
|
||||
libgdk-pixbuf2.0-dev \
|
||||
libgirepository1.0-dev \
|
||||
libglib2.0-dev \
|
||||
libharfbuzz-dev \
|
||||
libjson-glib-dev \
|
||||
libpango1.0-dev \
|
||||
librest-dev \
|
||||
librsvg2-common \
|
||||
libsoup2.4-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcomposite-dev \
|
||||
libxcursor-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
libxfixes-dev \
|
||||
libxi-dev \
|
||||
libxinerama-dev \
|
||||
libxkbcommon-dev \
|
||||
libxkbcommon-x11-dev \
|
||||
libxml2-dev \
|
||||
libxrandr-dev \
|
||||
locales \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
shared-mime-info \
|
||||
wayland-protocols \
|
||||
xauth \
|
||||
xvfb \
|
||||
&& rm -rf /usr/share/doc/* /usr/share/man/*
|
||||
|
||||
# Locale for our build
|
||||
RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
||||
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM fedora:29
|
||||
FROM fedora:31
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
@@ -41,6 +41,7 @@ RUN dnf -y install \
|
||||
libxkbcommon-devel \
|
||||
libXrandr-devel \
|
||||
libXrender-devel \
|
||||
libXtst-devel \
|
||||
make \
|
||||
mesa-libEGL-devel \
|
||||
mesa-libwayland-egl-devel \
|
||||
+130
-14
@@ -1,19 +1,135 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script builds an image from the Dockerfile, starts a container with
|
||||
# the parent directory mounted as working directory and start a bash session
|
||||
# there so you can test things.
|
||||
# Once you are happy you can push it to the docker hub:
|
||||
# sudo docker push "${TAG}"
|
||||
|
||||
read_arg() {
|
||||
# $1 = arg name
|
||||
# $2 = arg value
|
||||
# $3 = arg parameter
|
||||
local rematch='^[^=]*=(.*)$'
|
||||
if [[ $2 =~ $rematch ]]; then
|
||||
read "$1" <<< "${BASH_REMATCH[1]}"
|
||||
else
|
||||
read "$1" <<< "$3"
|
||||
# There is no way to shift our callers args, so
|
||||
# return 1 to indicate they should do it instead.
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
TAG="registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v2"
|
||||
build=0
|
||||
run=0
|
||||
push=0
|
||||
list=0
|
||||
print_help=0
|
||||
no_login=0
|
||||
|
||||
# HOST_USER_ID gets used to create a user with the same ID so that files
|
||||
# created in the mounted volume have the same owner
|
||||
sudo docker build \
|
||||
--build-arg HOST_USER_ID="$UID" --tag "${TAG}" --file "Dockerfile" .
|
||||
sudo docker run --security-opt label=disable \
|
||||
--rm --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
|
||||
--tty --interactive "${TAG}" bash
|
||||
while (($# > 0)); do
|
||||
case "${1%%=*}" in
|
||||
build) build=1;;
|
||||
run) run=1;;
|
||||
push) push=1;;
|
||||
list) list=1;;
|
||||
help) print_help=1;;
|
||||
--base|-b) read_arg base "$@" || shift;;
|
||||
--base-version) read_arg base_version "$@" || shift;;
|
||||
--no-login) no_login=1;;
|
||||
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $print_help == 1 ]; then
|
||||
echo "$0 - Build and run Docker images"
|
||||
echo ""
|
||||
echo "Usage: $0 <command> [options] [basename]"
|
||||
echo ""
|
||||
echo "Available commands"
|
||||
echo ""
|
||||
echo " build --base=<BASENAME> - Build Docker image <BASENAME>.Dockerfile"
|
||||
echo " run --base=<BASENAME> - Run Docker image <BASENAME>"
|
||||
echo " push --base=<BASENAME> - Push Docker image <BASENAME> to the registry"
|
||||
echo " list - List available images"
|
||||
echo " help - This help message"
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ $list == 1 ]; then
|
||||
echo "Available Docker images:"
|
||||
for f in *.Dockerfile; do
|
||||
filename=$( basename -- "$f" )
|
||||
basename="${filename%.*}"
|
||||
|
||||
echo -e " \e[1;39m$basename\e[0m"
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# All commands after this require --base to be set
|
||||
if [ -z $base ]; then
|
||||
echo "Usage: $0 <command>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$base.Dockerfile" ]; then
|
||||
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $base_version ]; then
|
||||
base_version="latest"
|
||||
else
|
||||
base_version="v$base_version"
|
||||
fi
|
||||
|
||||
if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
|
||||
# Docker is actually implemented by podman, and its OCI output
|
||||
# is incompatible with some of the dockerd instances on GitLab
|
||||
# CI runners.
|
||||
echo "Using: Podman"
|
||||
format="--format docker"
|
||||
CMD="podman"
|
||||
else
|
||||
echo "Using: Docker"
|
||||
format=""
|
||||
CMD="sudo socker"
|
||||
fi
|
||||
|
||||
REGISTRY="registry.gitlab.gnome.org"
|
||||
TAG="${REGISTRY}/gnome/gtk/${base}:${base_version}"
|
||||
|
||||
if [ $build == 1 ]; then
|
||||
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} build \
|
||||
${format} \
|
||||
--build-arg HOST_USER_ID="$UID" \
|
||||
--tag "${TAG}" \
|
||||
--file "${base}.Dockerfile" .
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $push == 1 ]; then
|
||||
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
|
||||
|
||||
if [ $no_login == 0 ]; then
|
||||
${CMD} login ${REGISTRY}
|
||||
fi
|
||||
|
||||
${CMD} push ${TAG}
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $run == 1 ]; then
|
||||
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} run \
|
||||
--rm \
|
||||
--volume "$(pwd)/..:/home/user/app" \
|
||||
--workdir "/home/user/app" \
|
||||
--tty \
|
||||
--interactive "${TAG}" \
|
||||
bash
|
||||
exit $?
|
||||
fi
|
||||
|
||||
@@ -5,19 +5,31 @@ set -e
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
export N_PROCS=$(($(nproc) - 1))
|
||||
|
||||
EXTRA_CONFIGURE_OPT=""
|
||||
|
||||
# Only enable documentation when distchecking, since it's required
|
||||
if [ -n "${DO_DISTCHECK-}" ]; then
|
||||
EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-gtk-doc"
|
||||
fi
|
||||
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
mkdir _build
|
||||
cd _build
|
||||
../autogen.sh \
|
||||
|
||||
../configure \
|
||||
--enable-cloudproviders \
|
||||
--enable-broadway-backend \
|
||||
--enable-wayland-backend \
|
||||
--enable-x11-backend \
|
||||
--enable-xinerama \
|
||||
--enable-gtk-doc
|
||||
make -j8
|
||||
${EXTRA_CONFIGURE_OPTS}
|
||||
|
||||
make -j${N_PROCS}
|
||||
|
||||
if [ -n "${DO_DISTCHECK-}" ]; then
|
||||
make -j8 check SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
make -j8 distcheck SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
make -j${N_PROCS} check SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
make -j${N_PROCS} distcheck SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
fi
|
||||
|
||||
@@ -10,10 +10,10 @@ export PATH="${HOME}/.local/bin:${PATH}"
|
||||
python3 -m pip install --user meson==0.49.2
|
||||
|
||||
meson \
|
||||
-Dgtk_doc=true \
|
||||
-Dman=true \
|
||||
-Dinstalled_tests=true \
|
||||
-Dbroadway_backend=true \
|
||||
-Dx11_backend=true \
|
||||
-Dwayland_backend=true \
|
||||
-Dxinerama=yes \
|
||||
-Dprint_backends="file,lpr,test,cloudprint,cups" \
|
||||
${EXTRA_MESON_FLAGS:-} \
|
||||
@@ -28,5 +28,3 @@ xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
--print-errorlogs \
|
||||
--suite=gtk+-3.0 \
|
||||
--no-suite=gtk+-3.0:a11y
|
||||
|
||||
ninja gail-libgail-util3-doc gdk3-doc gtk3-doc
|
||||
|
||||
@@ -30,6 +30,9 @@ pacman --noconfirm -S --needed \
|
||||
mingw-w64-$MSYS2_ARCH-ninja \
|
||||
mingw-w64-$MSYS2_ARCH-gtk-doc
|
||||
|
||||
# https://github.com/msys2/MINGW-packages/pull/6465
|
||||
pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-brotli
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
+9
-2
@@ -2,7 +2,7 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros win32
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
@@ -16,6 +16,7 @@ EXTRA_DIST += \
|
||||
NEWS.pre-1-0 \
|
||||
README.commits \
|
||||
README.win32 \
|
||||
check-version.py \
|
||||
config.h.win32 \
|
||||
makefile.msc \
|
||||
gtk-zip.sh.in \
|
||||
@@ -28,7 +29,8 @@ EXTRA_DIST += \
|
||||
po/meson.build \
|
||||
po-properties/meson.build \
|
||||
build-aux/meson/post-install.py \
|
||||
config.h.meson
|
||||
config.h.meson \
|
||||
gtk.supp
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
|
||||
@@ -40,6 +42,10 @@ MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/gtk-doc.make \
|
||||
$(srcdir)/ChangeLog
|
||||
|
||||
if OS_UNIX
|
||||
valgrinddir = $(datadir)/gtk-3.0/valgrind
|
||||
valgrind_DATA = gtk.supp
|
||||
endif
|
||||
|
||||
## Copy .pc files to target-specific names
|
||||
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc: gtk+-3.0.pc
|
||||
@@ -79,6 +85,7 @@ DISTCLEANFILES = \
|
||||
dist-hook:
|
||||
mkdir $(distdir)/subprojects
|
||||
cp -p $(srcdir)/subprojects/*.wrap $(distdir)/subprojects
|
||||
$(top_srcdir)/check-version.py $(top_srcdir)/configure.ac $(top_srcdir)/meson.build
|
||||
|
||||
distclean-local:
|
||||
if test "$(srcdir)" = "."; then :; else \
|
||||
|
||||
@@ -1,3 +1,442 @@
|
||||
Overview of Changes in GTK+ 3.24.26
|
||||
===================================
|
||||
|
||||
* Input:
|
||||
- Fix a few oversights in Compose file parsing
|
||||
- Fine-tune Compose preedit display
|
||||
|
||||
* Theme:
|
||||
- Fine-tune scrollbar size and transitions
|
||||
- Reinstate invisible borders for tiled windows
|
||||
|
||||
* Wayland:
|
||||
- Fix a problem with font settings not being found
|
||||
|
||||
* Translation updates
|
||||
French
|
||||
Hungarian
|
||||
Turkish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.25
|
||||
===================================
|
||||
|
||||
* Settings:
|
||||
- Make cursor aspect ratio setting work
|
||||
|
||||
* Broadway:
|
||||
- Fix touchscreen event handling
|
||||
- Support Android / Chrome on-screen keyboard
|
||||
|
||||
* Windows:
|
||||
- Fix issues with Intel graphics drivers
|
||||
- Avoid UAC for gtk-update-icon-cache
|
||||
|
||||
* Wayland:
|
||||
- Avoid crashes with tablet input
|
||||
- Add api to support clients with subsurfaces better
|
||||
|
||||
* Inspector:
|
||||
- Make the inspector available in non-debug builds
|
||||
|
||||
* Theme:
|
||||
- Make scrollbars larger
|
||||
- Disable shadows on maximized, fullscreen and tiled windows
|
||||
|
||||
* Printing:
|
||||
- Support Avahi-discovered printers better
|
||||
|
||||
* Input:
|
||||
- Show preedit for compose sequences
|
||||
- Support long compose sequences
|
||||
- Support compose sequences producing multiple characters
|
||||
|
||||
* Translation updates
|
||||
Belarusian
|
||||
British English
|
||||
Catalan
|
||||
Friulian
|
||||
Galician
|
||||
Japanese
|
||||
Persian
|
||||
Serbian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.24
|
||||
===================================
|
||||
|
||||
* GtkColorChooser:
|
||||
- Update the default color palette
|
||||
|
||||
* GtkFontChooser:
|
||||
- Fix family-only mode to return regular style
|
||||
|
||||
* GtkTreeView:
|
||||
- Don't set focus-on-click for header buttons
|
||||
|
||||
* Accessibility:
|
||||
- Implement scrollSubstringTo
|
||||
- Add a11y support to GtkPlug/GtkSocket
|
||||
|
||||
* Printing:
|
||||
- Allow the lpr backend to print pdf and ps files
|
||||
|
||||
* Theme:
|
||||
- Update gesture graphics
|
||||
- Update HighContrast css
|
||||
|
||||
* Wayland:
|
||||
- Support the primary-selection-unstable-v1 protocol
|
||||
|
||||
* X11:
|
||||
- Fix a crash with parent-relative backgrounds
|
||||
|
||||
* Broadway:
|
||||
- Set modifier state of scroll events
|
||||
|
||||
* Build:
|
||||
- Fix pc file generation on NixOS
|
||||
|
||||
* OS X:
|
||||
- Restore command-key bindings
|
||||
|
||||
* Windows:
|
||||
- Fix meson build with epoxy subproject
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
Catalan
|
||||
Croatian
|
||||
Czech
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Greek
|
||||
Hebrew
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Kazakh
|
||||
Latvian
|
||||
Lithuanian
|
||||
Persian
|
||||
Polish
|
||||
Portuguese
|
||||
Slovak
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
Turkish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.23
|
||||
===================================
|
||||
|
||||
* Adwaita:
|
||||
- Support error states for labels and entries
|
||||
|
||||
* Printing:
|
||||
- Use the correct names for remote printers
|
||||
|
||||
* File choser:
|
||||
- Default to tracker2 for search to prevent
|
||||
symbol clashes in tracker-using applications
|
||||
|
||||
* Wayland:
|
||||
- Support newer schemas for settings
|
||||
- Fix DND hotspot handling
|
||||
- Disconnect on display close
|
||||
|
||||
* X11:
|
||||
- Fix a possible crash with disabled devices
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Chinese (China)
|
||||
Croatian
|
||||
Dutch
|
||||
Finnish
|
||||
Friulian
|
||||
Galician
|
||||
Hungarian
|
||||
Japanese
|
||||
Korean
|
||||
Portuguese
|
||||
Serbian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.22
|
||||
===================================
|
||||
|
||||
* GtkTextView:
|
||||
- Fix some corner cases of pixelcache invalidation
|
||||
- Make select-all work on touch
|
||||
|
||||
* Fix print portal support
|
||||
|
||||
* Adwaita:
|
||||
- Tweak title style class
|
||||
- Add a public color for text view background
|
||||
|
||||
* Windows:
|
||||
- Limit the size of the corner mask cache
|
||||
- Use native API for keycode conversion
|
||||
- Use GLES on arm64
|
||||
|
||||
* Wayland: Add a way to change the application id
|
||||
|
||||
* Quartz: Add axes to master devices
|
||||
|
||||
* Add --enable-tracker3 option to configure
|
||||
|
||||
* Translation updates:
|
||||
Catalan
|
||||
German
|
||||
Indonesian
|
||||
Italian
|
||||
Kazakh
|
||||
Spanish
|
||||
Turkish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.21
|
||||
===================================
|
||||
|
||||
* Wayland:
|
||||
- Prevent crashes with offscreen windows
|
||||
- Handle disorderly tablet/pad disconnects
|
||||
|
||||
* GtkFileChooser:
|
||||
- Translate the type column
|
||||
- Add a tracker3 search engine
|
||||
- Rate-limit trash monitoring
|
||||
- Make get_filter work for native chooser
|
||||
|
||||
* GtkGLArea:
|
||||
- Fix a redraw problem
|
||||
|
||||
* GtkScrolledWindow:
|
||||
- Fix kinetic scrolling
|
||||
|
||||
* Add a gtk-cursor-aspect-ratio setting
|
||||
|
||||
* GDK:
|
||||
- Improve frame clock smoothness
|
||||
- Fix frame clock monotonicity
|
||||
|
||||
* OS X:
|
||||
- Support Pen / Eraser input
|
||||
- Support openfiles in GtkApplication
|
||||
|
||||
* Adwaita:
|
||||
- Improve notebook tab legibility
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Brazilian Portuguese
|
||||
Catalan
|
||||
Chinese (Taiwan)
|
||||
German
|
||||
Indonesian
|
||||
Italian
|
||||
Japanese
|
||||
Kazakh
|
||||
Lithuanian
|
||||
Polish
|
||||
Romanian
|
||||
Slovak
|
||||
Slovenian
|
||||
Swedish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.20
|
||||
===================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Prevent selection changes after overwrite confirmation
|
||||
- Don't grab focus to the sidebar on click
|
||||
- Avoid a use-after-free in GtkFileSystemModel
|
||||
|
||||
* GtkEmojiChooser:
|
||||
- Remove blacklist
|
||||
|
||||
* GtkAboutDialog:
|
||||
- Add more licenses
|
||||
|
||||
* Adwaita:
|
||||
- Lower the contrast of checkboxes
|
||||
|
||||
* HighContrast:
|
||||
- Export the same public colors as Adwaita
|
||||
|
||||
* OS X:
|
||||
- Don't filter Escape in input methods
|
||||
|
||||
* Windows:
|
||||
- Infer font settings from system settings
|
||||
|
||||
* Translation updates
|
||||
Brazilian Portuguese
|
||||
Chinese
|
||||
Croatian
|
||||
French
|
||||
Japanese
|
||||
Lithuanian
|
||||
Polish
|
||||
Spanish
|
||||
Swedish
|
||||
Turkish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.18
|
||||
===================================
|
||||
|
||||
* Wayland:
|
||||
- Fix more sizing regressions in Epiphany and LibreOffice
|
||||
menus, and popups in general
|
||||
|
||||
* Build:
|
||||
- Make resource build reproducible
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
Latvian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.17
|
||||
===================================
|
||||
|
||||
* GtkFileChooser: Fix some keynav issues
|
||||
|
||||
* GtkMenuButton: disable focus-on-click
|
||||
|
||||
* Derive the HighContrast and HighContrastInverse themes from Adwaita
|
||||
|
||||
* Wayland:
|
||||
- Fix firefox sizing problems
|
||||
- Prevent Alt lingering after Alt-Tab
|
||||
- Load compose sequences from ~/.Compose
|
||||
- Fix a crash in the Wayland input method
|
||||
|
||||
* Translation updates
|
||||
Finnish
|
||||
Hebrew
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.16
|
||||
===================================
|
||||
|
||||
* Fix the build
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.15
|
||||
===================================
|
||||
|
||||
* filechooser:
|
||||
- Fix a crash
|
||||
- Support selecting directories with a new enough
|
||||
file chooser portal
|
||||
|
||||
* textview:
|
||||
- Speed up tag handling
|
||||
|
||||
* wayland:
|
||||
- Fix problems with clipboard handling
|
||||
- Fix a crash in the Wayland input method
|
||||
- Support cursor scale of 400%
|
||||
- Fix a crash in glade
|
||||
|
||||
* css: Support font-feature-settings
|
||||
|
||||
* Adwaita:
|
||||
- Use tabular figures where appropriate
|
||||
- Color tweaks for dark mode
|
||||
- Improve rendering of rounded corners
|
||||
|
||||
* Translation updates
|
||||
Dutch
|
||||
German
|
||||
Japanese
|
||||
Korean
|
||||
Lithuanian
|
||||
Norwegian Bokmål
|
||||
Persian
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.14
|
||||
===================================
|
||||
|
||||
* Fix the opaque region for windows on X11
|
||||
|
||||
* theme:
|
||||
- Fix flat buttons in backdrop
|
||||
- Make popovers look more similar to menus
|
||||
- Tweak checkbox & radiobutton appearance
|
||||
- Add general typography classes (heading, title-1, etc)
|
||||
|
||||
* language bindings:
|
||||
- Fix annotations for gtk_tree_model_sort_new_with_model
|
||||
|
||||
* switch: Fix touch support
|
||||
|
||||
* infobar: Make clickable for default action
|
||||
|
||||
* emojichooser:
|
||||
- respect a no-emoji input hint
|
||||
|
||||
* fontchooser:
|
||||
- Fix an oversight with hiding the size label
|
||||
|
||||
* filechooser:
|
||||
- Disable recursive search without a system indexer
|
||||
|
||||
* modelbutton:
|
||||
- Fix a11y support to reflect button state
|
||||
|
||||
* input:
|
||||
- Fix touchpad gesture center calculation
|
||||
|
||||
* x11:
|
||||
- Fix root window scaling
|
||||
- Support _GTK_WORKAREAS_Dn property
|
||||
|
||||
* wayland:
|
||||
- Support a terminal purpose in input methods
|
||||
- Fix preedit cursor positioning
|
||||
- Fix enabling/disabling of text inputs
|
||||
- Support simultaneous selection requests
|
||||
- Require Wayland 1.14.91
|
||||
|
||||
* OS X:
|
||||
- Fix fullscreen state
|
||||
- Fix an Inkscape crash at startup
|
||||
- Fix OpenGL extension detection
|
||||
|
||||
* Printing:
|
||||
- Fix a crash with Avahi
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
British English
|
||||
Catalan
|
||||
Finnish
|
||||
French
|
||||
Galician
|
||||
Japanese
|
||||
Kurdish Sorani
|
||||
Malay
|
||||
Russian
|
||||
Slovak
|
||||
Spanish
|
||||
Turkish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.13
|
||||
===================================
|
||||
|
||||
|
||||
+30
-15
@@ -10,15 +10,13 @@ First you obviously need developer packages for the compile-time
|
||||
dependencies: GDK-Pixbuf, Pango, atk, glib, gettext-runtime, libiconv at least.
|
||||
See http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
For people compiling GTK+ with Visual C++ 2005 or later, it is
|
||||
recommended that the same compiler is used for at least GDK-Pixbuf,
|
||||
Pango, atk and glib so that crashes and errors caused by different CRTs
|
||||
can be avoided. The VS 2008 project files and/or VS Makefiles are
|
||||
either already available or will be available in the next stable release.
|
||||
Unfortunately compiling with Microsoft's compilers versions 2003 or earlier
|
||||
is not supported as compiling the latest stable GLib (which *is* required for
|
||||
building this GTK+ release) requires features from newer compilers
|
||||
and/or Platform SDKs
|
||||
For people compiling GTK+ with Visual C++ or later, it is recommended that
|
||||
the same compiler is used for at least GDK-Pixbuf, Pango, atk and glib
|
||||
so that crashes and errors caused by different CRTs can be avoided. Currently
|
||||
building with Visual Studio 2008 or later is supported, either via Visual Studio
|
||||
project files or via the Meson build system, as described in the below sections.
|
||||
Interchanging between Visual Studio 2015, 2017 and 2019 builds should be fine
|
||||
as they use the same CRT (UCRT) DLLs.
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
@@ -152,16 +150,12 @@ would require such for ABI stability).
|
||||
2) Microsoft's tools
|
||||
--------------------
|
||||
|
||||
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
There are also VS 2008~2017 solution and project files to build GTK+, which
|
||||
There are VS 2008~2019 solution and project files to build GTK+, which
|
||||
are maintained by Chun-wei Fan. They should build GTK+ out of the box,
|
||||
provided that the afore-mentioned dependencies are installed. They will
|
||||
build GDK with the Win32 backend, GTK+ itself (with GAIL/a11y built in),
|
||||
the GAIL-Util library and the gtk-demo program. Please also refer to the
|
||||
README file(s) that reside in build/win32 on how to enable additional features
|
||||
README file(s) that reside in win32 on how to enable additional features
|
||||
that are not enabled by default, such as EGL support via libANGLE, which
|
||||
emulate the GL/EGL calls using Direct3D 9/11.
|
||||
|
||||
@@ -181,6 +175,27 @@ instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
|
||||
If desiring to build binaries for ARM64 (aarch64), one needs to use the
|
||||
Visual Studio 2017 or 2019 solution files, or use Meson with a
|
||||
cross-compilation file, with a Windows 10 SDK that supports ARM64
|
||||
builds. At this point, building the introspection files is not supported
|
||||
for ARM64 builds, and you will need a Python interpreter and
|
||||
glib-compile-resources binaries that run on the build machine. For Visual Studio
|
||||
2017 ARM64 builds, do also check the Directory.Build.props file in $(srcroot)/win32/vs15
|
||||
indicates a Windows 10 SDK version that supports ARM64 builds exists on the build machine.
|
||||
|
||||
For building ARM64 binaries with the Visual Studio projects, prior to the build,
|
||||
you may need to update gtk3-gen-srcs.props to pass in the variables GLIB_MKENUMS,
|
||||
GLIB_GENMARSHAL, GDBUS_CODEGEN and/or GLIB_COMPILE_RESOURCES in the nmake command line
|
||||
indicated by <GenerateRequiredSourcesBase> so that they point to the glib-mkenums,
|
||||
glib-genmarshal, gdbus-codegen and glib-compile-resources that will run on the build
|
||||
machine. You may also need to update gtk3-version-paths.props to update PythonDir to
|
||||
the installation of the Python interpreter that will run on the build machine. To carry
|
||||
out the actual build using the solution files, use the "Configuration Manager" to add the
|
||||
ARM64 build configs by copying the settings from the x64 configs, and then build the solution.
|
||||
The build instructions for such builds otherwise follow the standard Win32 (x86) and
|
||||
x64 builds, but you need to ensure that you have ARM64 builds of the various dependencies.
|
||||
|
||||
3) Using Meson (for Visual Studio and MinGW builds)
|
||||
---
|
||||
|
||||
|
||||
@@ -27,7 +27,13 @@ if 'DESTDIR' not in os.environ:
|
||||
shutil.copyfile(installed_lib, installed_lib_dst)
|
||||
|
||||
print('Compiling GSettings schemas...')
|
||||
subprocess.call(['glib-compile-schemas',
|
||||
glib_compile_schemas = subprocess.check_output(['pkg-config',
|
||||
'--variable=glib_compile_schemas',
|
||||
'gio-2.0']).strip()
|
||||
if not os.path.exists(glib_compile_schemas):
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
glib_compile_schemas = 'glib-compile-schemas'
|
||||
subprocess.call([glib_compile_schemas,
|
||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||
|
||||
print('Updating icon cache...')
|
||||
@@ -43,4 +49,10 @@ if 'DESTDIR' not in os.environ:
|
||||
# Untested!
|
||||
print('Updating module cache for print backends...')
|
||||
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
||||
subprocess.call(['gio-querymodules', gtk_printmodule_dir])
|
||||
gio_querymodules = subprocess.check_output(['pkg-config',
|
||||
'--variable=gio_querymodules',
|
||||
'gio-2.0']).strip()
|
||||
if not os.path.exists(gio_querymodules):
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
gio_querymodules = 'gio-querymodules'
|
||||
subprocess.call([gio_querymodules, gtk_printmodule_dir])
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
# Centralized autotools file
|
||||
# Create the Visual Studio 2012/2013/2015 project files
|
||||
# from the Visual Studio 2010 project files
|
||||
|
||||
# This autotools file, from GLib, can be used in other projects
|
||||
# that have Visual Studio build support, and is copied into
|
||||
# $(srcroot)/build/.
|
||||
|
||||
# Author: Fan, Chun-wei
|
||||
# November 05, 2012
|
||||
|
||||
# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on)
|
||||
# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017)
|
||||
# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET)
|
||||
|
||||
if MSVC_BASE_NO_TOOLSET_SET
|
||||
MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0
|
||||
endif
|
||||
|
||||
if MSVC_NO_TOOLSET_SET
|
||||
MSVC_TOOLSET = $(MSVC_VER)0
|
||||
endif
|
||||
|
||||
%.sln: $(top_builddir)/build/win32/vs10/Makefile
|
||||
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
|
||||
sed 's/2010/$(MSVC_VER_LONG)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
|
||||
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
|
||||
|
||||
%.txt: $(top_builddir)/build/win32/vs10/Makefile
|
||||
sed 's/vs10/vs$(MSVC_VER)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
|
||||
sed 's/VS10/VS$(MSVC_VER)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
|
||||
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
|
||||
|
||||
%.vcxproj: $(top_builddir)/build/win32/vs10/Makefile
|
||||
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
|
||||
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
else \
|
||||
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
fi
|
||||
|
||||
%.props: $(top_builddir)/build/win32/vs10/Makefile
|
||||
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
|
||||
sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
else \
|
||||
sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
fi
|
||||
|
||||
%.vcxproj.filters: $(top_builddir)/build/win32/vs10/Makefile
|
||||
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
|
||||
cp $(top_srcdir)/build/win32/vs10/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
else \
|
||||
cp $(top_builddir)/build/win32/vs10/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = win32
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@@ -1,222 +0,0 @@
|
||||
# NMake Makefile portion for code generation and
|
||||
# intermediate build directory creation
|
||||
# Items in here should not need to be edited unless
|
||||
# one is maintaining the NMake build files.
|
||||
|
||||
!include config-msvc.mak
|
||||
!include create-lists-msvc.mak
|
||||
|
||||
# Copy the pre-defined gdkconfig.h.[win32|win32_broadway]
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "Release"
|
||||
GDK_OLD_CFG = debug
|
||||
!else
|
||||
GDK_OLD_CFG = release
|
||||
!endif
|
||||
|
||||
!ifdef BROADWAY
|
||||
GDK_CONFIG = broadway
|
||||
GDK_DEL_CONFIG = win32
|
||||
GDK_CONFIG_TEMPLATE = ..\..\gdk\gdkconfig.h.win32_broadway
|
||||
!else
|
||||
GDK_CONFIG = win32
|
||||
GDK_DEL_CONFIG = broadway
|
||||
GDK_CONFIG_TEMPLATE = ..\..\gdk\gdkconfig.h.win32
|
||||
!endif
|
||||
|
||||
GDK_MARSHALERS_FLAGS = --prefix=_gdk_marshal --valist-marshallers
|
||||
GDK_RESOURCES_ARGS = ..\..\gdk\gdk.gresource.xml --target=$@ --sourcedir=..\..\gdk --c-name _gdk --manual-register
|
||||
GTK_MARSHALERS_FLAGS = --prefix=_gtk_marshal --valist-marshallers
|
||||
GTK_RESOURCES_ARGS = ..\..\gtk\gtk.gresource.xml --target=$@ --sourcedir=..\..\gtk --c-name _gtk --manual-register
|
||||
|
||||
all: \
|
||||
..\..\config.h \
|
||||
..\..\gdk\gdkconfig.h \
|
||||
..\..\gdk\gdkversionmacros.h \
|
||||
..\..\gdk\gdkmarshalers.h \
|
||||
..\..\gdk\gdkmarshalers.c \
|
||||
..\..\gdk\gdkresources.h \
|
||||
..\..\gdk\gdkresources.c \
|
||||
..\..\gtk\gtk-win32.rc \
|
||||
..\..\gtk\libgtk3.manifest \
|
||||
..\..\gtk\gtkdbusgenerated.h \
|
||||
..\..\gtk\gtkdbusgenerated.c \
|
||||
..\..\gtk\gtktypefuncs.inc \
|
||||
..\..\gtk\gtk.gresource.xml \
|
||||
..\..\gtk\gtkmarshalers.h \
|
||||
..\..\gtk\gtkmarshalers.c \
|
||||
..\..\gtk\gtkresources.h \
|
||||
..\..\gtk\gtkresources.c \
|
||||
..\..\demos\gtk-demo\demos.h \
|
||||
..\..\demos\gtk-demo\demo_resources.c \
|
||||
..\..\demos\icon-browser\resources.c
|
||||
|
||||
# Copy the pre-defined config.h.win32 and demos.h.win32
|
||||
..\..\config.h: ..\..\config.h.win32
|
||||
..\..\demos\gtk-demo\demos.h: ..\..\demos\gtk-demo\demos.h.win32
|
||||
..\..\gtk\gtk-win32.rc: ..\..\gtk\gtk-win32.rc.body
|
||||
|
||||
..\..\gdk-$(CFG)-$(GDK_CONFIG)-build: $(GDK_CONFIG_TEMPLATE)
|
||||
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build
|
||||
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build
|
||||
@if exist ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build
|
||||
@copy $** $@
|
||||
|
||||
..\..\gdk\gdkconfig.h: ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build
|
||||
|
||||
..\..\config.h \
|
||||
..\..\gdk\gdkconfig.h \
|
||||
..\..\gtk\gtk-win32.rc \
|
||||
..\..\demos\gtk-demo\demos.h:
|
||||
@echo Copying $@...
|
||||
@copy $** $@
|
||||
|
||||
..\..\gdk\gdkversionmacros.h: ..\..\gdk\gdkversionmacros.h.in
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) gen-gdkversionmacros-h.py --version=$(GTK_VERSION)
|
||||
|
||||
..\..\gdk\gdkmarshalers.h: ..\..\gdk\gdkmarshalers.list
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) $(GLIB_GENMARSHAL) $(GDK_MARSHALERS_FLAGS) --header $** > $@.tmp
|
||||
@move $@.tmp $@
|
||||
|
||||
..\..\gdk\gdkmarshalers.c: ..\..\gdk\gdkmarshalers.list
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) $(GLIB_GENMARSHAL) $(GDK_MARSHALERS_FLAGS) --body $** > $@.tmp
|
||||
@move $@.tmp $@
|
||||
|
||||
..\..\gdk\gdk.gresource.xml: $(GDK_RESOURCES)
|
||||
@echo Generating $@...
|
||||
@echo ^<?xml version='1.0' encoding='UTF-8'?^> >$@
|
||||
@echo ^<gresources^> >> $@
|
||||
@echo ^<gresource prefix='/org/gtk/libgdk'^> >> $@
|
||||
@for %%f in (..\..\gdk\resources\glsl\*.glsl) do @echo ^<file alias='glsl/%%~nxf'^>resources/glsl/%%~nxf^</file^> >> $@
|
||||
@echo ^</gresource^> >> $@
|
||||
@echo ^</gresources^> >> $@
|
||||
|
||||
..\..\gdk\gdkresources.h: ..\..\gdk\gdk.gresource.xml
|
||||
@echo Generating $@...
|
||||
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
|
||||
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
|
||||
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
|
||||
@$(GLIB_COMPILE_RESOURCES) $(GDK_RESOURCES_ARGS) --generate-header
|
||||
|
||||
..\..\gdk\gdkresources.c: ..\..\gdk\gdk.gresource.xml $(GDK_RESOURCES)
|
||||
@echo Generating $@...
|
||||
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
|
||||
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
|
||||
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
|
||||
@$(GLIB_COMPILE_RESOURCES) $(GDK_RESOURCES_ARGS) --generate-source
|
||||
|
||||
..\..\gtk\libgtk3.manifest: ..\..\gtk\libgtk3.manifest.in
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) replace.py \
|
||||
--action=replace-var \
|
||||
--input=$** --output=$@ \
|
||||
--var=EXE_MANIFEST_ARCHITECTURE \
|
||||
--outstring=*
|
||||
|
||||
..\..\gtk\gtkdbusgenerated.h ..\..\gtk\gtkdbusgenerated.c: ..\..\gtk\gtkdbusinterfaces.xml
|
||||
@echo Generating GTK DBus sources...
|
||||
@$(PYTHON) $(PREFIX)\bin\gdbus-codegen \
|
||||
--interface-prefix org.Gtk. --c-namespace _Gtk \
|
||||
--generate-c-code gtkdbusgenerated $** \
|
||||
--output-directory $(@D)
|
||||
|
||||
..\..\gtk\gtktypefuncs.inc: ..\..\gtk\gentypefuncs.py
|
||||
@echo Generating $@...
|
||||
@echo #undef GTK_COMPILATION > $(@R).preproc.c
|
||||
@echo #include "gtkx.h" >> $(@R).preproc.c
|
||||
@cl /EP $(GTK_PREPROCESSOR_FLAGS) $(@R).preproc.c > $(@R).combined.c
|
||||
@$(PYTHON) $** $@ $(@R).combined.c
|
||||
@del $(@R).preproc.c $(@R).combined.c
|
||||
|
||||
..\..\gtk\gtk.gresource.xml: $(GTK_RESOURCES)
|
||||
@echo Generating $@...
|
||||
@echo ^<?xml version='1.0' encoding='UTF-8'?^>> $@
|
||||
@echo ^<gresources^>>> $@
|
||||
@echo ^<gresource prefix='/org/gtk/libgtk'^>>> $@
|
||||
@echo ^<file^>theme/Adwaita/gtk.css^</file^>>> $@
|
||||
@echo ^<file^>theme/Adwaita/gtk-dark.css^</file^>>> $@
|
||||
@echo ^<file^>theme/Adwaita/gtk-contained.css^</file^>>> $@
|
||||
@echo ^<file^>theme/Adwaita/gtk-contained-dark.css^</file^>>> $@
|
||||
@for %%f in (..\..\gtk\theme\Adwaita\assets\*.png) do @echo ^<file preprocess='to-pixdata'^>theme/Adwaita/assets/%%~nxf^</file^>>> $@
|
||||
@for %%f in (..\..\gtk\theme\Adwaita\assets\*.svg) do @echo ^<file^>theme/Adwaita/assets/%%~nxf^</file^>>> $@
|
||||
@echo ^<file^>theme/HighContrast/gtk.css^</file^>>> $@
|
||||
@echo ^<file alias='theme/HighContrastInverse/gtk.css'^>theme/HighContrast/gtk-inverse.css^</file^>>> $@
|
||||
@echo ^<file^>theme/HighContrast/gtk-contained.css^</file^>>> $@
|
||||
@echo ^<file^>theme/HighContrast/gtk-contained-inverse.css^</file^>>> $@
|
||||
@for %%f in (..\..\gtk\theme\HighContrast\assets\*.png) do @echo ^<file preprocess='to-pixdata'^>theme/HighContrast/assets/%%~nxf^</file^>>> $@
|
||||
@for %%f in (..\..\gtk\theme\HighContrast\assets\*.svg) do @echo ^<file^>theme/HighContrast/assets/%%~nxf^</file^>>> $@
|
||||
@echo ^<file^>theme/win32/gtk-win32-base.css^</file^>>> $@
|
||||
@echo ^<file^>theme/win32/gtk.css^</file^>>> $@
|
||||
@for %%f in (..\..\gtk\cursor\*.png) do @echo ^<file^>cursor/%%~nxf^</file^>>> $@
|
||||
@for %%f in (..\..\gtk\gesture\*.symbolic.png) do @echo ^<file alias='icons/64x64/actions/%%~nxf'^>gesture/%%~nxf^</file^>>> $@
|
||||
@for %%f in (..\..\gtk\ui\*.ui) do @echo ^<file preprocess='xml-stripblanks'^>ui/%%~nxf^</file^>>> $@
|
||||
@for %%s in (16 22 24 32 48) do @(for %%c in (actions status categories) do @(for %%f in (..\..\gtk\icons\%%sx%%s\%%c\*.png) do @echo ^<file^>icons/%%sx%%s/%%c/%%~nxf^</file^>>> $@))
|
||||
@for %%s in (scalable) do @(for %%c in (status) do @(for %%f in (..\..\gtk\icons\%%s\%%c\*.svg) do @echo ^<file^>icons/%%s/%%c/%%~nxf^</file^>>> $@))
|
||||
@for %%f in (..\..\gtk\inspector\*.ui) do @echo ^<file compressed='true' preprocess='xml-stripblanks'^>inspector/%%~nxf^</file^>>> $@
|
||||
@echo ^<file^>inspector/logo.png^</file^>>> $@
|
||||
@echo ^<file^>emoji/emoji.data^</file^>>> $@
|
||||
@echo ^</gresource^>>> $@
|
||||
@echo ^</gresources^>>> $@
|
||||
|
||||
..\..\gtk\gtkresources.h: ..\..\gtk\gtk.gresource.xml
|
||||
@echo Generating $@...
|
||||
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
|
||||
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
|
||||
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
|
||||
@$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-header
|
||||
|
||||
..\..\gtk\gtkresources.c: ..\..\gtk\gtk.gresource.xml $(GTK_RESOURCES)
|
||||
@echo Generating $@...
|
||||
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
|
||||
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
|
||||
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
|
||||
@$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-source
|
||||
|
||||
..\..\gtk\gtkmarshalers.h: ..\..\gtk\gtkmarshalers.list
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --header $** > $@.tmp
|
||||
@move $@.tmp $@
|
||||
|
||||
..\..\gtk\gtkmarshalers.c: ..\..\gtk\gtkmarshalers.list
|
||||
@echo Generating $@...
|
||||
@echo #undef G_ENABLE_DEBUG> $@.tmp
|
||||
@$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --body $** >> $@.tmp
|
||||
@move $@.tmp $@
|
||||
|
||||
..\..\demos\gtk-demo\demo_resources.c: ..\..\demos\gtk-demo\demo.gresource.xml $(GTK_DEMO_RESOURCES)
|
||||
@echo Generating $@...
|
||||
@$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\demo.gresource.xml
|
||||
|
||||
..\..\demos\icon-browser\resources.c: ..\..\demos\icon-browser\iconbrowser.gresource.xml $(ICON_BROWSER_RESOURCES)
|
||||
@echo Generating $@...
|
||||
@$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\iconbrowser.gresource.xml
|
||||
|
||||
# Remove the generated files
|
||||
clean:
|
||||
@-del /f /q ..\..\demos\icon-browser\resources.c
|
||||
@-del /f /q ..\..\demos\gtk-demo\demo_resources.c
|
||||
@-del /f /q ..\..\demos\gtk-demo\demos.h
|
||||
@-del /f /q ..\..\gtk\gtkresources.c
|
||||
@-del /f /q ..\..\gtk\gtkresources.h
|
||||
@-del /f /q ..\..\gtk\gtkmarshalers.c
|
||||
@-del /f /q ..\..\gtk\gtkmarshalers.h
|
||||
@-del /f /q ..\..\gtk\gtk.gresource.xml
|
||||
@-del /f /q ..\..\gtk\gtktypefuncs.inc
|
||||
@-del /f /q ..\..\gtk\gtkdbusgenerated.c
|
||||
@-del /f /q ..\..\gtk\gtkdbusgenerated.h
|
||||
@-del /f /q ..\..\gtk\libgtk3.manifest
|
||||
@-del /f /q ..\..\gtk\gtk-win32.rc
|
||||
@-del /f /q ..\..\gdk\gdkresources.c
|
||||
@-del /f /q ..\..\gdk\gdkresources.h
|
||||
@-del /f /q ..\..\gdk\gdk.gresource.xml
|
||||
@-del /f /q ..\..\gdk\gdkmarshalers.c
|
||||
@-del /f /q ..\..\gdk\gdkmarshalers.h
|
||||
@-del /f /q ..\..\gdk\gdkversionmacros.h
|
||||
@-del /f /q ..\..\gdk\gdkconfig.h
|
||||
@if exist ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build
|
||||
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build
|
||||
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build
|
||||
@if exist ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build
|
||||
@-del /f /q ..\..\config.h
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc"><Filter>Resource Files</Filter></ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
#include "gtk-3.vs10.sourcefiles.filters"
|
||||
<ClCompile Include="..\..\..\modules\input\gtkimcontextime.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\gtkimcontextmultipress.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\gtkimcontextthai.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imam-et.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imcedilla.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imcyrillic-translit.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imime.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\iminuktitut.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imipa.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\immultipress.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imthai.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imti-er.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imti-et.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\imviqr.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\modules\input\thai-charprop.c"><Filter>Source Files</Filter></ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="..\..\..\gtk\libgtk3.manifest"><Filter>Resource Files</Filter></Manifest>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Executable
+200
@@ -0,0 +1,200 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
||||
try:
|
||||
configure_ac = sys.argv[1]
|
||||
except Exception:
|
||||
configure_ac = 'configure.ac'
|
||||
|
||||
try:
|
||||
meson_build = sys.argv[2]
|
||||
except Exception:
|
||||
meson_build = 'meson.build'
|
||||
|
||||
CONFIGURE_MAJOR_VERSION_RE = re.compile(
|
||||
r'''
|
||||
^
|
||||
\s*
|
||||
m4_define\(
|
||||
\s*
|
||||
\[gtk_major_version\]
|
||||
\s*
|
||||
,
|
||||
\s*
|
||||
\[
|
||||
(?P<version>[0-9]+)
|
||||
\]
|
||||
\s*
|
||||
\)
|
||||
$
|
||||
''',
|
||||
re.UNICODE | re.VERBOSE
|
||||
)
|
||||
|
||||
CONFIGURE_MINOR_VERSION_RE = re.compile(
|
||||
r'''
|
||||
^
|
||||
\s*
|
||||
m4_define\(
|
||||
\s*
|
||||
\[gtk_minor_version\]
|
||||
\s*
|
||||
,
|
||||
\s*
|
||||
\[
|
||||
(?P<version>[0-9]+)
|
||||
\]
|
||||
\s*
|
||||
\)
|
||||
$
|
||||
''',
|
||||
re.UNICODE | re.VERBOSE
|
||||
)
|
||||
|
||||
CONFIGURE_MICRO_VERSION_RE = re.compile(
|
||||
r'''
|
||||
^
|
||||
\s*
|
||||
m4_define\(
|
||||
\s*
|
||||
\[gtk_micro_version\]
|
||||
\s*
|
||||
,
|
||||
\s*
|
||||
\[
|
||||
(?P<version>[0-9]+)
|
||||
\]
|
||||
\s*
|
||||
\)
|
||||
$
|
||||
''',
|
||||
re.UNICODE | re.VERBOSE
|
||||
)
|
||||
|
||||
CONFIGURE_INTERFACE_AGE_RE = re.compile(
|
||||
r'''
|
||||
^
|
||||
\s*
|
||||
m4_define\(
|
||||
\s*
|
||||
\[gtk_interface_age\]
|
||||
\s*
|
||||
,
|
||||
\s*
|
||||
\[
|
||||
(?P<age>[0-9]+)
|
||||
\]
|
||||
\s*
|
||||
\)
|
||||
$
|
||||
''',
|
||||
re.UNICODE | re.VERBOSE
|
||||
)
|
||||
|
||||
MESON_VERSION_RE = re.compile(
|
||||
r'''
|
||||
^
|
||||
\s*
|
||||
version
|
||||
\s*
|
||||
:{1}
|
||||
\s*
|
||||
\'{1}
|
||||
(?P<major>[0-9]+)
|
||||
\.{1}
|
||||
(?P<minor>[0-9]+)
|
||||
\.{1}
|
||||
(?P<micro>[0-9]+)
|
||||
\'{1}
|
||||
\s*
|
||||
,?
|
||||
$
|
||||
''',
|
||||
re.UNICODE | re.VERBOSE
|
||||
)
|
||||
|
||||
MESON_INTERFACE_AGE_RE = re.compile(
|
||||
r'''
|
||||
^\s*gtk_interface_age\s*={1}\s*(?P<age>[0-9]+)\s*$
|
||||
''',
|
||||
re.UNICODE | re.VERBOSE
|
||||
)
|
||||
|
||||
version = {}
|
||||
|
||||
with open(configure_ac, 'r') as f:
|
||||
line = f.readline()
|
||||
while line:
|
||||
res = CONFIGURE_MAJOR_VERSION_RE.match(line)
|
||||
if res:
|
||||
if 'major' in version:
|
||||
print(f'Redefinition of major version; version is already set to {version["major"]}')
|
||||
sys.exit(1)
|
||||
version['major'] = res.group('version')
|
||||
line = f.readline()
|
||||
continue
|
||||
res = CONFIGURE_MINOR_VERSION_RE.match(line)
|
||||
if res:
|
||||
if 'minor' in version:
|
||||
print(f'Redefinition of minor version; version is already set to {version["minor"]}')
|
||||
sys.exit(1)
|
||||
version['minor'] = res.group('version')
|
||||
line = f.readline()
|
||||
continue
|
||||
res = CONFIGURE_MICRO_VERSION_RE.match(line)
|
||||
if res:
|
||||
if 'micro' in version:
|
||||
print(f'Redefinition of micro version; version is already set to {version["micro"]}')
|
||||
sys.exit(1)
|
||||
version['micro'] = res.group('version')
|
||||
line = f.readline()
|
||||
continue
|
||||
res = CONFIGURE_INTERFACE_AGE_RE.match(line)
|
||||
if res:
|
||||
if 'age' in version:
|
||||
print(f'Redefinition of interface age; age is already set to {version["age"]}')
|
||||
sys.exit(1)
|
||||
version['age'] = res.group('age')
|
||||
line = f.readline()
|
||||
continue
|
||||
if ('major', 'minor', 'micro', 'age') in version:
|
||||
break
|
||||
line = f.readline()
|
||||
|
||||
print(f'GTK version defined in {configure_ac}: {version["major"]}.{version["minor"]}.{version["micro"]} (age: {version["age"]})')
|
||||
|
||||
configure_version = version
|
||||
version = {}
|
||||
|
||||
with open(meson_build, 'r') as f:
|
||||
line = f.readline()
|
||||
inside_project = False
|
||||
while line:
|
||||
if line.startswith('project('):
|
||||
inside_project = True
|
||||
if inside_project:
|
||||
res = MESON_VERSION_RE.match(line)
|
||||
if res:
|
||||
version['major'] = res.group('major')
|
||||
version['minor'] = res.group('minor')
|
||||
version['micro'] = res.group('micro')
|
||||
if inside_project and line.endswith(')'):
|
||||
inside_project = False
|
||||
res = MESON_INTERFACE_AGE_RE.match(line)
|
||||
if res:
|
||||
version['age'] = res.group('age')
|
||||
if ('major', 'minor', 'micro', 'age') in version:
|
||||
break
|
||||
line = f.readline()
|
||||
|
||||
print(f'GTK version defined in {meson_build}: {version["major"]}.{version["minor"]}.{version["micro"]} (age: {version["age"]})')
|
||||
|
||||
meson_version = version
|
||||
|
||||
if configure_version != meson_version:
|
||||
print('Version mismatch between Autotools and Meson builds')
|
||||
sys.exit(1)
|
||||
|
||||
sys.exit(0)
|
||||
@@ -44,6 +44,9 @@
|
||||
/* Define to 1 if you have the `flockfile' function. */
|
||||
#mesondefine HAVE_FLOCKFILE
|
||||
|
||||
/* Define to 1 if you have the `fmin' function. */
|
||||
#mesondefine HAVE_FMIN
|
||||
|
||||
/* Define to 1 if you have the <ftw.h> header file. */
|
||||
#mesondefine HAVE_FTW_H
|
||||
|
||||
@@ -281,3 +284,6 @@
|
||||
#mesondefine GTK_LOCALEDIR
|
||||
|
||||
#mesondefine ISO_CODES_PREFIX
|
||||
|
||||
/* Define if tracker3 is available */
|
||||
#mesondefine HAVE_TRACKER3
|
||||
@@ -52,6 +52,11 @@
|
||||
/* Define to 1 if you have the `flockfile' function. */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
/* Define to 1 if you have the `fmin' function. */
|
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
|
||||
# define HAVE_FMIN 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <ftw.h> header file. */
|
||||
/* #undef HAVE_FTW_H */
|
||||
|
||||
|
||||
+41
-18
@@ -10,8 +10,8 @@
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [24])
|
||||
m4_define([gtk_micro_version], [13])
|
||||
m4_define([gtk_interface_age], [9])
|
||||
m4_define([gtk_micro_version], [26])
|
||||
m4_define([gtk_interface_age], [22])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -56,12 +56,12 @@ GLIB_VERSION_CFLAGS="-DGLIB_MIN_REQUIRED_VERSION=glib_min_required_version -DGLI
|
||||
|
||||
m4_define([pango_required_version], [1.41.0])
|
||||
m4_define([fribidi_required_version], [0.19.7])
|
||||
m4_define([atk_required_version], [2.15.1])
|
||||
m4_define([atk_required_version], [2.32.0])
|
||||
m4_define([cairo_required_version], [1.14.0])
|
||||
m4_define([gdk_pixbuf_required_version], [2.30.0])
|
||||
m4_define([introspection_required_version], [1.39.0])
|
||||
m4_define([wayland_required_version], [1.9.91])
|
||||
m4_define([wayland_protocols_required_version], [1.14])
|
||||
m4_define([wayland_required_version], [1.14.91])
|
||||
m4_define([wayland_protocols_required_version], [1.17])
|
||||
m4_define([epoxy_required_version], [1.4])
|
||||
m4_define([cloudproviders_required_version], [0.2.5])
|
||||
m4_define([sysprof_required_version], [3.33.2])
|
||||
@@ -843,7 +843,7 @@ AC_TYPE_UID_T
|
||||
# Check for round(), rint(), isnan() and isinf()
|
||||
# Check for log2(), exp2(), nearbyint() and trunc()
|
||||
AC_CHECK_LIB(m,round,,)
|
||||
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2 trunc)
|
||||
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2 trunc fmin)
|
||||
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
|
||||
|
||||
AC_MSG_CHECKING(whether to build dynamic modules)
|
||||
@@ -1552,6 +1552,30 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks to see if we should compile with tracker3 search engine
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(tracker3,
|
||||
[AS_HELP_STRING([--enable-tracker3],
|
||||
[enable tracker3 search engine])],
|
||||
[enable_tracker3=yes],
|
||||
[enable_tracker3=no])
|
||||
|
||||
if test "x$enable_tracker3" = "xyes"; then
|
||||
PKG_CHECK_MODULES(TRACKER3, [tracker-sparql-3.0], have_tracker3=yes, have_tracker3=no)
|
||||
GTK_DEP_CFLAGS="$GTK_DEP_CFLAGS $TRACKER3_CFLAGS"
|
||||
GTK_DEP_LIBS="$GTK_DEP_LIBS $TRACKER3_LIBS"
|
||||
if test "x$have_tracker3" = "xyes"; then
|
||||
AC_DEFINE([HAVE_TRACKER3], [], [Define if tracker3 is available])
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** tracker3 not found.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_TRACKER3, test "x$have_tracker3" = "xyes")
|
||||
|
||||
# Checks to see if we should compile with cloudprint backend for GTK+
|
||||
#
|
||||
|
||||
@@ -1940,18 +1964,17 @@ docs/reference/gtk/getting_started.xml
|
||||
docs/reference/libgail-util/Makefile
|
||||
docs/reference/libgail-util/version.xml
|
||||
docs/tools/Makefile
|
||||
build/Makefile
|
||||
build/win32/Makefile
|
||||
build/win32/config-msvc.mak
|
||||
build/win32/vs9/Makefile
|
||||
build/win32/vs9/gtk3-version-paths.vsprops
|
||||
build/win32/vs10/Makefile
|
||||
build/win32/vs10/gtk3-version-paths.props
|
||||
build/win32/vs11/Makefile
|
||||
build/win32/vs12/Makefile
|
||||
build/win32/vs14/Makefile
|
||||
build/win32/vs15/Makefile
|
||||
build/win32/vs16/Makefile
|
||||
win32/Makefile
|
||||
win32/config-msvc.mak
|
||||
win32/vs9/Makefile
|
||||
win32/vs9/gtk3-version-paths.vsprops
|
||||
win32/vs10/Makefile
|
||||
win32/vs10/gtk3-version-paths.props
|
||||
win32/vs11/Makefile
|
||||
win32/vs12/Makefile
|
||||
win32/vs14/Makefile
|
||||
win32/vs15/Makefile
|
||||
win32/vs16/Makefile
|
||||
gdk/Makefile
|
||||
gdk/broadway/Makefile
|
||||
gdk/x11/Makefile
|
||||
|
||||
@@ -116,6 +116,7 @@ EXTRA_DIST += \
|
||||
data/symbolic-source.svg \
|
||||
demo.gresource.xml \
|
||||
$(resource_files) \
|
||||
makefile.msc.in \
|
||||
org.gtk.Demo.gschema.xml \
|
||||
demos.h.win32 \
|
||||
meson.build \
|
||||
@@ -195,11 +196,11 @@ gtk3_demo_EXCLUDES = font_features.c|pagesetup.c
|
||||
gtk3_demo_application_FILES = $(gtk3_demo_application_SOURCES)
|
||||
gtk3_demo_application_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
include $(top_srcdir)/win32/Makefile.msvcproj
|
||||
|
||||
dist-hook: \
|
||||
$(top_builddir)/build/win32/vs9/gtk3-demo.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/gtk3-demo-application.vcproj
|
||||
$(top_builddir)/win32/vs9/gtk3-demo.vcproj \
|
||||
$(top_builddir)/win32/vs9/gtk3-demo-application.vcproj
|
||||
|
||||
DISTCLEANFILES = demos.h demos.h.win32
|
||||
|
||||
|
||||
@@ -96,11 +96,12 @@ drawing_area_draw (GtkWidget *widget,
|
||||
cairo_pattern_t *pat;
|
||||
cairo_matrix_t matrix;
|
||||
gdouble angle, scale;
|
||||
gdouble x_center, y_center;
|
||||
|
||||
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);
|
||||
|
||||
cairo_get_matrix (cr, &matrix);
|
||||
cairo_matrix_translate (&matrix,
|
||||
allocation.width / 2,
|
||||
allocation.height / 2);
|
||||
cairo_matrix_translate (&matrix, x_center, y_center);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_default_response (GTK_INFO_BAR (bar), GTK_RESPONSE_OK);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Question");
|
||||
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);
|
||||
|
||||
@@ -43,8 +43,8 @@ MSVCPROJS = gtk3-icon-browser
|
||||
gtk3_icon_browser_FILES = $(gtk3_icon_browser_SOURCES)
|
||||
gtk3_icon_browser_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
include $(top_srcdir)/win32/Makefile.msvcproj
|
||||
|
||||
dist-hook: $(top_builddir)/build/win32/vs9/gtk3-icon-browser.vcproj
|
||||
dist-hook: $(top_builddir)/win32/vs9/gtk3-icon-browser.vcproj
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1655,6 +1655,66 @@ adjustment3_value_changed (GtkAdjustment *adj, GtkProgressBar *pbar)
|
||||
gtk_progress_bar_set_fraction (pbar, fraction);
|
||||
}
|
||||
|
||||
static void
|
||||
validate_more_details (GtkEntry *entry,
|
||||
GParamSpec *pspec,
|
||||
GtkEntry *details)
|
||||
{
|
||||
if (strlen (gtk_entry_get_text (entry)) > 0 &&
|
||||
strlen (gtk_entry_get_text (details)) == 0)
|
||||
{
|
||||
gtk_widget_set_tooltip_text (GTK_WIDGET (entry), "Must have details first");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), "error");
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_tooltip_text (GTK_WIDGET (entry), "");
|
||||
gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), "error");
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
mode_switch_state_set (GtkSwitch *sw, gboolean state)
|
||||
{
|
||||
GtkWidget *dialog = gtk_widget_get_ancestor (GTK_WIDGET (sw), GTK_TYPE_DIALOG);
|
||||
GtkWidget *scale = GTK_WIDGET (g_object_get_data (G_OBJECT (dialog), "level_scale"));
|
||||
GtkWidget *label = GTK_WIDGET (g_object_get_data (G_OBJECT (dialog), "error_label"));
|
||||
|
||||
if (!state ||
|
||||
(gtk_range_get_value (GTK_RANGE (scale)) > 50))
|
||||
{
|
||||
gtk_widget_hide (label);
|
||||
gtk_switch_set_state (sw, state);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_show (label);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
level_scale_value_changed (GtkRange *range)
|
||||
{
|
||||
GtkWidget *dialog = gtk_widget_get_ancestor (GTK_WIDGET (range), GTK_TYPE_DIALOG);
|
||||
GtkWidget *sw = GTK_WIDGET (g_object_get_data (G_OBJECT (dialog), "mode_switch"));
|
||||
GtkWidget *label = GTK_WIDGET (g_object_get_data (G_OBJECT (dialog), "error_label"));
|
||||
|
||||
if (gtk_switch_get_active (GTK_SWITCH (sw)) &&
|
||||
!gtk_switch_get_state (GTK_SWITCH (sw)) &&
|
||||
(gtk_range_get_value (range) > 50))
|
||||
{
|
||||
gtk_widget_hide (label);
|
||||
gtk_switch_set_state (GTK_SWITCH (sw), TRUE);
|
||||
}
|
||||
else if (gtk_switch_get_state (GTK_SWITCH (sw)) &&
|
||||
(gtk_range_get_value (range) <= 50))
|
||||
{
|
||||
gtk_switch_set_state (GTK_SWITCH (sw), FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate (GApplication *app)
|
||||
{
|
||||
@@ -1722,6 +1782,9 @@ activate (GApplication *app)
|
||||
gtk_builder_add_callback_symbol (builder, "reset_icon_size", (GCallback)reset_icon_size);
|
||||
gtk_builder_add_callback_symbol (builder, "scale_format_value", (GCallback)scale_format_value);
|
||||
gtk_builder_add_callback_symbol (builder, "scale_format_value_blank", (GCallback)scale_format_value_blank);
|
||||
gtk_builder_add_callback_symbol (builder, "validate_more_details", (GCallback)validate_more_details);
|
||||
gtk_builder_add_callback_symbol (builder, "mode_switch_state_set", (GCallback)mode_switch_state_set);
|
||||
gtk_builder_add_callback_symbol (builder, "level_scale_value_changed", (GCallback)level_scale_value_changed);
|
||||
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
|
||||
@@ -1820,6 +1883,13 @@ activate (GApplication *app)
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "circular_button");
|
||||
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "level_scale");
|
||||
g_object_set_data (G_OBJECT (dialog), "level_scale", widget);
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "mode_switch");
|
||||
g_object_set_data (G_OBJECT (dialog), "mode_switch", widget);
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "error_label");
|
||||
g_object_set_data (G_OBJECT (dialog), "error_label", widget);
|
||||
|
||||
dialog = (GtkWidget *)gtk_builder_get_object (builder, "selection_dialog");
|
||||
g_object_set_data (G_OBJECT (window), "selection_dialog", dialog);
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "text3");
|
||||
|
||||
@@ -3989,6 +3989,7 @@ bad things might happen.</property>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -4012,10 +4013,12 @@ bad things might happen.</property>
|
||||
<object class="GtkEntry" id="more_details_entry">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">baseline</property>
|
||||
<signal name="notify::text" handler="validate_more_details" object="details_entry" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -4041,10 +4044,12 @@ bad things might happen.</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<signal name="value-changed" handler="level_scale_value_changed"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -4069,12 +4074,28 @@ bad things might happen.</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">baseline</property>
|
||||
<signal name="state-set" handler="mode_switch_state_set"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="error_label">
|
||||
<property name="visible">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">Level too low</property>
|
||||
<style>
|
||||
<class name="error"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -8,6 +8,7 @@ EXTRA_DIST += \
|
||||
developers.txt \
|
||||
dnd_internals.txt \
|
||||
focus_tracking.txt \
|
||||
iconcache.txt \
|
||||
RELEASE-HOWTO \
|
||||
sizing-test.txt \
|
||||
styles.txt \
|
||||
|
||||
@@ -1279,6 +1279,8 @@ GdkWaylandWindowExported
|
||||
gdk_wayland_window_export_handle
|
||||
gdk_wayland_window_unexport_handle
|
||||
gdk_wayland_window_set_transient_for_exported
|
||||
gdk_wayland_window_add_frame_callback_surface
|
||||
gdk_wayland_window_remove_frame_callback_surface
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_WAYLAND_DEVICE
|
||||
|
||||
@@ -385,6 +385,7 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/pagesetupdialog.png \
|
||||
$(srcdir)/images/placessidebar.png \
|
||||
$(srcdir)/images/popup-anchors.png \
|
||||
$(srcdir)/images/popup-at.svg \
|
||||
$(srcdir)/images/popup-flip.png \
|
||||
$(srcdir)/images/popup-slide.png \
|
||||
$(srcdir)/images/printdialog.png \
|
||||
|
||||
@@ -229,6 +229,15 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><phrase role="nowrap">font-feature-settings</phrase></entry>
|
||||
<entry><code>〈feature-tag-value〉# </code></entry>
|
||||
<entry>""</entry>
|
||||
<entry>✓</entry>
|
||||
<entry>></entry>
|
||||
<entry><ulink url="https://www.w3.org/TR/css3-fonts/#font-feature-settings-prop">CSS3</ulink></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
<tgroup cols="5">
|
||||
|
||||
@@ -36,7 +36,7 @@ How do I get started with GTK+?
|
||||
|
||||
<answer><para>
|
||||
The GTK+ <ulink url="https://www.gtk.org">website</ulink> offers some
|
||||
<ulink url="https://www.gtk.org/documentation.php">tutorials</ulink> and other
|
||||
<ulink url="https://www.gtk.org/docs/">tutorials</ulink> and other
|
||||
documentation (most of it about GTK+ 2.x, but mostly still applicable).
|
||||
More documentation ranging from whitepapers to online books can be found at
|
||||
the <ulink url="https://developer.gnome.org">GNOME developer's site</ulink>.
|
||||
@@ -77,7 +77,7 @@ specific widgets and functions.
|
||||
<para>
|
||||
If you have a question not covered in the manual, feel free to
|
||||
ask on the mailing lists and please <ulink
|
||||
url="https://bugzilla.gnome.org">file a bug report</ulink> against the
|
||||
url="https://gitlab.gnome.org/GNOME/gtk/issues/new">file a bug report</ulink> against the
|
||||
documentation.
|
||||
</para>
|
||||
|
||||
@@ -105,8 +105,8 @@ state (explained in its documentation).
|
||||
For strings returned from functions, they will be declared "const"
|
||||
if they should not be freed. Non-const strings should be
|
||||
freed with g_free(). Arrays follow the same rule. If you find an
|
||||
undocumented exception to the rules, please report a bug to <ulink
|
||||
url="https://bugzilla.gnome.org">https://bugzilla.gnome.org</ulink>.
|
||||
undocumented exception to the rules, please report a bug on <ulink
|
||||
url="https://gitlab.gnome.org/GNOME/gtk/issues/new">GitLab</ulink>.
|
||||
</para>
|
||||
|
||||
</answer>
|
||||
@@ -415,7 +415,7 @@ How do I use GTK+ with other non-C languages?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
See the <ulink url="https://www.gtk.org/language-bindings.php">list of language
|
||||
See the <ulink url="https://www.gtk.org/docs/language-bindings/">list of language
|
||||
bindings</ulink> on <ulink
|
||||
url="https://www.gtk.org">https://www.gtk.org</ulink>.
|
||||
</para>
|
||||
|
||||
@@ -134,9 +134,9 @@ additional environment variables.
|
||||
<title><envar>GTK_DEBUG</envar></title>
|
||||
|
||||
<para>
|
||||
Unless GTK+ has been configured with <option>--enable-debug=no</option>,
|
||||
this variable can be set to a list of debug options, which cause GTK+
|
||||
to print out different types of debugging information.
|
||||
This variable can be set to a list of debug options, which cause GTK to
|
||||
print out different types of debugging information. Some of these options
|
||||
are only available when GTK has been configured with <option>--enable-debug=yes</option>.
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>actions</term>
|
||||
|
||||
@@ -18,6 +18,7 @@ exampleapp_SOURCES = \
|
||||
exampleappwin.c exampleappwin.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
exampleapp.desktop \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
+12
-12
@@ -471,7 +471,7 @@ stamp-gc-h: $(top_builddir)/config.status
|
||||
# Resources
|
||||
#
|
||||
|
||||
glsl_sources := $(wildcard $(srcdir)/resources/glsl/*.glsl)
|
||||
glsl_sources := $(sort $(wildcard $(srcdir)/resources/glsl/*.glsl))
|
||||
|
||||
gdk.gresource.xml: Makefile.am
|
||||
$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
|
||||
@@ -491,10 +491,10 @@ resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --gener
|
||||
|
||||
gdkresources.h: gdk.gresource.xml
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ \
|
||||
--sourcedir=$(srcdir) --c-name _gdk --generate-header --manual-register
|
||||
--sourcedir=$(srcdir) --c-name _gdk --generate-header --manual-register --internal
|
||||
gdkresources.c: gdk.gresource.xml $(resource_files)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ \
|
||||
--sourcedir=$(srcdir) --c-name _gdk --generate-source --manual-register
|
||||
--sourcedir=$(srcdir) --c-name _gdk --generate-source --manual-register --internal
|
||||
|
||||
# ------------------- MSVC Build Items ----------------
|
||||
MSVCPROJS = gdk-3
|
||||
@@ -510,7 +510,7 @@ gdk_3_HEADERS_INST = \
|
||||
|
||||
gdk_3_HEADERS_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
include $(top_srcdir)/win32/Makefile.msvcproj
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
# Introspection Items for MSVC
|
||||
@@ -518,13 +518,13 @@ MSVC_INTROSPECT_GIRS = Gdk-3.0.gir GdkWin32-3.0.gir
|
||||
|
||||
BASE_MSVC_GIR_CFLAGS = \
|
||||
$(GDK_CFLAGS_DEFINES) \
|
||||
-I../.. -I../../gdk -I.../../gdk/win32
|
||||
-I.. -I../gdk -I../gdk/win32
|
||||
|
||||
INTROSPECTION_INTERMEDIATE_ITEMS = \
|
||||
$(top_builddir)/build/win32/Gdk-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/build/win32/Gdk_3_0_gir_list \
|
||||
$(top_builddir)/build/win32/GdkWin32-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/build/win32/GdkWin32_3_0_gir_list
|
||||
$(top_builddir)/win32/Gdk-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/win32/Gdk_3_0_gir_list \
|
||||
$(top_builddir)/win32/GdkWin32-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/win32/GdkWin32_3_0_gir_list
|
||||
|
||||
Gdk_3_0_gir_MSVC_FILES = $(introspection_files)
|
||||
Gdk_3_0_gir_MSVC_EXPORT_PACKAGES = $(Gdk_3_0_gir_EXPORT_PACKAGES)
|
||||
@@ -542,15 +542,15 @@ GdkWin32_3_0_gir_MSVC_SCANNERFLAGS = \
|
||||
--c-include="gdk/gdkwin32.h" \
|
||||
--include-uninstalled='./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin/Gdk-3.0.gir'
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvc-introspection
|
||||
include $(top_srcdir)/win32/Makefile.msvc-introspection
|
||||
|
||||
else
|
||||
INTROSPECTION_INTERMEDIATE_ITEMS =
|
||||
endif
|
||||
|
||||
dist-hook: \
|
||||
$(top_builddir)/build/win32/vs9/gdk-3.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/gdk-3.headers \
|
||||
$(top_builddir)/win32/vs9/gdk-3.vcproj \
|
||||
$(top_builddir)/win32/vs9/gdk-3.headers \
|
||||
$(INTROSPECTION_INTERMEDIATE_ITEMS)
|
||||
|
||||
DISTCLEANFILES = gdkconfig.h stamp-gc-h
|
||||
|
||||
@@ -126,11 +126,11 @@ gdk3_broadway_HEADERS_EXCLUDES = dummy
|
||||
broadwayd_FILES = $(broadwayd_SOURCES)
|
||||
broadwayd_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
include $(top_srcdir)/win32/Makefile.msvcproj
|
||||
|
||||
dist-hook: \
|
||||
$(top_builddir)/build/win32/vs9/gdk3-broadway.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/broadwayd.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/gdk3-broadway.headers
|
||||
$(top_builddir)/win32/vs9/gdk3-broadway.vcproj \
|
||||
$(top_builddir)/win32/vs9/broadwayd.vcproj \
|
||||
$(top_builddir)/win32/vs9/gdk3-broadway.headers
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
+142
-20
@@ -1,3 +1,27 @@
|
||||
/* check if we are on Android and using Chrome */
|
||||
var isAndroidChrome = false;
|
||||
{
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf("android") > -1 && ua.indexOf("chrom") > -1) {
|
||||
isAndroidChrome = true;
|
||||
}
|
||||
}
|
||||
/* check for the passive option for Event listener */
|
||||
let passiveSupported = false;
|
||||
try {
|
||||
const options = {
|
||||
get passive() { // This function will be called when the browser
|
||||
// attempts to access the passive property.
|
||||
passiveSupported = true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("test", null, options);
|
||||
window.removeEventListener("test", null, options);
|
||||
} catch(err) {
|
||||
passiveSupported = false;
|
||||
}
|
||||
/* Helper functions for debugging */
|
||||
var logDiv = null;
|
||||
function log(str) {
|
||||
@@ -10,6 +34,25 @@ function log(str) {
|
||||
logDiv.appendChild(document.createTextNode(str));
|
||||
logDiv.appendChild(document.createElement('br'));
|
||||
}
|
||||
/* Helper functions for touch identifier to make it unique on Android */
|
||||
var globalTouchIdentifier = Math.round(Date.now() / 1000);
|
||||
function touchIdentifierStart(tId)
|
||||
{
|
||||
if (isAndroidChrome) {
|
||||
if (tId == 0) {
|
||||
return ++globalTouchIdentifier;
|
||||
}
|
||||
return globalTouchIdentifier + tId;
|
||||
}
|
||||
return tId;
|
||||
}
|
||||
function touchIdentifier(tId)
|
||||
{
|
||||
if (isAndroidChrome) {
|
||||
return globalTouchIdentifier + tId;
|
||||
}
|
||||
return tId;
|
||||
}
|
||||
|
||||
function getStackTrace()
|
||||
{
|
||||
@@ -91,6 +134,7 @@ grab.window = null;
|
||||
grab.ownerEvents = false;
|
||||
grab.implicit = false;
|
||||
var keyDownList = [];
|
||||
var inputList = [];
|
||||
var lastSerial = 0;
|
||||
var lastX = 0;
|
||||
var lastY = 0;
|
||||
@@ -223,6 +267,7 @@ function cmdSetTransientFor(id, parentId)
|
||||
{
|
||||
var surface = surfaces[id];
|
||||
|
||||
if (surface === undefined) return;
|
||||
if (surface.transientParent == parentId)
|
||||
return;
|
||||
|
||||
@@ -253,8 +298,9 @@ function moveToHelper(surface, position) {
|
||||
|
||||
for (var cid in surfaces) {
|
||||
var child = surfaces[cid];
|
||||
if (child.transientParent == surface.id)
|
||||
if (child.transientParent == surface.id) {
|
||||
moveToHelper(child, stackingOrder.indexOf(surface) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,6 +315,13 @@ function cmdDeleteSurface(id)
|
||||
stackingOrder.splice(i, 1);
|
||||
var canvas = surface.canvas;
|
||||
canvas.parentNode.removeChild(canvas);
|
||||
if (id == windowWithMouse) {
|
||||
windowWithMouse = 0;
|
||||
}
|
||||
if (id == realWindowWithMouse) {
|
||||
realWindowWithMouse = 0;
|
||||
firstTouchDownId = null;
|
||||
}
|
||||
delete surfaces[id];
|
||||
}
|
||||
|
||||
@@ -307,6 +360,7 @@ function cmdRaiseSurface(id)
|
||||
{
|
||||
var surface = surfaces[id];
|
||||
|
||||
if (surface === undefined) return;
|
||||
moveToHelper(surface);
|
||||
restackWindows();
|
||||
}
|
||||
@@ -315,6 +369,7 @@ function cmdLowerSurface(id)
|
||||
{
|
||||
var surface = surfaces[id];
|
||||
|
||||
if (surface === undefined) return;
|
||||
moveToHelper(surface, 0);
|
||||
restackWindows();
|
||||
}
|
||||
@@ -520,6 +575,7 @@ function cmdPutBuffer(id, w, h, compressed)
|
||||
var data = inflate.decompress();
|
||||
|
||||
var imageData = decodeBuffer (context, surface.imageData, w, h, data, debugDecoding);
|
||||
context.imageSmoothingEnabled = false;
|
||||
context.putImageData(imageData, 0, 0);
|
||||
|
||||
if (debugDecoding)
|
||||
@@ -776,8 +832,15 @@ function getEffectiveEventTarget (id) {
|
||||
function updateKeyboardStatus() {
|
||||
if (fakeInput != null && showKeyboardChanged) {
|
||||
showKeyboardChanged = false;
|
||||
if (showKeyboard)
|
||||
if (showKeyboard) {
|
||||
if (isAndroidChrome) {
|
||||
fakeInput.blur();
|
||||
fakeInput.value = ' '.repeat(80); // TODO: Should be exchange with broadway server
|
||||
// to bring real value here.
|
||||
}
|
||||
fakeInput.focus();
|
||||
//if (isAndroidChrome) fakeInput.click();
|
||||
}
|
||||
else
|
||||
fakeInput.blur();
|
||||
}
|
||||
@@ -2329,6 +2392,19 @@ function pushKeyEvent(fev) {
|
||||
keyDownList.push(fev);
|
||||
}
|
||||
|
||||
function copyInputEvent(ev) {
|
||||
var members = ['inputType', 'data'], i, obj = {};
|
||||
for (i = 0; i < members.length; i++) {
|
||||
if (typeof ev[members[i]] !== "undefined")
|
||||
obj[members[i]] = ev[members[i]];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function pushInputEvent(fev) {
|
||||
inputList.push(fev);
|
||||
}
|
||||
|
||||
function getKeyEvent(keyCode, pop) {
|
||||
var i, fev = null;
|
||||
for (i = keyDownList.length-1; i >= 0; i--) {
|
||||
@@ -2366,8 +2442,9 @@ function handleKeyDown(e) {
|
||||
// If it is a key or key combination that might trigger
|
||||
// browser behaviors or it has no corresponding keyPress
|
||||
// event, then send it immediately
|
||||
if (!ignoreKeyEvent(ev))
|
||||
if (!ignoreKeyEvent(ev)) {
|
||||
sendInput("k", [keysym, lastState]);
|
||||
}
|
||||
suppress = true;
|
||||
}
|
||||
|
||||
@@ -2411,8 +2488,9 @@ function handleKeyPress(e) {
|
||||
}
|
||||
|
||||
// Send the translated keysym
|
||||
if (keysym > 0)
|
||||
if (keysym > 0) {
|
||||
sendInput ("k", [keysym, lastState]);
|
||||
}
|
||||
|
||||
// Stop keypress events just in case
|
||||
return cancelEvent(ev);
|
||||
@@ -2427,11 +2505,45 @@ function handleKeyUp(e) {
|
||||
keysym = fev.keysym;
|
||||
else {
|
||||
//log("Key event (keyCode = " + ev.keyCode + ") not found on keyDownList");
|
||||
if (isAndroidChrome && (ev.keyCode == 229)) {
|
||||
var i, fev = null, len = inputList.length, str;
|
||||
for (i = 0; i < len; i++) {
|
||||
fev = inputList[i];
|
||||
switch(fev.inputType) {
|
||||
case "deleteContentBackward":
|
||||
sendInput ("k", [65288, lastState]);
|
||||
sendInput ("K", [65288, lastState]);
|
||||
break;
|
||||
case "insertText":
|
||||
if (fev.data !== undefined) {
|
||||
for (let sym of fev.data) {
|
||||
sendInput ("k", [sym.codePointAt(0), lastState]);
|
||||
sendInput ("K", [sym.codePointAt(0), lastState]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
inputList.splice(0, len);
|
||||
}
|
||||
keysym = 0;
|
||||
}
|
||||
|
||||
if (keysym > 0)
|
||||
if (keysym > 0) {
|
||||
sendInput ("K", [keysym, lastState]);
|
||||
}
|
||||
return cancelEvent(ev);
|
||||
}
|
||||
|
||||
function handleInput (e) {
|
||||
var fev = null, ev = (e ? e : window.event), keysym = null, suppress = false;
|
||||
|
||||
fev = copyInputEvent(ev);
|
||||
pushInputEvent(fev);
|
||||
|
||||
// Stop keypress events just in case
|
||||
return cancelEvent(ev);
|
||||
}
|
||||
|
||||
@@ -2450,6 +2562,11 @@ function onKeyUp (ev) {
|
||||
return handleKeyUp(ev);
|
||||
}
|
||||
|
||||
function onInput (ev) {
|
||||
updateForEvent(ev);
|
||||
return handleInput(ev);
|
||||
}
|
||||
|
||||
function cancelEvent(ev)
|
||||
{
|
||||
ev = ev ? ev : window.event;
|
||||
@@ -2481,13 +2598,14 @@ function onMouseWheel(ev)
|
||||
}
|
||||
|
||||
function onTouchStart(ev) {
|
||||
event.preventDefault();
|
||||
ev.preventDefault();
|
||||
|
||||
updateKeyboardStatus();
|
||||
updateForEvent(ev);
|
||||
|
||||
for (var i = 0; i < ev.changedTouches.length; i++) {
|
||||
var touch = ev.changedTouches.item(i);
|
||||
var touchId = touchIdentifierStart(touch.identifier);
|
||||
|
||||
var origId = getSurfaceId(touch);
|
||||
var id = getEffectiveEventTarget (origId);
|
||||
@@ -2495,7 +2613,7 @@ function onTouchStart(ev) {
|
||||
var isEmulated = 0;
|
||||
|
||||
if (firstTouchDownId == null) {
|
||||
firstTouchDownId = touch.identifier;
|
||||
firstTouchDownId = touchId;
|
||||
isEmulated = 1;
|
||||
|
||||
if (realWindowWithMouse != origId || id != windowWithMouse) {
|
||||
@@ -2510,52 +2628,54 @@ function onTouchStart(ev) {
|
||||
}
|
||||
}
|
||||
|
||||
sendInput ("t", [0, id, touch.identifier, isEmulated, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState]);
|
||||
sendInput ("t", [0, id, touchId, isEmulated, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState]);
|
||||
}
|
||||
}
|
||||
|
||||
function onTouchMove(ev) {
|
||||
event.preventDefault();
|
||||
ev.preventDefault();
|
||||
|
||||
updateKeyboardStatus();
|
||||
updateForEvent(ev);
|
||||
|
||||
for (var i = 0; i < ev.changedTouches.length; i++) {
|
||||
var touch = ev.changedTouches.item(i);
|
||||
var touchId = touchIdentifier(touch.identifier);
|
||||
|
||||
var origId = getSurfaceId(touch);
|
||||
var id = getEffectiveEventTarget (origId);
|
||||
var pos = getPositionsFromEvent(touch, id);
|
||||
|
||||
var isEmulated = 0;
|
||||
if (firstTouchDownId == touch.identifier) {
|
||||
if (firstTouchDownId == touchId) {
|
||||
isEmulated = 1;
|
||||
}
|
||||
|
||||
sendInput ("t", [1, id, touch.identifier, isEmulated, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState]);
|
||||
sendInput ("t", [1, id, touchId, isEmulated, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState]);
|
||||
}
|
||||
}
|
||||
|
||||
function onTouchEnd(ev) {
|
||||
event.preventDefault();
|
||||
ev.preventDefault();
|
||||
|
||||
updateKeyboardStatus();
|
||||
updateForEvent(ev);
|
||||
|
||||
for (var i = 0; i < ev.changedTouches.length; i++) {
|
||||
var touch = ev.changedTouches.item(i);
|
||||
var touchId = touchIdentifier(touch.identifier);
|
||||
|
||||
var origId = getSurfaceId(touch);
|
||||
var id = getEffectiveEventTarget (origId);
|
||||
var pos = getPositionsFromEvent(touch, id);
|
||||
|
||||
var isEmulated = 0;
|
||||
if (firstTouchDownId == touch.identifier) {
|
||||
if (firstTouchDownId == touchId) {
|
||||
isEmulated = 1;
|
||||
firstTouchDownId = null;
|
||||
}
|
||||
|
||||
sendInput ("t", [2, id, touch.identifier, isEmulated, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState]);
|
||||
sendInput ("t", [2, id, touchId, isEmulated, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2572,11 +2692,11 @@ function setupDocument(document)
|
||||
document.onkeyup = onKeyUp;
|
||||
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener('DOMMouseScroll', onMouseWheel, false);
|
||||
document.addEventListener('mousewheel', onMouseWheel, false);
|
||||
document.addEventListener('touchstart', onTouchStart, false);
|
||||
document.addEventListener('touchmove', onTouchMove, false);
|
||||
document.addEventListener('touchend', onTouchEnd, false);
|
||||
document.addEventListener('DOMMouseScroll', onMouseWheel, passiveSupported ? { passive: false, capture: false } : false);
|
||||
document.addEventListener('mousewheel', onMouseWheel, passiveSupported ? { passive: false, capture: false } : false);
|
||||
document.addEventListener('touchstart', onTouchStart, passiveSupported ? { passive: false, capture: false } : false);
|
||||
document.addEventListener('touchmove', onTouchMove, passiveSupported ? { passive: false, capture: false } : false);
|
||||
document.addEventListener('touchend', onTouchEnd, passiveSupported ? { passive: false, capture: false } : false);
|
||||
} else if (document.attachEvent) {
|
||||
element.attachEvent("onmousewheel", onMouseWheel);
|
||||
}
|
||||
@@ -2630,12 +2750,14 @@ function connect()
|
||||
};
|
||||
|
||||
var iOS = /(iPad|iPhone|iPod)/g.test( navigator.userAgent );
|
||||
if (iOS) {
|
||||
if (iOS || isAndroidChrome) {
|
||||
fakeInput = document.createElement("input");
|
||||
fakeInput.type = "text";
|
||||
fakeInput.style.position = "absolute";
|
||||
fakeInput.style.left = "-1000px";
|
||||
fakeInput.style.top = "-1000px";
|
||||
document.body.appendChild(fakeInput);
|
||||
if (isAndroidChrome)
|
||||
fakeInput.addEventListener('input', onInput, passiveSupported ? { passive: false, capture: false } : false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,6 +224,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
event->scroll.y = message->pointer.win_y;
|
||||
event->scroll.x_root = message->pointer.root_x;
|
||||
event->scroll.y_root = message->pointer.root_y;
|
||||
event->scroll.state = message->pointer.state;
|
||||
event->scroll.direction = message->scroll.dir == 0 ? GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||
gdk_event_set_device (event, device_manager->core_pointer);
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
|
||||
@@ -104,14 +104,6 @@
|
||||
* Use this macro to guard code that is specific to the Wayland backend.
|
||||
*/
|
||||
|
||||
/**
|
||||
* GDK_DISABLE_DEPRECATION_WARNINGS:
|
||||
*
|
||||
* A macro that should be defined before including the gdk.h header.
|
||||
* If it is defined, no compiler warnings will be produced for uses
|
||||
* of deprecated GDK APIs.
|
||||
*/
|
||||
|
||||
typedef struct _GdkPredicate GdkPredicate;
|
||||
|
||||
struct _GdkPredicate
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ gdk_cursor_get_cursor_type (GdkCursor *cursor)
|
||||
*
|
||||
* Creates a new cursor from the set of builtin cursors.
|
||||
*
|
||||
* Returns: a new #GdkCursor
|
||||
* Returns: (nullable) (transfer full): a new #GdkCursor, or %NULL on failure
|
||||
*
|
||||
* Since: 2.2
|
||||
**/
|
||||
|
||||
@@ -278,6 +278,7 @@ free_pointer_info (GdkPointerWindowInfo *info)
|
||||
{
|
||||
if (info->toplevel_under_pointer)
|
||||
g_object_unref (info->toplevel_under_pointer);
|
||||
g_clear_object (&info->last_slave);
|
||||
g_slice_free (GdkPointerWindowInfo, info);
|
||||
}
|
||||
|
||||
|
||||
+10
-2
@@ -585,7 +585,7 @@ gdk_event_new (GdkEventType type)
|
||||
return new_event;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gboolean
|
||||
gdk_event_is_allocated (const GdkEvent *event)
|
||||
{
|
||||
if (event_hash)
|
||||
@@ -663,6 +663,11 @@ gdk_event_copy (const GdkEvent *event)
|
||||
new_private->source_device = private->source_device ? g_object_ref (private->source_device) : NULL;
|
||||
new_private->seat = private->seat;
|
||||
new_private->tool = private->tool;
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
new_private->translation_len = private->translation_len;
|
||||
new_private->translation = g_memdup (private->translation, private->translation_len * sizeof (private->translation[0]));
|
||||
#endif
|
||||
}
|
||||
|
||||
switch (event->any.type)
|
||||
@@ -767,6 +772,9 @@ gdk_event_free (GdkEvent *event)
|
||||
private = (GdkEventPrivate *) event;
|
||||
g_clear_object (&private->device);
|
||||
g_clear_object (&private->source_device);
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
g_free (private->translation);
|
||||
#endif
|
||||
}
|
||||
|
||||
switch (event->any.type)
|
||||
@@ -2564,4 +2572,4 @@ gdk_event_get_scancode (GdkEvent *event)
|
||||
|
||||
private = (GdkEventPrivate *) event;
|
||||
return private->key_scancode;
|
||||
}
|
||||
}
|
||||
+25
-11
@@ -505,11 +505,15 @@ _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
|
||||
GString *str;
|
||||
|
||||
gint64 previous_frame_time = 0;
|
||||
gint64 previous_smoothed_frame_time = 0;
|
||||
GdkFrameTimings *previous_timings = gdk_frame_clock_get_timings (clock,
|
||||
timings->frame_counter - 1);
|
||||
|
||||
if (previous_timings != NULL)
|
||||
previous_frame_time = previous_timings->frame_time;
|
||||
{
|
||||
previous_frame_time = previous_timings->frame_time;
|
||||
previous_smoothed_frame_time = previous_timings->smoothed_frame_time;
|
||||
}
|
||||
|
||||
str = g_string_new ("");
|
||||
|
||||
@@ -518,6 +522,9 @@ _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
|
||||
{
|
||||
g_string_append_printf (str, " interval=%-4.1f", (timings->frame_time - previous_frame_time) / 1000.);
|
||||
g_string_append_printf (str, timings->slept_before ? " (sleep)" : " ");
|
||||
g_string_append_printf (str, " smoothed=%4.1f / %-4.1f",
|
||||
(timings->smoothed_frame_time - timings->frame_time) / 1000.,
|
||||
(timings->smoothed_frame_time - previous_smoothed_frame_time) / 1000.);
|
||||
}
|
||||
if (timings->layout_start_time != 0)
|
||||
g_string_append_printf (str, " layout_start=%-4.1f", (timings->layout_start_time - timings->frame_time) / 1000.);
|
||||
@@ -525,6 +532,8 @@ _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
|
||||
g_string_append_printf (str, " paint_start=%-4.1f", (timings->paint_start_time - timings->frame_time) / 1000.);
|
||||
if (timings->frame_end_time != 0)
|
||||
g_string_append_printf (str, " frame_end=%-4.1f", (timings->frame_end_time - timings->frame_time) / 1000.);
|
||||
if (timings->drawn_time != 0)
|
||||
g_string_append_printf (str, " drawn=%-4.1f", (timings->drawn_time - timings->frame_time) / 1000.);
|
||||
if (timings->presentation_time != 0)
|
||||
g_string_append_printf (str, " present=%-4.1f", (timings->presentation_time - timings->frame_time) / 1000.);
|
||||
if (timings->predicted_presentation_time != 0)
|
||||
@@ -566,16 +575,12 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
|
||||
gint64 *presentation_time_return)
|
||||
{
|
||||
gint64 frame_counter;
|
||||
gint64 default_refresh_interval = DEFAULT_REFRESH_INTERVAL;
|
||||
|
||||
g_return_if_fail (GDK_IS_FRAME_CLOCK (frame_clock));
|
||||
|
||||
frame_counter = gdk_frame_clock_get_frame_counter (frame_clock);
|
||||
|
||||
if (presentation_time_return)
|
||||
*presentation_time_return = 0;
|
||||
if (refresh_interval_return)
|
||||
*refresh_interval_return = DEFAULT_REFRESH_INTERVAL;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
GdkFrameTimings *timings = gdk_frame_clock_get_timings (frame_clock, frame_counter);
|
||||
@@ -583,19 +588,21 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
|
||||
gint64 refresh_interval;
|
||||
|
||||
if (timings == NULL)
|
||||
return;
|
||||
break;
|
||||
|
||||
refresh_interval = timings->refresh_interval;
|
||||
presentation_time = timings->presentation_time;
|
||||
|
||||
if (refresh_interval == 0)
|
||||
refresh_interval = default_refresh_interval;
|
||||
else
|
||||
default_refresh_interval = refresh_interval;
|
||||
|
||||
if (presentation_time != 0)
|
||||
{
|
||||
if (presentation_time > base_time - MAX_HISTORY_AGE &&
|
||||
presentation_time_return)
|
||||
{
|
||||
if (refresh_interval == 0)
|
||||
refresh_interval = DEFAULT_REFRESH_INTERVAL;
|
||||
|
||||
if (refresh_interval_return)
|
||||
*refresh_interval_return = refresh_interval;
|
||||
|
||||
@@ -604,13 +611,20 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
|
||||
|
||||
if (presentation_time_return)
|
||||
*presentation_time_return = presentation_time;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
frame_counter--;
|
||||
}
|
||||
|
||||
if (presentation_time_return)
|
||||
*presentation_time_return = 0;
|
||||
if (refresh_interval_return)
|
||||
*refresh_interval_return = default_refresh_interval;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+237
-69
@@ -36,10 +36,25 @@
|
||||
|
||||
#define FRAME_INTERVAL 16667 /* microseconds */
|
||||
|
||||
typedef enum {
|
||||
SMOOTH_PHASE_STATE_VALID = 0, /* explicit, since we count on zero-init */
|
||||
SMOOTH_PHASE_STATE_AWAIT_FIRST,
|
||||
SMOOTH_PHASE_STATE_AWAIT_DRAWN,
|
||||
} SmoothDeltaState;
|
||||
|
||||
struct _GdkFrameClockIdlePrivate
|
||||
{
|
||||
gint64 frame_time;
|
||||
gint64 min_next_frame_time;
|
||||
gint64 frame_time; /* The exact time we last ran the clock cycle, or 0 if never */
|
||||
gint64 smoothed_frame_time_base; /* A grid-aligned version of frame_time (grid size == refresh period), never more than half a grid from frame_time */
|
||||
gint64 smoothed_frame_time_period; /* The grid size that smoothed_frame_time_base is aligned to */
|
||||
gint64 smoothed_frame_time_reported; /* Ensures we are always monotonic */
|
||||
gint64 smoothed_frame_time_phase; /* The offset of the first reported frame time, in the current animation sequence, from the preceding vsync */
|
||||
gint64 min_next_frame_time; /* We're not synced to vblank, so wait at least until this before next cycle to avoid busy looping */
|
||||
SmoothDeltaState smooth_phase_state; /* The state of smoothed_frame_time_phase - is it valid, awaiting vsync etc. Thanks to zero-init, the initial value
|
||||
of smoothed_frame_time_phase is `0`. This is valid, since we didn't get a "frame drawn" event yet. Accordingly,
|
||||
the initial value of smooth_phase_state is SMOOTH_PHASE_STATE_VALID. See the comment in gdk_frame_clock_paint_idle()
|
||||
for details. */
|
||||
|
||||
gint64 sleep_serial;
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
gint64 freeze_time;
|
||||
@@ -54,6 +69,7 @@ struct _GdkFrameClockIdlePrivate
|
||||
GdkFrameClockPhase phase;
|
||||
|
||||
guint in_paint_idle : 1;
|
||||
guint paint_is_thaw : 1;
|
||||
#ifdef G_OS_WIN32
|
||||
guint begin_period : 1;
|
||||
#endif
|
||||
@@ -124,8 +140,8 @@ gdk_frame_clock_idle_init (GdkFrameClockIdle *frame_clock_idle)
|
||||
frame_clock_idle->priv = priv =
|
||||
gdk_frame_clock_idle_get_instance_private (frame_clock_idle);
|
||||
|
||||
priv->frame_time = g_get_monotonic_time (); /* more sane than zero */
|
||||
priv->freeze_count = 0;
|
||||
priv->smoothed_frame_time_period = FRAME_INTERVAL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -156,44 +172,107 @@ gdk_frame_clock_idle_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (gdk_frame_clock_idle_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
/* Note: This is never called on first frame, so
|
||||
* smoothed_frame_time_base != 0 and we have a valid frame_interval. */
|
||||
static gint64
|
||||
compute_frame_time (GdkFrameClockIdle *idle)
|
||||
compute_smooth_frame_time (GdkFrameClock *clock,
|
||||
gint64 new_frame_time,
|
||||
gboolean new_frame_time_is_vsync_related,
|
||||
gint64 smoothed_frame_time_base,
|
||||
gint64 frame_interval)
|
||||
{
|
||||
GdkFrameClockIdlePrivate *priv = idle->priv;
|
||||
gint64 computed_frame_time;
|
||||
GdkFrameClockIdlePrivate *priv = GDK_FRAME_CLOCK_IDLE (clock)->priv;
|
||||
int frames_passed;
|
||||
gint64 new_smoothed_time;
|
||||
gint64 current_error;
|
||||
gint64 correction_magnitude;
|
||||
|
||||
computed_frame_time = g_get_monotonic_time ();
|
||||
/* Consecutive frame, assume it is an integer number of frames later, so round to nearest such */
|
||||
/* NOTE: This is >= 0, because smoothed_frame_time_base is < frame_interval/2 from old_frame_time
|
||||
* and new_frame_time >= old_frame_time. */
|
||||
frames_passed = (new_frame_time - smoothed_frame_time_base + frame_interval / 2) / frame_interval;
|
||||
|
||||
/* ensure monotonicity of frame time */
|
||||
if (computed_frame_time <= priv->frame_time)
|
||||
computed_frame_time = priv->frame_time + 1;
|
||||
/* We use an approximately whole number of frames in the future from
|
||||
* last smoothed frame time. This way we avoid minor jitter in the
|
||||
* frame times making the animation speed uneven, but still animate
|
||||
* evenly in case of whole frame skips. */
|
||||
new_smoothed_time = smoothed_frame_time_base + frames_passed * frame_interval;
|
||||
|
||||
return computed_frame_time;
|
||||
/* However, sometimes the smoothed time is too much off from the
|
||||
* real time. For example, if the first frame clock cycle happened
|
||||
* not due to a frame rendering but an input event, then
|
||||
* new_frame_time could happen to be near the middle between two
|
||||
* frames. If that happens and we then start regularly animating at
|
||||
* the refresh_rate, then the jitter in the real time may cause us
|
||||
* to randomly sometimes round up, and sometimes down.
|
||||
*
|
||||
* To combat this we converge the smooth time towards the real time
|
||||
* in a way that is slow when they are near and fast when they are
|
||||
* far from each other.
|
||||
*
|
||||
* This is done by using the square of the error as the correction
|
||||
* magnitude. I.e. if the error is 0.5 frame, we correct by
|
||||
* 0.5*0.5=0.25 frame, if the error is 0.25 we correct by 0.125, if
|
||||
* the error is 0.1, frame we correct by 0.01 frame, etc.
|
||||
*
|
||||
* The actual computation is:
|
||||
* (current_error/frame_interval)*(current_error/frame_interval)*frame_interval
|
||||
* But this can be simplified as below.
|
||||
*
|
||||
* Note: We only do this correction if the new frame is caused by a
|
||||
* thaw of the frame clock, so that we know the time is actually
|
||||
* related to the physical vblank. For frameclock cycles triggered
|
||||
* by other events we always step up in whole frames from the last
|
||||
* reported time.
|
||||
*/
|
||||
if (new_frame_time_is_vsync_related)
|
||||
{
|
||||
current_error = new_smoothed_time - new_frame_time;
|
||||
correction_magnitude = current_error * current_error / frame_interval; /* Note, this is always > 0 due to the square */
|
||||
if (current_error > 0)
|
||||
new_smoothed_time -= correction_magnitude;
|
||||
else
|
||||
new_smoothed_time += correction_magnitude;
|
||||
}
|
||||
|
||||
/* Ensure we're always monotonic */
|
||||
if (new_smoothed_time <= priv->smoothed_frame_time_reported)
|
||||
new_smoothed_time = priv->smoothed_frame_time_reported;
|
||||
|
||||
return new_smoothed_time;
|
||||
}
|
||||
|
||||
static gint64
|
||||
gdk_frame_clock_idle_get_frame_time (GdkFrameClock *clock)
|
||||
{
|
||||
GdkFrameClockIdlePrivate *priv = GDK_FRAME_CLOCK_IDLE (clock)->priv;
|
||||
gint64 computed_frame_time;
|
||||
gint64 now;
|
||||
gint64 new_smoothed_time;
|
||||
|
||||
/* can't change frame time during a paint */
|
||||
if (priv->phase != GDK_FRAME_CLOCK_PHASE_NONE &&
|
||||
priv->phase != GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS)
|
||||
return priv->frame_time;
|
||||
priv->phase != GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS &&
|
||||
(priv->phase != GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT || priv->in_paint_idle))
|
||||
return priv->smoothed_frame_time_base;
|
||||
|
||||
/* Outside a paint, pick something close to "now" */
|
||||
computed_frame_time = compute_frame_time (GDK_FRAME_CLOCK_IDLE (clock));
|
||||
/* Outside a paint, pick something smoothed close to now */
|
||||
now = g_get_monotonic_time ();
|
||||
|
||||
/* 16ms is 60fps. We only update frame time that often because we'd
|
||||
* like to try to keep animations on the same start times.
|
||||
* get_frame_time() would normally be used outside of a paint to
|
||||
* record an animation start time for example.
|
||||
*/
|
||||
if ((computed_frame_time - priv->frame_time) > FRAME_INTERVAL)
|
||||
priv->frame_time = computed_frame_time;
|
||||
/* First time frame, just return something */
|
||||
if (priv->smoothed_frame_time_base == 0)
|
||||
{
|
||||
priv->smoothed_frame_time_reported = now;
|
||||
return now;
|
||||
}
|
||||
|
||||
return priv->frame_time;
|
||||
/* Since time is monotonic this is <= what we will pick for the next cycle, but
|
||||
more likely than not it will be equal if we're doing a constant animation. */
|
||||
new_smoothed_time = compute_smooth_frame_time (clock, now, FALSE,
|
||||
priv->smoothed_frame_time_base,
|
||||
priv->smoothed_frame_time_period);
|
||||
|
||||
priv->smoothed_frame_time_reported = new_smoothed_time;
|
||||
return new_smoothed_time;
|
||||
}
|
||||
|
||||
#define RUN_FLUSH_IDLE(priv) \
|
||||
@@ -211,7 +290,8 @@ gdk_frame_clock_idle_get_frame_time (GdkFrameClock *clock)
|
||||
(priv)->updating_count > 0))
|
||||
|
||||
static void
|
||||
maybe_start_idle (GdkFrameClockIdle *clock_idle)
|
||||
maybe_start_idle (GdkFrameClockIdle *clock_idle,
|
||||
gboolean caused_by_thaw)
|
||||
{
|
||||
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
|
||||
|
||||
@@ -221,7 +301,7 @@ maybe_start_idle (GdkFrameClockIdle *clock_idle)
|
||||
|
||||
if (priv->min_next_frame_time != 0)
|
||||
{
|
||||
gint64 now = compute_frame_time (clock_idle);
|
||||
gint64 now = g_get_monotonic_time ();
|
||||
gint64 min_interval_us = MAX (priv->min_next_frame_time, now) - now;
|
||||
min_interval = (min_interval_us + 500) / 1000;
|
||||
}
|
||||
@@ -239,6 +319,7 @@ maybe_start_idle (GdkFrameClockIdle *clock_idle)
|
||||
if (!priv->in_paint_idle &&
|
||||
priv->paint_idle_id == 0 && RUN_PAINT_IDLE (priv))
|
||||
{
|
||||
priv->paint_is_thaw = caused_by_thaw;
|
||||
priv->paint_idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_REDRAW,
|
||||
min_interval,
|
||||
gdk_frame_clock_paint_idle,
|
||||
@@ -267,23 +348,6 @@ maybe_stop_idle (GdkFrameClockIdle *clock_idle)
|
||||
}
|
||||
}
|
||||
|
||||
static gint64
|
||||
compute_min_next_frame_time (GdkFrameClockIdle *clock_idle,
|
||||
gint64 last_frame_time)
|
||||
{
|
||||
gint64 presentation_time;
|
||||
gint64 refresh_interval;
|
||||
|
||||
gdk_frame_clock_get_refresh_info (GDK_FRAME_CLOCK (clock_idle),
|
||||
last_frame_time,
|
||||
&refresh_interval, &presentation_time);
|
||||
|
||||
if (presentation_time == 0)
|
||||
return last_frame_time + refresh_interval;
|
||||
else
|
||||
return presentation_time + refresh_interval / 2;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_frame_clock_flush_idle (void *data)
|
||||
{
|
||||
@@ -310,6 +374,25 @@ gdk_frame_clock_flush_idle (void *data)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the positive remainder.
|
||||
*
|
||||
* As an example, lets consider (-5) % 16:
|
||||
*
|
||||
* (-5) % 16 = (0 * 16) + (-5) = -5
|
||||
*
|
||||
* If we only want positive remainders, we can instead calculate
|
||||
*
|
||||
* (-5) % 16 = (1 * 16) + (-5) = 11
|
||||
*
|
||||
* The built-in `%` operator returns the former, positive_modulo() returns the latter.
|
||||
*/
|
||||
static int
|
||||
positive_modulo (int i, int n)
|
||||
{
|
||||
return (i % n + n) % n;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_frame_clock_paint_idle (void *data)
|
||||
{
|
||||
@@ -343,39 +426,103 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
gint64 frame_interval = FRAME_INTERVAL;
|
||||
gint64 reset_frame_time;
|
||||
gint64 smoothest_frame_time;
|
||||
gint64 frame_time_error;
|
||||
GdkFrameTimings *prev_timings =
|
||||
gdk_frame_clock_get_current_timings (clock);
|
||||
GdkFrameTimings *prev_timings = gdk_frame_clock_get_current_timings (clock);
|
||||
|
||||
if (prev_timings && prev_timings->refresh_interval)
|
||||
frame_interval = prev_timings->refresh_interval;
|
||||
|
||||
/* We are likely not getting precisely even callbacks in real
|
||||
* time, particularly if the event loop is busy.
|
||||
* This is a documented limitation in the precision of
|
||||
* gdk_threads_add_timeout_full and g_timeout_add_full.
|
||||
priv->frame_time = g_get_monotonic_time ();
|
||||
|
||||
/*
|
||||
* The first clock cycle of an animation might have been triggered by some external event. An external
|
||||
* event can be an input event, an expired timer, data arriving over the network etc. This can happen at
|
||||
* any time, so the cycle could have been scheduled at some random time rather then immediately after a
|
||||
* frame completion. The offset between the start of the first animation cycle and the preceding vsync is
|
||||
* called the "phase" of the clock cycle start time (not to be confused with the phase of the frame
|
||||
* clock).
|
||||
*
|
||||
* In order to avoid this imprecision from compounding between
|
||||
* frames and affecting visual smoothness, we correct frame_time
|
||||
* to more precisely match the even refresh interval of the
|
||||
* physical display. This also means we proactively avoid (most)
|
||||
* missed frames before they occur.
|
||||
* In this first clock cycle, the "smooth" frame time is simply the time when the cycle was started. This
|
||||
* could be followed by several cycles which are not vsync-related. As long as we don't get a "frame
|
||||
* drawn" signal from the compositor, the clock cycles will occur every about frame_interval. Once we do
|
||||
* get a "frame drawn" signal, from this point on the frame clock cycles will start shortly after the
|
||||
* corresponding vsync signals, again every about frame_interval. The first vsync-related clock cycle
|
||||
* might occur less than a refresh interval away from the last non-vsync-related cycle. See the diagram
|
||||
* below for details. So while the cadence stays the same - a frame clock cycle every about frame_interval
|
||||
* - the phase of the cycles start time has changed.
|
||||
*
|
||||
* Since we might have already reported the frame time to the application in the previous clock cycles, we
|
||||
* have to adjust future reported frame times. We want the first vsync-related smooth time to be separated
|
||||
* by exactly 1 frame_interval from the previous one, in order to maintain the regularity of the reported
|
||||
* frame times. To achieve that, from this point on we add the phase of the first clock cycle start time to
|
||||
* the smooth time. In order to compute that phase, accounting for possible skipped frames (e.g. due to
|
||||
* compositor stalls), we want the following to be true:
|
||||
*
|
||||
* first_vsync_smooth_time = last_non_vsync_smooth_time + frame_interval * (1 + frames_skipped)
|
||||
*
|
||||
* We can assign the following known/desired values to the above equation:
|
||||
*
|
||||
* last_non_vsync_smooth_time = smoothed_frame_time_base
|
||||
* first_vsync_smooth_time = frame_time + smoothed_frame_time_phase
|
||||
*
|
||||
* That leads us to the following, from which we can extract smoothed_frame_time_phase:
|
||||
*
|
||||
* frame_time + smoothed_frame_time_phase = smoothed_frame_time_base +
|
||||
* frame_interval * (1 + frames_skipped)
|
||||
*
|
||||
* In the following diagram, '|' mark a vsync, '*' mark the start of a clock cycle, '+' is the adjusted
|
||||
* frame time, '!' marks the reception of "frame drawn" events from the compositor. Note that the clock
|
||||
* cycle cadence changed after the first vsync-related cycle. This cadence is kept even if we don't
|
||||
* receive a 'frame drawn' signal in a subsequent frame, since then we schedule the clock at intervals of
|
||||
* refresh_interval.
|
||||
*
|
||||
* vsync | | | | | |...
|
||||
* frame drawn | | |! |! | |...
|
||||
* cycle start | * | * |* |* |* |...
|
||||
* adjusted times | * | * | + | + | + |...
|
||||
* phase ^------^
|
||||
*/
|
||||
smoothest_frame_time = priv->frame_time + frame_interval;
|
||||
reset_frame_time = compute_frame_time (clock_idle);
|
||||
frame_time_error = ABS (reset_frame_time - smoothest_frame_time);
|
||||
if (frame_time_error >= frame_interval)
|
||||
priv->frame_time = reset_frame_time;
|
||||
if (priv->smooth_phase_state == SMOOTH_PHASE_STATE_AWAIT_FIRST)
|
||||
{
|
||||
/* First animation cycle - usually unrelated to vsync */
|
||||
priv->smoothed_frame_time_base = 0;
|
||||
priv->smoothed_frame_time_phase = 0;
|
||||
priv->smooth_phase_state = SMOOTH_PHASE_STATE_AWAIT_DRAWN;
|
||||
}
|
||||
else if (priv->smooth_phase_state == SMOOTH_PHASE_STATE_AWAIT_DRAWN &&
|
||||
priv->paint_is_thaw)
|
||||
{
|
||||
/* First vsync-related animation cycle, we can now compute the phase. We want the phase to satisfy
|
||||
0 <= phase < frame_interval */
|
||||
priv->smoothed_frame_time_phase =
|
||||
positive_modulo (priv->smoothed_frame_time_base - priv->frame_time,
|
||||
frame_interval);
|
||||
priv->smooth_phase_state = SMOOTH_PHASE_STATE_VALID;
|
||||
}
|
||||
|
||||
if (priv->smoothed_frame_time_base == 0)
|
||||
{
|
||||
/* First frame ever, or first cycle in a new animation sequence. Ensure monotonicity */
|
||||
priv->smoothed_frame_time_base = MAX (priv->frame_time, priv->smoothed_frame_time_reported);
|
||||
}
|
||||
else
|
||||
priv->frame_time = smoothest_frame_time;
|
||||
{
|
||||
/* compute_smooth_frame_time() ensures monotonicity */
|
||||
priv->smoothed_frame_time_base =
|
||||
compute_smooth_frame_time (clock, priv->frame_time + priv->smoothed_frame_time_phase,
|
||||
priv->paint_is_thaw,
|
||||
priv->smoothed_frame_time_base,
|
||||
priv->smoothed_frame_time_period);
|
||||
}
|
||||
|
||||
priv->smoothed_frame_time_period = frame_interval;
|
||||
priv->smoothed_frame_time_reported = priv->smoothed_frame_time_base;
|
||||
|
||||
_gdk_frame_clock_begin_frame (clock);
|
||||
/* Note "current" is different now so timings != prev_timings */
|
||||
timings = gdk_frame_clock_get_current_timings (clock);
|
||||
|
||||
timings->frame_time = priv->frame_time;
|
||||
timings->smoothed_frame_time = priv->smoothed_frame_time_base;
|
||||
timings->slept_before = priv->sleep_serial != get_sleep_serial ();
|
||||
|
||||
priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
|
||||
@@ -496,9 +643,20 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
*/
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
priv->min_next_frame_time = compute_min_next_frame_time (clock_idle,
|
||||
priv->frame_time);
|
||||
maybe_start_idle (clock_idle);
|
||||
/*
|
||||
* If we don't receive "frame drawn" events, smooth_cycle_start will simply be advanced in constant increments of
|
||||
* the refresh interval. That way we get absolute target times for the next cycles, which should prevent skewing
|
||||
* in the scheduling of the frame clock.
|
||||
*
|
||||
* Once we do receive "frame drawn" events, smooth_cycle_start will track the vsync, and do so in a more stable
|
||||
* way compared to frame_time. If we then no longer receive "frame drawn" events, smooth_cycle_start will again be
|
||||
* simply advanced in increments of the refresh interval, but this time we are in sync with the vsync. If we start
|
||||
* receiving "frame drawn" events shortly after loosing them, then we should still be in sync.
|
||||
*/
|
||||
gint64 smooth_cycle_start = priv->smoothed_frame_time_base - priv->smoothed_frame_time_phase;
|
||||
priv->min_next_frame_time = smooth_cycle_start + priv->smoothed_frame_time_period;
|
||||
|
||||
maybe_start_idle (clock_idle, FALSE);
|
||||
}
|
||||
|
||||
if (priv->freeze_count == 0)
|
||||
@@ -515,7 +673,7 @@ gdk_frame_clock_idle_request_phase (GdkFrameClock *clock,
|
||||
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
|
||||
|
||||
priv->requested |= phase;
|
||||
maybe_start_idle (clock_idle);
|
||||
maybe_start_idle (clock_idle, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -533,8 +691,13 @@ gdk_frame_clock_idle_begin_updating (GdkFrameClock *clock)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (priv->updating_count == 0)
|
||||
{
|
||||
priv->smooth_phase_state = SMOOTH_PHASE_STATE_AWAIT_FIRST;
|
||||
}
|
||||
|
||||
priv->updating_count++;
|
||||
maybe_start_idle (clock_idle);
|
||||
maybe_start_idle (clock_idle, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -548,6 +711,11 @@ gdk_frame_clock_idle_end_updating (GdkFrameClock *clock)
|
||||
priv->updating_count--;
|
||||
maybe_stop_idle (clock_idle);
|
||||
|
||||
if (priv->updating_count == 0)
|
||||
{
|
||||
priv->smooth_phase_state = SMOOTH_PHASE_STATE_VALID;
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
if (priv->updating_count == 0 && priv->begin_period)
|
||||
{
|
||||
@@ -586,7 +754,7 @@ gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
|
||||
priv->freeze_count--;
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
maybe_start_idle (clock_idle);
|
||||
maybe_start_idle (clock_idle, TRUE);
|
||||
/* If nothing is requested so we didn't start an idle, we need
|
||||
* to skip to the end of the state chain, since the idle won't
|
||||
* run and do it for us.
|
||||
|
||||
@@ -89,6 +89,7 @@ struct _GdkFrameTimings
|
||||
gint64 frame_counter;
|
||||
guint64 cookie;
|
||||
gint64 frame_time;
|
||||
gint64 smoothed_frame_time;
|
||||
gint64 drawn_time;
|
||||
gint64 presentation_time;
|
||||
gint64 refresh_interval;
|
||||
|
||||
+3
-3
@@ -812,10 +812,10 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
}
|
||||
else
|
||||
{
|
||||
has_npot = epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
|
||||
has_texture_rectangle = epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
|
||||
has_npot = priv->gl_version >= 20 || epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
|
||||
has_texture_rectangle = priv->gl_version >= 31 || epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
|
||||
|
||||
priv->has_gl_framebuffer_blit = epoxy_has_gl_extension ("GL_EXT_framebuffer_blit");
|
||||
priv->has_gl_framebuffer_blit = priv->gl_version >= 30 || epoxy_has_gl_extension ("GL_EXT_framebuffer_blit");
|
||||
priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator");
|
||||
priv->has_unpack_subimage = TRUE;
|
||||
|
||||
|
||||
@@ -192,6 +192,11 @@ struct _GdkEventPrivate
|
||||
GdkSeat *seat;
|
||||
GdkDeviceTool *tool;
|
||||
guint16 key_scancode;
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
gunichar2 *translation;
|
||||
guint translation_len;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct _GdkWindowPaint GdkWindowPaint;
|
||||
@@ -413,6 +418,10 @@ void gdk_event_set_scancode (GdkEvent *event,
|
||||
void gdk_event_set_seat (GdkEvent *event,
|
||||
GdkSeat *seat);
|
||||
|
||||
/* The IME IM module needs this symbol exported. */
|
||||
_GDK_EXTERN
|
||||
gboolean gdk_event_is_allocated (const GdkEvent *event);
|
||||
|
||||
void _gdk_event_emit (GdkEvent *event);
|
||||
GList* _gdk_event_queue_find_first (GdkDisplay *display);
|
||||
void _gdk_event_queue_remove_link (GdkDisplay *display,
|
||||
|
||||
@@ -274,6 +274,10 @@
|
||||
#define GDK_dead_invertedbreve 0xfe6d
|
||||
#define GDK_dead_belowcomma 0xfe6e
|
||||
#define GDK_dead_currency 0xfe6f
|
||||
#define GDK_dead_lowline 0xfe90
|
||||
#define GDK_dead_aboveverticalline 0xfe91
|
||||
#define GDK_dead_belowverticalline 0xfe92
|
||||
#define GDK_dead_longsolidusoverlay 0xfe93
|
||||
#define GDK_dead_a 0xfe80
|
||||
#define GDK_dead_A 0xfe81
|
||||
#define GDK_dead_e 0xfe82
|
||||
@@ -2279,6 +2283,10 @@
|
||||
#define GDK_TouchpadOn 0x1008ffb0
|
||||
#define GDK_TouchpadOff 0x1008ffb1
|
||||
#define GDK_AudioMicMute 0x1008ffb2
|
||||
#define GDK_Keyboard 0x1008ffb3
|
||||
#define GDK_WWAN 0x1008ffb4
|
||||
#define GDK_RFKill 0x1008ffb5
|
||||
#define GDK_AudioPreset 0x1008ffb6
|
||||
#define GDK_Switch_VT_1 0x1008fe01
|
||||
#define GDK_Switch_VT_2 0x1008fe02
|
||||
#define GDK_Switch_VT_3 0x1008fe03
|
||||
|
||||
@@ -283,6 +283,10 @@
|
||||
#define GDK_KEY_dead_invertedbreve 0xfe6d
|
||||
#define GDK_KEY_dead_belowcomma 0xfe6e
|
||||
#define GDK_KEY_dead_currency 0xfe6f
|
||||
#define GDK_KEY_dead_lowline 0xfe90
|
||||
#define GDK_KEY_dead_aboveverticalline 0xfe91
|
||||
#define GDK_KEY_dead_belowverticalline 0xfe92
|
||||
#define GDK_KEY_dead_longsolidusoverlay 0xfe93
|
||||
#define GDK_KEY_dead_a 0xfe80
|
||||
#define GDK_KEY_dead_A 0xfe81
|
||||
#define GDK_KEY_dead_e 0xfe82
|
||||
@@ -2288,6 +2292,10 @@
|
||||
#define GDK_KEY_TouchpadOn 0x1008ffb0
|
||||
#define GDK_KEY_TouchpadOff 0x1008ffb1
|
||||
#define GDK_KEY_AudioMicMute 0x1008ffb2
|
||||
#define GDK_KEY_Keyboard 0x1008ffb3
|
||||
#define GDK_KEY_WWAN 0x1008ffb4
|
||||
#define GDK_KEY_RFKill 0x1008ffb5
|
||||
#define GDK_KEY_AudioPreset 0x1008ffb6
|
||||
#define GDK_KEY_Switch_VT_1 0x1008fe01
|
||||
#define GDK_KEY_Switch_VT_2 0x1008fe02
|
||||
#define GDK_KEY_Switch_VT_3 0x1008fe03
|
||||
|
||||
@@ -644,6 +644,16 @@ gdk_offscreen_window_set_wmfunctions (GdkWindow *window,
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_offscreen_window_begin_move_drag (GdkWindow *window,
|
||||
GdkDevice *device,
|
||||
gint button,
|
||||
gint root_x,
|
||||
gint root_y,
|
||||
guint32 timestamp)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_offscreen_window_set_transient_for (GdkWindow *window,
|
||||
GdkWindow *another)
|
||||
@@ -754,7 +764,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
|
||||
impl_class->get_decorations = NULL;
|
||||
impl_class->set_functions = gdk_offscreen_window_set_wmfunctions;
|
||||
impl_class->begin_resize_drag = NULL;
|
||||
impl_class->begin_move_drag = NULL;
|
||||
impl_class->begin_move_drag = gdk_offscreen_window_begin_move_drag;
|
||||
impl_class->enable_synchronized_configure = gdk_offscreen_window_do_nothing;
|
||||
impl_class->configure_finished = NULL;
|
||||
impl_class->set_opacity = gdk_offscreen_window_set_opacity;
|
||||
|
||||
@@ -288,6 +288,7 @@ gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
|
||||
if (cairo_surface_status (surface) || dest == NULL)
|
||||
{
|
||||
cairo_surface_destroy (surface);
|
||||
g_clear_object (&dest);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -396,6 +396,7 @@ gdk_seat_default_remove_slave (GdkSeatDefault *seat,
|
||||
priv->capabilities |= device_get_capability (GDK_DEVICE (l->data));
|
||||
|
||||
gdk_seat_device_removed (GDK_SEAT (seat), device);
|
||||
g_object_unref (device);
|
||||
}
|
||||
else if (g_list_find (priv->slave_keyboards, device))
|
||||
{
|
||||
@@ -405,6 +406,7 @@ gdk_seat_default_remove_slave (GdkSeatDefault *seat,
|
||||
priv->capabilities &= ~GDK_SEAT_CAPABILITY_KEYBOARD;
|
||||
|
||||
gdk_seat_device_removed (GDK_SEAT (seat), device);
|
||||
g_object_unref (device);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -9931,7 +9931,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
|
||||
|
||||
if (source_device != pointer_info->last_slave &&
|
||||
gdk_device_get_device_type (source_device) == GDK_DEVICE_TYPE_SLAVE)
|
||||
pointer_info->last_slave = source_device;
|
||||
g_set_object (&pointer_info->last_slave, source_device);
|
||||
else if (pointer_info->last_slave)
|
||||
source_device = pointer_info->last_slave;
|
||||
}
|
||||
@@ -10200,7 +10200,7 @@ gdk_window_create_similar_surface (GdkWindow * window,
|
||||
* gdk_window_create_similar_image_surface:
|
||||
* @window: (nullable): window to make new surface similar to, or
|
||||
* %NULL if none
|
||||
* @format: (type int): the format for the new surface
|
||||
* @format: the format for the new surface
|
||||
* @width: width of the new surface
|
||||
* @height: height of the new surface
|
||||
* @scale: the scale of the new surface, or 0 to use same as @window
|
||||
|
||||
+3
-332
@@ -185,9 +185,9 @@
|
||||
|
||||
-(void)doCommandBySelector: (SEL)aSelector
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("doCommandBySelector"));
|
||||
if ([self respondsToSelector: aSelector])
|
||||
[self performSelector: aSelector];
|
||||
GDK_NOTE (EVENTS, g_message ("doCommandBySelector %s", aSelector));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertText: (id)aString replacementRange: (NSRange)replacementRange
|
||||
@@ -246,335 +246,6 @@
|
||||
_gdk_quartz_synthesize_null_key_event(gdk_window);
|
||||
}
|
||||
}
|
||||
|
||||
-(void)deleteBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteToBeginningOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteToBeginningOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteToEndOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteToEndOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteWordBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteWordBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteWordForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteWordForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertBacktab: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("insertBacktab"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertNewline: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("insertNewline"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY, GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertTab: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("insertTab"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveBackwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveBackwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveDown: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveDown"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveDownAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveDownAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveForwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveForwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveLeft: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveLeft"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveLeftAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveLeftAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveRight: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveRight"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveRightAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveRightAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfDocument: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocument"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfDocumentAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocumentAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfLineAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLineAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfDocument: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocument"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfDocumentAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocumentAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfLineAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfLineAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveUp: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveUp"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveUpAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveUpAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordBackwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordBackwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordForwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordForwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordLeft: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordLeft"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordLeftAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordLeftAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordRight: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordRight"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordRightAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordRightAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageDown: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageDown"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageDownAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageDownAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageUp: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageUp"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageUpAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageUpAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)scrollPageDown: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("scrollPageDown"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)scrollPageUp: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("scrollPageUp"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectAll: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("selectAll"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("selectLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectWord: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("selectWord"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)noop: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("noop"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
|
||||
-(void)dealloc
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "gdkquartzcursor.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
#include "gdkinternal-quartz.h"
|
||||
#include "gdkquartz-gtk-only.h"
|
||||
|
||||
#include "xcursors.h"
|
||||
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
struct _GdkQuartzDeviceCore
|
||||
{
|
||||
GdkDevice parent_instance;
|
||||
|
||||
gboolean active;
|
||||
NSUInteger device_id;
|
||||
unsigned long long unique_id;
|
||||
};
|
||||
|
||||
struct _GdkQuartzDeviceCoreClass
|
||||
@@ -364,3 +368,36 @@ gdk_quartz_device_core_select_window_events (GdkDevice *device,
|
||||
{
|
||||
/* The mask is set in the common code. */
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_device_core_set_active (GdkDevice *device,
|
||||
gboolean active,
|
||||
NSUInteger device_id)
|
||||
{
|
||||
GdkQuartzDeviceCore *self = GDK_QUARTZ_DEVICE_CORE (device);
|
||||
|
||||
self->active = active;
|
||||
self->device_id = device_id;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_quartz_device_core_is_active (GdkDevice *device,
|
||||
NSUInteger device_id)
|
||||
{
|
||||
GdkQuartzDeviceCore *self = GDK_QUARTZ_DEVICE_CORE (device);
|
||||
|
||||
return (self->active && self->device_id == device_id);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_device_core_set_unique (GdkDevice *device,
|
||||
unsigned long long unique_id)
|
||||
{
|
||||
GDK_QUARTZ_DEVICE_CORE (device)->unique_id = unique_id;
|
||||
}
|
||||
|
||||
unsigned long long
|
||||
_gdk_quartz_device_core_get_unique (GdkDevice *device)
|
||||
{
|
||||
return GDK_QUARTZ_DEVICE_CORE (device)->unique_id;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,20 @@
|
||||
#include "gdkquartzdevice-core.h"
|
||||
#include "gdkkeysyms.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
#include "gdkinternal-quartz.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
|
||||
GDK_QUARTZ_POINTER_DEVICE_TYPE_CURSOR = NSCursorPointingDevice,
|
||||
GDK_QUARTZ_POINTER_DEVICE_TYPE_ERASER = NSEraserPointingDevice,
|
||||
GDK_QUARTZ_POINTER_DEVICE_TYPE_PEN = NSPenPointingDevice,
|
||||
#else
|
||||
GDK_QUARTZ_POINTER_DEVICE_TYPE_CURSOR = NSPointingDeviceTypeCursor,
|
||||
GDK_QUARTZ_POINTER_DEVICE_TYPE_ERASER = NSPointingDeviceTypeEraser,
|
||||
GDK_QUARTZ_POINTER_DEVICE_TYPE_PEN = NSPointingDeviceTypePen,
|
||||
#endif
|
||||
} GdkQuartzPointerDeviceType;
|
||||
|
||||
#define HAS_FOCUS(toplevel) \
|
||||
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
|
||||
@@ -87,6 +100,7 @@ create_core_keyboard (GdkDeviceManager *device_manager,
|
||||
static void
|
||||
gdk_quartz_device_manager_core_init (GdkQuartzDeviceManagerCore *device_manager)
|
||||
{
|
||||
device_manager->known_tablet_devices = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -99,6 +113,8 @@ gdk_quartz_device_manager_core_finalize (GObject *object)
|
||||
g_object_unref (quartz_device_manager_core->core_pointer);
|
||||
g_object_unref (quartz_device_manager_core->core_keyboard);
|
||||
|
||||
g_list_free_full (quartz_device_manager_core->known_tablet_devices, g_object_unref);
|
||||
|
||||
G_OBJECT_CLASS (gdk_quartz_device_manager_core_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@@ -127,16 +143,25 @@ static GList *
|
||||
gdk_quartz_device_manager_core_list_devices (GdkDeviceManager *device_manager,
|
||||
GdkDeviceType type)
|
||||
{
|
||||
GdkQuartzDeviceManagerCore *quartz_device_manager_core;
|
||||
GdkQuartzDeviceManagerCore *self;
|
||||
GList *devices = NULL;
|
||||
GList *l;
|
||||
|
||||
self = GDK_QUARTZ_DEVICE_MANAGER_CORE (device_manager);
|
||||
|
||||
if (type == GDK_DEVICE_TYPE_MASTER)
|
||||
{
|
||||
quartz_device_manager_core = (GdkQuartzDeviceManagerCore *) device_manager;
|
||||
devices = g_list_prepend (devices, quartz_device_manager_core->core_keyboard);
|
||||
devices = g_list_prepend (devices, quartz_device_manager_core->core_pointer);
|
||||
devices = g_list_prepend (devices, self->core_keyboard);
|
||||
devices = g_list_prepend (devices, self->core_pointer);
|
||||
}
|
||||
|
||||
for (l = self->known_tablet_devices; l; l = g_list_next (l))
|
||||
{
|
||||
devices = g_list_prepend (devices, GDK_DEVICE (l->data));
|
||||
}
|
||||
|
||||
devices = g_list_reverse (devices);
|
||||
|
||||
return devices;
|
||||
}
|
||||
|
||||
@@ -148,3 +173,200 @@ gdk_quartz_device_manager_core_get_client_pointer (GdkDeviceManager *device_mana
|
||||
quartz_device_manager_core = (GdkQuartzDeviceManagerCore *) device_manager;
|
||||
return quartz_device_manager_core->core_pointer;
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
create_core_device (GdkDeviceManager *device_manager,
|
||||
const gchar *device_name,
|
||||
GdkInputSource source)
|
||||
{
|
||||
GdkDisplay *display = gdk_device_manager_get_display (device_manager);
|
||||
GdkDevice *device = g_object_new (GDK_TYPE_QUARTZ_DEVICE_CORE,
|
||||
"name", device_name,
|
||||
"type", GDK_DEVICE_TYPE_SLAVE,
|
||||
"input-source", source,
|
||||
"input-mode", GDK_MODE_DISABLED,
|
||||
"has-cursor", FALSE,
|
||||
"display", display,
|
||||
"device-manager", device_manager,
|
||||
NULL);
|
||||
|
||||
_gdk_device_add_axis (device, GDK_NONE, GDK_AXIS_PRESSURE, 0.0, 1.0, 0.001);
|
||||
_gdk_device_add_axis (device, GDK_NONE, GDK_AXIS_XTILT, -1.0, 1.0, 0.001);
|
||||
_gdk_device_add_axis (device, GDK_NONE, GDK_AXIS_YTILT, -1.0, 1.0, 0.001);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
static void
|
||||
mimic_device_axes (GdkDevice *logical,
|
||||
GdkDevice *physical)
|
||||
{
|
||||
double axis_min, axis_max, axis_resolution;
|
||||
GdkAtom axis_label;
|
||||
GdkAxisUse axis_use;
|
||||
int axis_count;
|
||||
int i;
|
||||
|
||||
axis_count = gdk_device_get_n_axes (physical);
|
||||
|
||||
for (i = 0; i < axis_count; i++)
|
||||
{
|
||||
_gdk_device_get_axis_info (physical, i, &axis_label, &axis_use, &axis_min,
|
||||
&axis_max, &axis_resolution);
|
||||
_gdk_device_add_axis (logical, axis_label, axis_use, axis_min,
|
||||
axis_max, axis_resolution);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
translate_device_axes (GdkDevice *source_device,
|
||||
gboolean active)
|
||||
{
|
||||
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
|
||||
GdkDevice *core_pointer = gdk_seat_get_pointer (seat);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (core_pointer));
|
||||
|
||||
_gdk_device_reset_axes (core_pointer);
|
||||
if (active && source_device)
|
||||
{
|
||||
mimic_device_axes (core_pointer, source_device);
|
||||
}
|
||||
else
|
||||
{
|
||||
_gdk_device_add_axis (core_pointer, GDK_NONE, GDK_AXIS_X, 0, 0, 1);
|
||||
_gdk_device_add_axis (core_pointer, GDK_NONE, GDK_AXIS_Y, 0, 0, 1);
|
||||
}
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (core_pointer));
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_device_manager_register_device_for_ns_event (GdkDeviceManager *device_manager,
|
||||
NSEvent *nsevent)
|
||||
{
|
||||
GdkQuartzDeviceManagerCore *self = GDK_QUARTZ_DEVICE_MANAGER_CORE (device_manager);
|
||||
GList *l = NULL;
|
||||
GdkInputSource input_source = GDK_SOURCE_MOUSE;
|
||||
GdkDevice *device = NULL;
|
||||
|
||||
/* Only handle device updates for proximity events */
|
||||
if ([nsevent type] != GDK_QUARTZ_EVENT_TABLET_PROXIMITY &&
|
||||
[nsevent subtype] != GDK_QUARTZ_EVENT_SUBTYPE_TABLET_PROXIMITY)
|
||||
return;
|
||||
|
||||
if ([nsevent pointingDeviceType] == GDK_QUARTZ_POINTER_DEVICE_TYPE_PEN)
|
||||
input_source = GDK_SOURCE_PEN;
|
||||
else if ([nsevent pointingDeviceType] == GDK_QUARTZ_POINTER_DEVICE_TYPE_CURSOR)
|
||||
input_source = GDK_SOURCE_CURSOR;
|
||||
else if ([nsevent pointingDeviceType] == GDK_QUARTZ_POINTER_DEVICE_TYPE_ERASER)
|
||||
input_source = GDK_SOURCE_ERASER;
|
||||
|
||||
for (l = self->known_tablet_devices; l; l = g_list_next (l))
|
||||
{
|
||||
GdkDevice *device_to_check = GDK_DEVICE (l->data);
|
||||
|
||||
if (input_source == gdk_device_get_source (device_to_check) &&
|
||||
[nsevent uniqueID] == _gdk_quartz_device_core_get_unique (device_to_check))
|
||||
{
|
||||
device = device_to_check;
|
||||
if ([nsevent isEnteringProximity])
|
||||
{
|
||||
if (!_gdk_quartz_device_core_is_active (device, [nsevent deviceID]))
|
||||
self->num_active_devices++;
|
||||
|
||||
_gdk_quartz_device_core_set_active (device, TRUE, [nsevent deviceID]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_gdk_quartz_device_core_is_active (device, [nsevent deviceID]))
|
||||
self->num_active_devices--;
|
||||
|
||||
_gdk_quartz_device_core_set_active (device, FALSE, [nsevent deviceID]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we haven't seen this device before, add it */
|
||||
if (!device)
|
||||
{
|
||||
GdkSeat *seat;
|
||||
|
||||
switch (input_source)
|
||||
{
|
||||
case GDK_SOURCE_PEN:
|
||||
device = create_core_device (device_manager,
|
||||
"Quartz Pen",
|
||||
GDK_SOURCE_PEN);
|
||||
break;
|
||||
case GDK_SOURCE_CURSOR:
|
||||
device = create_core_device (device_manager,
|
||||
"Quartz Cursor",
|
||||
GDK_SOURCE_CURSOR);
|
||||
break;
|
||||
case GDK_SOURCE_ERASER:
|
||||
device = create_core_device (device_manager,
|
||||
"Quartz Eraser",
|
||||
GDK_SOURCE_ERASER);
|
||||
break;
|
||||
default:
|
||||
g_warning ("GDK Quarz unknown input source: %i", input_source);
|
||||
break;
|
||||
}
|
||||
|
||||
_gdk_device_set_associated_device (GDK_DEVICE (device), self->core_pointer);
|
||||
_gdk_device_add_slave (self->core_pointer, GDK_DEVICE (device));
|
||||
|
||||
seat = gdk_device_get_seat (self->core_pointer);
|
||||
gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), device);
|
||||
|
||||
_gdk_quartz_device_core_set_unique (device, [nsevent uniqueID]);
|
||||
_gdk_quartz_device_core_set_active (device, TRUE, [nsevent deviceID]);
|
||||
|
||||
self->known_tablet_devices = g_list_append (self->known_tablet_devices,
|
||||
device);
|
||||
|
||||
if ([nsevent isEnteringProximity])
|
||||
{
|
||||
if (!_gdk_quartz_device_core_is_active (device, [nsevent deviceID]))
|
||||
self->num_active_devices++;
|
||||
_gdk_quartz_device_core_set_active (device, TRUE, [nsevent deviceID]);
|
||||
}
|
||||
}
|
||||
|
||||
translate_device_axes (device, [nsevent isEnteringProximity]);
|
||||
|
||||
if (self->num_active_devices)
|
||||
[NSEvent setMouseCoalescingEnabled: FALSE];
|
||||
else
|
||||
[NSEvent setMouseCoalescingEnabled: TRUE];
|
||||
}
|
||||
|
||||
GdkDevice *
|
||||
_gdk_quartz_device_manager_core_device_for_ns_event (GdkDeviceManager *device_manager,
|
||||
NSEvent *nsevent)
|
||||
{
|
||||
GdkQuartzDeviceManagerCore *self = GDK_QUARTZ_DEVICE_MANAGER_CORE (device_manager);
|
||||
GdkDevice *device = NULL;
|
||||
|
||||
if ([nsevent type] == GDK_QUARTZ_EVENT_TABLET_PROXIMITY ||
|
||||
[nsevent subtype] == GDK_QUARTZ_EVENT_SUBTYPE_TABLET_PROXIMITY ||
|
||||
[nsevent subtype] == GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT)
|
||||
{
|
||||
/* Find the device based on deviceID */
|
||||
GList *l = NULL;
|
||||
|
||||
for (l = self->known_tablet_devices; l && !device; l = g_list_next (l))
|
||||
{
|
||||
GdkDevice *device_to_check = GDK_DEVICE (l->data);
|
||||
|
||||
if (_gdk_quartz_device_core_is_active (device_to_check, [nsevent deviceID]))
|
||||
device = device_to_check;
|
||||
}
|
||||
}
|
||||
|
||||
if (!device)
|
||||
device = self->core_pointer;
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <gdkdevicemanagerprivate.h>
|
||||
#include "gdkquartzdevicemanager-core.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
struct _GdkQuartzDeviceManagerCore
|
||||
@@ -30,6 +32,8 @@ struct _GdkQuartzDeviceManagerCore
|
||||
GdkDeviceManager parent_object;
|
||||
GdkDevice *core_pointer;
|
||||
GdkDevice *core_keyboard;
|
||||
GList *known_tablet_devices;
|
||||
guint num_active_devices;
|
||||
};
|
||||
|
||||
struct _GdkQuartzDeviceManagerCoreClass
|
||||
@@ -37,6 +41,12 @@ struct _GdkQuartzDeviceManagerCoreClass
|
||||
GdkDeviceManagerClass parent_class;
|
||||
};
|
||||
|
||||
void _gdk_quartz_device_manager_register_device_for_ns_event (GdkDeviceManager *device_manager,
|
||||
NSEvent *nsevent);
|
||||
|
||||
GdkDevice *_gdk_quartz_device_manager_core_device_for_ns_event (GdkDeviceManager *device_manager,
|
||||
NSEvent *ns_event);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_QUARTZ_DEVICE_MANAGER__ */
|
||||
|
||||
@@ -88,9 +88,6 @@ _gdk_quartz_display_open (const gchar *display_name)
|
||||
if (_gdk_display != NULL)
|
||||
return NULL;
|
||||
|
||||
/* Initialize application */
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
_gdk_display = g_object_new (gdk_quartz_display_get_type (), NULL);
|
||||
_gdk_display->device_manager = _gdk_device_manager_new (_gdk_display);
|
||||
|
||||
@@ -101,6 +98,8 @@ _gdk_quartz_display_open (const gchar *display_name)
|
||||
|
||||
_gdk_quartz_events_init ();
|
||||
|
||||
/* Initialize application */
|
||||
[NSApplication sharedApplication];
|
||||
#if 0
|
||||
/* FIXME: Remove the #if 0 when we have these functions */
|
||||
_gdk_quartz_dnd_init ();
|
||||
@@ -380,16 +379,17 @@ display_reconfiguration_callback (CGDirectDisplayID cg_display,
|
||||
"display", display, NULL);
|
||||
monitor->id = cg_display;
|
||||
g_ptr_array_add (display->monitors, monitor);
|
||||
display_rect (display);
|
||||
configure_monitor (GDK_MONITOR (monitor), display);
|
||||
gdk_display_monitor_added (GDK_DISPLAY (display),
|
||||
GDK_MONITOR (monitor));
|
||||
}
|
||||
else
|
||||
{
|
||||
monitor = g_ptr_array_index (display->monitors, index);
|
||||
display_rect (display);
|
||||
configure_monitor (GDK_MONITOR (monitor), display);
|
||||
}
|
||||
|
||||
display_rect (display);
|
||||
configure_monitor (GDK_MONITOR (monitor), display);
|
||||
}
|
||||
else if (flags & (kCGDisplayRemoveFlag | kCGDisplayDisabledFlag))
|
||||
{
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#define GRIP_WIDTH 15
|
||||
#define GRIP_HEIGHT 15
|
||||
#define GDK_LION_RESIZE 5
|
||||
#define TABLET_AXES 5
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
|
||||
#define NSEventTypeRotate 13
|
||||
@@ -173,7 +174,7 @@ gdk_event_apply_filters (NSEvent *nsevent,
|
||||
{
|
||||
GList *tmp_list;
|
||||
GdkFilterReturn result;
|
||||
|
||||
|
||||
tmp_list = *filters;
|
||||
|
||||
while (tmp_list)
|
||||
@@ -557,7 +558,7 @@ generate_motion_event (GdkWindow *window)
|
||||
event->motion.state = _gdk_quartz_events_get_current_keyboard_modifiers () |
|
||||
_gdk_quartz_events_get_current_mouse_modifiers ();
|
||||
event->motion.is_hint = FALSE;
|
||||
event->motion.device = gdk_seat_get_pointer (seat);
|
||||
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
|
||||
gdk_event_set_seat (event, seat);
|
||||
|
||||
append_event (event, TRUE);
|
||||
@@ -643,8 +644,9 @@ find_toplevel_under_pointer (GdkDisplay *display,
|
||||
if (!(toplevel && WINDOW_IS_TOPLEVEL (toplevel)))
|
||||
{
|
||||
gint gdk_x = 0, gdk_y = 0;
|
||||
GdkDevice *pointer = gdk_seat_get_pointer(seat);
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (screen_point, &gdk_x, &gdk_y);
|
||||
toplevel = gdk_display_get_window_at_pointer (display, &gdk_x, &gdk_y);
|
||||
toplevel = gdk_device_get_window_at_position (pointer, &gdk_x, &gdk_y);
|
||||
|
||||
if (toplevel && ! WINDOW_IS_TOPLEVEL (toplevel))
|
||||
toplevel = gdk_window_get_toplevel (toplevel);
|
||||
@@ -1019,6 +1021,8 @@ fill_button_event (GdkWindow *window,
|
||||
gint y_root)
|
||||
{
|
||||
GdkEventType type;
|
||||
GdkDevice *event_device = NULL;
|
||||
gdouble *axes = NULL;
|
||||
gint state;
|
||||
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
|
||||
|
||||
@@ -1045,6 +1049,20 @@ fill_button_event (GdkWindow *window,
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
event_device = _gdk_quartz_device_manager_core_device_for_ns_event (gdk_display_get_device_manager (_gdk_display),
|
||||
nsevent);
|
||||
|
||||
if ([nsevent subtype] == GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT)
|
||||
{
|
||||
axes = g_new (gdouble, TABLET_AXES);
|
||||
|
||||
axes[0] = x;
|
||||
axes[1] = y;
|
||||
axes[2] = [nsevent pressure];
|
||||
axes[3] = [nsevent tilt].x;
|
||||
axes[4] = [nsevent tilt].y;
|
||||
}
|
||||
|
||||
event->any.type = type;
|
||||
event->button.window = window;
|
||||
event->button.time = get_time_from_ns_event (nsevent);
|
||||
@@ -1052,11 +1070,12 @@ fill_button_event (GdkWindow *window,
|
||||
event->button.y = y;
|
||||
event->button.x_root = x_root;
|
||||
event->button.y_root = y_root;
|
||||
/* FIXME event->axes */
|
||||
event->button.axes = axes;
|
||||
event->button.state = state;
|
||||
event->button.button = get_mouse_button_from_ns_event (nsevent);
|
||||
|
||||
event->button.device = gdk_seat_get_pointer (seat);
|
||||
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
|
||||
gdk_event_set_source_device (event, event_device);
|
||||
gdk_event_set_seat (event, seat);
|
||||
}
|
||||
|
||||
@@ -1070,6 +1089,22 @@ fill_motion_event (GdkWindow *window,
|
||||
gint y_root)
|
||||
{
|
||||
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
|
||||
GdkDevice *event_device = NULL;
|
||||
gdouble *axes = NULL;
|
||||
|
||||
event_device = _gdk_quartz_device_manager_core_device_for_ns_event (gdk_display_get_device_manager (_gdk_display),
|
||||
nsevent);
|
||||
|
||||
if ([nsevent subtype] == GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT)
|
||||
{
|
||||
axes = g_new (gdouble, TABLET_AXES);
|
||||
|
||||
axes[0] = x;
|
||||
axes[1] = y;
|
||||
axes[2] = [nsevent pressure];
|
||||
axes[3] = [nsevent tilt].x;
|
||||
axes[4] = [nsevent tilt].y;
|
||||
}
|
||||
|
||||
event->any.type = GDK_MOTION_NOTIFY;
|
||||
event->motion.window = window;
|
||||
@@ -1078,11 +1113,13 @@ fill_motion_event (GdkWindow *window,
|
||||
event->motion.y = y;
|
||||
event->motion.x_root = x_root;
|
||||
event->motion.y_root = y_root;
|
||||
/* FIXME event->axes */
|
||||
event->motion.axes = axes;
|
||||
event->motion.state = get_keyboard_modifiers_from_ns_event (nsevent) |
|
||||
_gdk_quartz_events_get_current_mouse_modifiers ();
|
||||
event->motion.is_hint = FALSE;
|
||||
event->motion.device = gdk_seat_get_pointer (seat);
|
||||
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
|
||||
gdk_event_set_source_device (event, event_device);
|
||||
|
||||
gdk_event_set_seat (event, seat);
|
||||
}
|
||||
|
||||
@@ -1112,9 +1149,9 @@ fill_scroll_event (GdkWindow *window,
|
||||
event->scroll.y_root = y_root;
|
||||
event->scroll.state = get_keyboard_modifiers_from_ns_event (nsevent);
|
||||
event->scroll.direction = direction;
|
||||
event->scroll.device = gdk_seat_get_pointer (seat);
|
||||
event->scroll.delta_x = delta_x;
|
||||
event->scroll.delta_y = delta_y;
|
||||
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
|
||||
gdk_event_set_seat (event, seat);
|
||||
}
|
||||
|
||||
@@ -1343,16 +1380,18 @@ _gdk_quartz_events_get_current_keyboard_modifiers (void)
|
||||
GdkModifierType
|
||||
_gdk_quartz_events_get_current_mouse_modifiers (void)
|
||||
{
|
||||
NSUInteger buttons = 0;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
|
||||
if (gdk_quartz_osx_version () >= GDK_OSX_SNOW_LEOPARD)
|
||||
return get_mouse_button_modifiers_from_ns_buttons ([NSClassFromString(@"NSEvent") pressedMouseButtons]);
|
||||
buttons = [NSClassFromString(@"NSEvent") pressedMouseButtons];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
return get_mouse_button_modifiers_from_ns_buttons (GetCurrentButtonState ());
|
||||
buttons = GetCurrentButtonState ();
|
||||
#endif
|
||||
return get_mouse_button_modifiers_from_ns_buttons (buttons);
|
||||
}
|
||||
|
||||
/* Detect window resizing */
|
||||
@@ -1470,6 +1509,15 @@ gdk_event_translate (GdkEvent *event,
|
||||
}
|
||||
}
|
||||
|
||||
/* We need to register the proximity event from any point on the screen
|
||||
* to properly register the devices
|
||||
*/
|
||||
if (event_type == GDK_QUARTZ_EVENT_TABLET_PROXIMITY)
|
||||
{
|
||||
_gdk_quartz_device_manager_register_device_for_ns_event (gdk_display_get_device_manager (_gdk_display),
|
||||
nsevent);
|
||||
}
|
||||
|
||||
nswindow = [nsevent window];
|
||||
|
||||
/* Ignore events for windows not created by GDK. */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "gdkquartzglcontext.h"
|
||||
#include "gdkquartzwindow.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
#include "gdkquartz-gtk-only.h"
|
||||
|
||||
#include "gdkinternals.h"
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ gdk_quartz_osx_version (void)
|
||||
|
||||
version = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
minor = version.minorVersion;
|
||||
if (version.majorVersion == 11)
|
||||
minor += 16;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,16 @@ typedef enum {
|
||||
GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP
|
||||
} GdkQuartzEventSubType;
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 10130
|
||||
#define GDK_QUARTZ_EVENT_TABLET_PROXIMITY NSEventTypeTabletProximity
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_PROXIMITY NSEventSubtypeTabletProximity
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT NSEventSubtypeTabletPoint
|
||||
#else
|
||||
#define GDK_QUARTZ_EVENT_TABLET_PROXIMITY NSTabletProximity
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_PROXIMITY NSTabletProximityEventSubtype
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT NSTabletPointEventSubtype
|
||||
#endif
|
||||
|
||||
void _gdk_quartz_events_update_focus_window (GdkWindow *new_window,
|
||||
gboolean got_focus);
|
||||
void _gdk_quartz_events_send_map_event (GdkWindow *window);
|
||||
@@ -84,6 +94,19 @@ GdkModifierType _gdk_quartz_events_get_current_mouse_modifiers (void);
|
||||
|
||||
void _gdk_quartz_events_break_all_grabs (guint32 time);
|
||||
|
||||
/* Devices */
|
||||
void _gdk_quartz_device_core_set_active (GdkDevice *device,
|
||||
gboolean active,
|
||||
NSUInteger device_id);
|
||||
|
||||
gboolean _gdk_quartz_device_core_is_active (GdkDevice *device,
|
||||
NSUInteger device_id);
|
||||
|
||||
void _gdk_quartz_device_core_set_unique (GdkDevice *device,
|
||||
unsigned long long unique_id);
|
||||
|
||||
unsigned long long _gdk_quartz_device_core_get_unique (GdkDevice *device);
|
||||
|
||||
/* Event loop */
|
||||
gboolean _gdk_quartz_event_loop_check_pending (void);
|
||||
NSEvent * _gdk_quartz_event_loop_get_pending (void);
|
||||
|
||||
+14
-16
@@ -650,7 +650,6 @@ gdk_quartz_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
{
|
||||
guint tmp_keyval;
|
||||
GdkModifierType bit;
|
||||
guint tmp_modifiers = 0;
|
||||
|
||||
if (keyval)
|
||||
*keyval = 0;
|
||||
@@ -664,24 +663,23 @@ gdk_quartz_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
if (hardware_keycode < 0 || hardware_keycode >= NUM_KEYCODES)
|
||||
return FALSE;
|
||||
|
||||
/* Check if modifiers modify the keyval */
|
||||
for (bit = GDK_SHIFT_MASK; bit < GDK_BUTTON1_MASK; bit <<= 1)
|
||||
{
|
||||
if (translate_keysym (hardware_keycode,
|
||||
(bit == GDK_MOD1_MASK) ? 0 : group,
|
||||
state & ~bit,
|
||||
NULL, NULL) !=
|
||||
translate_keysym (hardware_keycode,
|
||||
(bit == GDK_MOD1_MASK) ? 1 : group,
|
||||
state | bit,
|
||||
NULL, NULL))
|
||||
tmp_modifiers |= bit;
|
||||
}
|
||||
|
||||
tmp_keyval = translate_keysym (hardware_keycode, group, state, level, effective_group);
|
||||
|
||||
/* Check if modifiers modify the keyval */
|
||||
if (consumed_modifiers)
|
||||
*consumed_modifiers = tmp_modifiers;
|
||||
{
|
||||
guint tmp_modifiers = (state & GDK_MODIFIER_MASK);
|
||||
|
||||
for (bit = 1; bit <= tmp_modifiers; bit <<= 1)
|
||||
{
|
||||
if ((bit & tmp_modifiers) &&
|
||||
translate_keysym (hardware_keycode, group, state & ~bit,
|
||||
NULL, NULL) == tmp_keyval)
|
||||
tmp_modifiers &= ~bit;
|
||||
}
|
||||
|
||||
*consumed_modifiers = tmp_modifiers;
|
||||
}
|
||||
|
||||
if (keyval)
|
||||
*keyval = tmp_keyval;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#error "This API is for use only in Gtk internal code."
|
||||
#endif
|
||||
|
||||
#include <Appkit/Appkit.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/quartz/gdkquartz.h>
|
||||
|
||||
|
||||
@@ -40,7 +40,9 @@ typedef enum
|
||||
GDK_OSX_SIERRA = 12,
|
||||
GDK_OSX_HIGH_SIERRA = 13,
|
||||
GDK_OSX_MOJAVE = 14,
|
||||
GDK_OSX_CURRENT = 14,
|
||||
GDK_OSX_CATALINA = 15,
|
||||
GDK_OSX_BIGSUR = 16,
|
||||
GDK_OSX_CURRENT = 15,
|
||||
GDK_OSX_NEW = 99
|
||||
} GdkOSXVersion;
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* GdkScreen is deprecated, but we need to support it still so silence the warnings.*/
|
||||
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#include "gdkprivate-quartz.h"
|
||||
@@ -121,9 +122,6 @@ static void
|
||||
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen,
|
||||
GdkQuartzDisplay *display)
|
||||
{
|
||||
int i, monitors;
|
||||
int max_x, max_y;
|
||||
|
||||
if (!display)
|
||||
display = GDK_QUARTZ_DISPLAY (gdk_screen_get_display (GDK_SCREEN (screen)));
|
||||
|
||||
|
||||
@@ -191,8 +191,11 @@ static void
|
||||
gdk_window_impl_quartz_release_context (GdkWindowImplQuartz *window_impl,
|
||||
CGContextRef cg_context)
|
||||
{
|
||||
CGContextRestoreGState (cg_context);
|
||||
CGContextSetAllowsAntialiasing (cg_context, TRUE);
|
||||
if (cg_context)
|
||||
{
|
||||
CGContextRestoreGState (cg_context);
|
||||
CGContextSetAllowsAntialiasing (cg_context, TRUE);
|
||||
}
|
||||
|
||||
/* See comment in gdk_quartz_window_get_context(). */
|
||||
if (window_impl->in_paint_rect_count == 0)
|
||||
@@ -740,15 +743,38 @@ _gdk_quartz_window_find_child (GdkWindow *window,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Raises a transient window.
|
||||
*/
|
||||
static void
|
||||
raise_transient (GdkWindowImplQuartz *impl)
|
||||
{
|
||||
/* In quartz the transient-for behavior is implemented by
|
||||
* attaching the transient-for GdkNSWindows to the parent's
|
||||
* GdkNSWindow. Stacking is managed by Quartz and the order
|
||||
* is that of the parent's childWindows array. The only way
|
||||
* to change that order is to remove the child from the
|
||||
* parent and then add it back in.
|
||||
*/
|
||||
GdkWindowImplQuartz *parent_impl =
|
||||
GDK_WINDOW_IMPL_QUARTZ (impl->transient_for->impl);
|
||||
[parent_impl->toplevel removeChildWindow:impl->toplevel];
|
||||
[parent_impl->toplevel addChildWindow:impl->toplevel
|
||||
ordered:NSWindowAbove];
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_window_did_become_main (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
|
||||
main_window_stack = g_slist_remove (main_window_stack, window);
|
||||
|
||||
if (window->window_type != GDK_WINDOW_TEMP)
|
||||
main_window_stack = g_slist_prepend (main_window_stack, window);
|
||||
|
||||
if (impl->transient_for)
|
||||
raise_transient (impl);
|
||||
|
||||
clear_toplevel_order ();
|
||||
}
|
||||
|
||||
@@ -821,6 +847,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
{
|
||||
GdkWindowImplQuartz *impl;
|
||||
GdkWindowImplQuartz *parent_impl;
|
||||
GdkWindowTypeHint type_hint = GDK_WINDOW_TYPE_HINT_NORMAL;
|
||||
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
@@ -853,6 +880,12 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
|
||||
impl->view = NULL;
|
||||
|
||||
if (attributes_mask & GDK_WA_TYPE_HINT)
|
||||
{
|
||||
type_hint = attributes->type_hint;
|
||||
gdk_window_set_type_hint (window, type_hint);
|
||||
}
|
||||
|
||||
switch (window->window_type)
|
||||
{
|
||||
case GDK_WINDOW_TOPLEVEL:
|
||||
@@ -882,8 +915,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
window->height);
|
||||
|
||||
if (window->window_type == GDK_WINDOW_TEMP ||
|
||||
((attributes_mask & GDK_WA_TYPE_HINT) &&
|
||||
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
|
||||
type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
|
||||
{
|
||||
style_mask = GDK_QUARTZ_BORDERLESS_WINDOW;
|
||||
}
|
||||
@@ -901,6 +933,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
defer:NO
|
||||
screen:screen];
|
||||
|
||||
if (type_hint != GDK_WINDOW_TYPE_HINT_NORMAL)
|
||||
impl->toplevel.excludedFromWindowsMenu = true;
|
||||
|
||||
if (attributes_mask & GDK_WA_TITLE)
|
||||
title = attributes->title;
|
||||
else
|
||||
@@ -956,9 +991,6 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
}
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
|
||||
if (attributes_mask & GDK_WA_TYPE_HINT)
|
||||
gdk_window_set_type_hint (window, attributes->type_hint);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1507,7 +1539,11 @@ gdk_window_quartz_raise (GdkWindow *window)
|
||||
GdkWindowImplQuartz *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
[impl->toplevel orderFront:impl->toplevel];
|
||||
|
||||
if (impl->transient_for)
|
||||
raise_transient (impl);
|
||||
else
|
||||
[impl->toplevel orderFront:impl->toplevel];
|
||||
|
||||
clear_toplevel_order ();
|
||||
}
|
||||
@@ -2860,8 +2896,8 @@ _gdk_quartz_window_update_fullscreen_state (GdkWindow *window)
|
||||
if (gdk_quartz_osx_version() >= GDK_OSX_LION)
|
||||
{
|
||||
gboolean is_fullscreen = window_is_fullscreen (window);
|
||||
gboolean was_fullscreen = (gdk_window_get_state (window) &&
|
||||
GDK_WINDOW_STATE_FULLSCREEN != 0);
|
||||
gboolean was_fullscreen = (gdk_window_get_state (window) &
|
||||
GDK_WINDOW_STATE_FULLSCREEN) != 0;
|
||||
|
||||
if (is_fullscreen != was_fullscreen)
|
||||
{
|
||||
@@ -3080,7 +3116,6 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
|
||||
impl_class->set_decorations = gdk_quartz_window_set_decorations;
|
||||
impl_class->get_decorations = gdk_quartz_window_get_decorations;
|
||||
impl_class->set_functions = gdk_quartz_window_set_functions;
|
||||
impl_class->set_functions = gdk_quartz_window_set_functions;
|
||||
impl_class->begin_resize_drag = gdk_quartz_window_begin_resize_drag;
|
||||
impl_class->begin_move_drag = gdk_quartz_window_begin_move_drag;
|
||||
impl_class->set_opacity = gdk_quartz_window_set_opacity;
|
||||
|
||||
@@ -40,7 +40,9 @@ BUILT_SOURCES = \
|
||||
server-decoration-client-protocol.h \
|
||||
server-decoration-protocol.c \
|
||||
gtk-shell-client-protocol.h \
|
||||
gtk-shell-protocol.c
|
||||
gtk-shell-protocol.c \
|
||||
primary-selection-unstable-v1-client-protocol.h \
|
||||
primary-selection-unstable-v1-protocol.c
|
||||
|
||||
nodist_libgdk_wayland_la_SOURCES = \
|
||||
$(BUILT_SOURCES)
|
||||
@@ -92,14 +94,12 @@ $(shell echo $1 | sed 's/\([a-z\-]\{1,\}\)-[a-z]\{1,\}-v[0-9]\{1,\}/\1/')
|
||||
endef
|
||||
|
||||
%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
|
||||
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
|
||||
$(AM_V_GEN)$(SED) -i -e 's/WL_EXPORT //' $@
|
||||
$(AM_V_GEN)$(WAYLAND_SCANNER) private-code < $< > $@
|
||||
%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
|
||||
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
|
||||
|
||||
%-protocol.c : $(srcdir)/protocol/%.xml
|
||||
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
|
||||
$(AM_V_GEN)$(SED) -i -e 's/WL_EXPORT //' $@
|
||||
$(AM_V_GEN)$(WAYLAND_SCANNER) private-code < $< > $@
|
||||
|
||||
%-server-protocol.h : $(srcdir)/protocol/%.xml
|
||||
$(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@
|
||||
|
||||
+170
-39
@@ -237,7 +237,8 @@ struct _GdkWaylandSeat
|
||||
uint32_t keyboard_time;
|
||||
uint32_t keyboard_key_serial;
|
||||
|
||||
struct gtk_primary_selection_device *primary_data_device;
|
||||
struct gtk_primary_selection_device *gtk_primary_data_device;
|
||||
struct zwp_primary_selection_device_v1 *zwp_primary_data_device_v1;
|
||||
struct wl_data_device *data_device;
|
||||
GdkDragContext *drop_context;
|
||||
|
||||
@@ -1308,23 +1309,43 @@ static const struct wl_data_device_listener data_device_listener = {
|
||||
};
|
||||
|
||||
static void
|
||||
primary_selection_data_offer (void *data,
|
||||
struct gtk_primary_selection_device *gtk_primary_selection_device,
|
||||
struct gtk_primary_selection_offer *gtk_primary_offer)
|
||||
primary_selection_data_offer (void *data,
|
||||
gpointer primary_selection_device,
|
||||
gpointer primary_offer)
|
||||
{
|
||||
GdkWaylandSeat *seat = data;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("primary selection offer, device %p, data offer %p",
|
||||
gtk_primary_selection_device, gtk_primary_offer));
|
||||
primary_selection_device, primary_offer));
|
||||
|
||||
gdk_wayland_selection_ensure_primary_offer (seat->display, gtk_primary_offer);
|
||||
gdk_wayland_selection_ensure_primary_offer (seat->display, primary_offer);
|
||||
}
|
||||
|
||||
static void
|
||||
primary_selection_selection (void *data,
|
||||
struct gtk_primary_selection_device *gtk_primary_selection_device,
|
||||
struct gtk_primary_selection_offer *gtk_primary_offer)
|
||||
gtk_primary_selection_data_offer (void *data,
|
||||
struct gtk_primary_selection_device *primary_selection_device,
|
||||
struct gtk_primary_selection_offer *primary_offer)
|
||||
{
|
||||
primary_selection_data_offer (data,
|
||||
(gpointer) primary_selection_device,
|
||||
(gpointer) primary_offer);
|
||||
}
|
||||
|
||||
static void
|
||||
zwp_primary_selection_v1_data_offer (void *data,
|
||||
struct zwp_primary_selection_device_v1 *primary_selection_device,
|
||||
struct zwp_primary_selection_offer_v1 *primary_offer)
|
||||
{
|
||||
primary_selection_data_offer (data,
|
||||
(gpointer) primary_selection_device,
|
||||
(gpointer) primary_offer);
|
||||
}
|
||||
|
||||
static void
|
||||
primary_selection_selection (void *data,
|
||||
gpointer primary_selection_device,
|
||||
gpointer primary_offer)
|
||||
{
|
||||
GdkWaylandSeat *seat = data;
|
||||
GdkAtom selection;
|
||||
@@ -1334,16 +1355,41 @@ primary_selection_selection (void *data,
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("primary selection selection, device %p, data offer %p",
|
||||
gtk_primary_selection_device, gtk_primary_offer));
|
||||
primary_selection_device, primary_offer));
|
||||
|
||||
selection = gdk_atom_intern_static_string ("PRIMARY");
|
||||
gdk_wayland_selection_set_offer (seat->display, selection, gtk_primary_offer);
|
||||
gdk_wayland_selection_set_offer (seat->display, selection, primary_offer);
|
||||
emit_selection_owner_change (seat->keyboard_focus, selection);
|
||||
}
|
||||
|
||||
static const struct gtk_primary_selection_device_listener primary_selection_device_listener = {
|
||||
primary_selection_data_offer,
|
||||
primary_selection_selection,
|
||||
static void
|
||||
gtk_primary_selection_selection (void *data,
|
||||
struct gtk_primary_selection_device *primary_selection_device,
|
||||
struct gtk_primary_selection_offer *primary_offer)
|
||||
{
|
||||
primary_selection_selection (data,
|
||||
(gpointer) primary_selection_device,
|
||||
(gpointer) primary_offer);
|
||||
}
|
||||
|
||||
static void
|
||||
zwp_primary_selection_v1_selection (void *data,
|
||||
struct zwp_primary_selection_device_v1 *primary_selection_device,
|
||||
struct zwp_primary_selection_offer_v1 *primary_offer)
|
||||
{
|
||||
primary_selection_selection (data,
|
||||
(gpointer) primary_selection_device,
|
||||
(gpointer) primary_offer);
|
||||
}
|
||||
|
||||
static const struct gtk_primary_selection_device_listener gtk_primary_device_listener = {
|
||||
gtk_primary_selection_data_offer,
|
||||
gtk_primary_selection_selection,
|
||||
};
|
||||
|
||||
static const struct zwp_primary_selection_device_v1_listener zwp_primary_device_v1_listener = {
|
||||
zwp_primary_selection_v1_data_offer,
|
||||
zwp_primary_selection_v1_selection,
|
||||
};
|
||||
|
||||
static GdkDevice * get_scroll_device (GdkWaylandSeat *seat,
|
||||
@@ -1986,6 +2032,7 @@ keyboard_handle_leave (void *data,
|
||||
g_object_unref (seat->keyboard_focus);
|
||||
seat->keyboard_focus = NULL;
|
||||
seat->repeat_key = 0;
|
||||
seat->key_modifiers = 0;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("focus out, seat %p surface %p",
|
||||
@@ -2459,6 +2506,9 @@ touch_handle_down (void *data,
|
||||
|
||||
_gdk_wayland_display_update_serial (display, serial);
|
||||
|
||||
if (!wl_surface)
|
||||
return;
|
||||
|
||||
touch = gdk_wayland_seat_add_touch (seat, id, wl_surface);
|
||||
touch->x = wl_fixed_to_double (x);
|
||||
touch->y = wl_fixed_to_double (y);
|
||||
@@ -2494,6 +2544,9 @@ touch_handle_up (void *data,
|
||||
_gdk_wayland_display_update_serial (display, serial);
|
||||
|
||||
touch = gdk_wayland_seat_get_touch (seat, id);
|
||||
if (!touch)
|
||||
return;
|
||||
|
||||
event = _create_touch_event (seat, touch, GDK_TOUCH_END, time);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
@@ -2520,6 +2573,9 @@ touch_handle_motion (void *data,
|
||||
GdkEvent *event;
|
||||
|
||||
touch = gdk_wayland_seat_get_touch (seat, id);
|
||||
if (!touch)
|
||||
return;
|
||||
|
||||
touch->x = wl_fixed_to_double (x);
|
||||
touch->y = wl_fixed_to_double (y);
|
||||
|
||||
@@ -2815,6 +2871,14 @@ _gdk_wayland_seat_remove_tablet (GdkWaylandSeat *seat,
|
||||
|
||||
zwp_tablet_v2_destroy (tablet->wp_tablet);
|
||||
|
||||
while (tablet->pads)
|
||||
{
|
||||
GdkWaylandTabletPadData *pad = tablet->pads->data;
|
||||
|
||||
pad->current_tablet = NULL;
|
||||
tablet->pads = g_list_remove (tablet->pads, pad);
|
||||
}
|
||||
|
||||
device_manager->devices =
|
||||
g_list_remove (device_manager->devices, tablet->master);
|
||||
device_manager->devices =
|
||||
@@ -3625,19 +3689,21 @@ tablet_tool_handle_proximity_in (void *data,
|
||||
struct zwp_tablet_tool_v2 *wp_tablet_tool,
|
||||
uint32_t serial,
|
||||
struct zwp_tablet_v2 *wp_tablet,
|
||||
struct wl_surface *surface)
|
||||
struct wl_surface *wl_surface)
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = zwp_tablet_v2_get_user_data (wp_tablet);
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (seat->display);
|
||||
GdkWindow *window = wl_surface_get_user_data (surface);
|
||||
GdkWindow *window;
|
||||
GdkEvent *event;
|
||||
|
||||
if (!surface)
|
||||
return;
|
||||
if (!wl_surface)
|
||||
return;
|
||||
|
||||
window = wl_surface_get_user_data (wl_surface);
|
||||
if (!GDK_IS_WINDOW (window))
|
||||
return;
|
||||
return;
|
||||
|
||||
tool->current_tablet = tablet;
|
||||
tablet->current_tool = tool;
|
||||
@@ -3671,8 +3737,13 @@ tablet_tool_handle_proximity_out (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tool->seat);
|
||||
GdkEvent *event;
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tool->seat);
|
||||
#endif
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("proximity out, seat %p, tool %d", seat,
|
||||
@@ -3730,7 +3801,7 @@ tablet_tool_handle_down (void *data,
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tool->seat);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (seat->display);
|
||||
|
||||
if (!tablet->pointer_info.focus)
|
||||
if (!tablet || !tablet->pointer_info.focus)
|
||||
return;
|
||||
|
||||
_gdk_wayland_display_update_serial (display_wayland, serial);
|
||||
@@ -3747,7 +3818,7 @@ tablet_tool_handle_up (void *data,
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
|
||||
if (!tablet->pointer_info.focus)
|
||||
if (!tablet || !tablet->pointer_info.focus)
|
||||
return;
|
||||
|
||||
tablet_create_button_event_frame (tablet, GDK_BUTTON_RELEASE, GDK_BUTTON_PRIMARY);
|
||||
@@ -3766,6 +3837,9 @@ tablet_tool_handle_motion (void *data,
|
||||
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (seat->display);
|
||||
GdkEvent *event;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
tablet->pointer_info.surface_x = wl_fixed_to_double (sx);
|
||||
tablet->pointer_info.surface_y = wl_fixed_to_double (sy);
|
||||
|
||||
@@ -3798,7 +3872,12 @@ tablet_tool_handle_pressure (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
gint axis_index = tablet->axis_indices[GDK_AXIS_PRESSURE];
|
||||
gint axis_index;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
axis_index = tablet->axis_indices[GDK_AXIS_PRESSURE];
|
||||
|
||||
_gdk_device_translate_axis (tablet->current_device, axis_index,
|
||||
pressure, &tablet->axes[axis_index]);
|
||||
@@ -3815,7 +3894,12 @@ tablet_tool_handle_distance (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
gint axis_index = tablet->axis_indices[GDK_AXIS_DISTANCE];
|
||||
gint axis_index;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
axis_index = tablet->axis_indices[GDK_AXIS_DISTANCE];
|
||||
|
||||
_gdk_device_translate_axis (tablet->current_device, axis_index,
|
||||
distance, &tablet->axes[axis_index]);
|
||||
@@ -3833,8 +3917,14 @@ tablet_tool_handle_tilt (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
gint xtilt_axis_index = tablet->axis_indices[GDK_AXIS_XTILT];
|
||||
gint ytilt_axis_index = tablet->axis_indices[GDK_AXIS_YTILT];
|
||||
gint xtilt_axis_index;
|
||||
gint ytilt_axis_index;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
xtilt_axis_index = tablet->axis_indices[GDK_AXIS_XTILT];
|
||||
ytilt_axis_index = tablet->axis_indices[GDK_AXIS_YTILT];
|
||||
|
||||
_gdk_device_translate_axis (tablet->current_device, xtilt_axis_index,
|
||||
wl_fixed_to_double (xtilt),
|
||||
@@ -3861,7 +3951,7 @@ tablet_tool_handle_button (void *data,
|
||||
GdkEventType evtype;
|
||||
guint n_button;
|
||||
|
||||
if (!tablet->pointer_info.focus)
|
||||
if (!tablet || !tablet->pointer_info.focus)
|
||||
return;
|
||||
|
||||
tablet->pointer_info.press_serial = serial;
|
||||
@@ -3892,7 +3982,12 @@ tablet_tool_handle_rotation (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
gint axis_index = tablet->axis_indices[GDK_AXIS_ROTATION];
|
||||
gint axis_index;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
axis_index = tablet->axis_indices[GDK_AXIS_ROTATION];
|
||||
|
||||
_gdk_device_translate_axis (tablet->current_device, axis_index,
|
||||
wl_fixed_to_double (degrees),
|
||||
@@ -3911,7 +4006,12 @@ tablet_tool_handle_slider (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
gint axis_index = tablet->axis_indices[GDK_AXIS_SLIDER];
|
||||
gint axis_index;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
axis_index = tablet->axis_indices[GDK_AXIS_SLIDER];
|
||||
|
||||
_gdk_device_translate_axis (tablet->current_device, axis_index,
|
||||
position, &tablet->axes[axis_index]);
|
||||
@@ -3929,9 +4029,12 @@ tablet_tool_handle_wheel (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat);
|
||||
GdkWaylandSeat *seat;
|
||||
GdkEvent *event;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("tablet tool %d wheel %d/%d",
|
||||
gdk_device_tool_get_tool_type (tool->tool), degrees, clicks));
|
||||
@@ -3939,6 +4042,8 @@ tablet_tool_handle_wheel (void *data,
|
||||
if (clicks == 0)
|
||||
return;
|
||||
|
||||
seat = GDK_WAYLAND_SEAT (tablet->seat);
|
||||
|
||||
/* Send smooth event */
|
||||
event = create_scroll_event (seat, &tablet->pointer_info,
|
||||
tablet->master, tablet->current_device, FALSE);
|
||||
@@ -3964,6 +4069,9 @@ tablet_tool_handle_frame (void *data,
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
GdkEvent *frame_event;
|
||||
|
||||
if (!tablet)
|
||||
return;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("tablet frame, time %d", time));
|
||||
|
||||
@@ -4587,6 +4695,9 @@ pointer_surface_update_scale (GdkDevice *device)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pointer->pointer_surface_outputs)
|
||||
return;
|
||||
|
||||
scale = 1;
|
||||
for (l = pointer->pointer_surface_outputs; l != NULL; l = l->next)
|
||||
{
|
||||
@@ -4596,6 +4707,8 @@ pointer_surface_update_scale (GdkDevice *device)
|
||||
scale = MAX (scale, output_scale);
|
||||
}
|
||||
|
||||
if (pointer->current_output_scale == scale)
|
||||
return;
|
||||
pointer->current_output_scale = scale;
|
||||
|
||||
if (pointer->cursor)
|
||||
@@ -5067,13 +5180,23 @@ _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
|
||||
wl_seat_add_listener (seat->wl_seat, &seat_listener, seat);
|
||||
wl_seat_set_user_data (seat->wl_seat, seat);
|
||||
|
||||
if (display_wayland->primary_selection_manager)
|
||||
if (display_wayland->zwp_primary_selection_manager_v1)
|
||||
{
|
||||
seat->primary_data_device =
|
||||
gtk_primary_selection_device_manager_get_device (display_wayland->primary_selection_manager,
|
||||
seat->zwp_primary_data_device_v1 =
|
||||
zwp_primary_selection_device_manager_v1_get_device (display_wayland->zwp_primary_selection_manager_v1,
|
||||
seat->wl_seat);
|
||||
zwp_primary_selection_device_v1_add_listener (seat->zwp_primary_data_device_v1,
|
||||
&zwp_primary_device_v1_listener,
|
||||
seat);
|
||||
}
|
||||
else if (display_wayland->gtk_primary_selection_manager)
|
||||
{
|
||||
seat->gtk_primary_data_device =
|
||||
gtk_primary_selection_device_manager_get_device (display_wayland->gtk_primary_selection_manager,
|
||||
seat->wl_seat);
|
||||
gtk_primary_selection_device_add_listener (seat->primary_data_device,
|
||||
&primary_selection_device_listener, seat);
|
||||
gtk_primary_selection_device_add_listener (seat->gtk_primary_data_device,
|
||||
>k_primary_device_listener,
|
||||
seat);
|
||||
}
|
||||
|
||||
seat->data_device =
|
||||
@@ -5344,8 +5467,8 @@ gdk_wayland_seat_set_selection (GdkSeat *seat,
|
||||
}
|
||||
|
||||
void
|
||||
gdk_wayland_seat_set_primary (GdkSeat *seat,
|
||||
struct gtk_primary_selection_source *source)
|
||||
gdk_wayland_seat_set_primary (GdkSeat *seat,
|
||||
gpointer source)
|
||||
{
|
||||
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
@@ -5355,8 +5478,16 @@ gdk_wayland_seat_set_primary (GdkSeat *seat,
|
||||
{
|
||||
display_wayland = GDK_WAYLAND_DISPLAY (gdk_seat_get_display (seat));
|
||||
serial = _gdk_wayland_display_get_serial (display_wayland);
|
||||
gtk_primary_selection_device_set_selection (wayland_seat->primary_data_device,
|
||||
source, serial);
|
||||
if (wayland_seat->zwp_primary_data_device_v1)
|
||||
{
|
||||
zwp_primary_selection_device_v1_set_selection (wayland_seat->zwp_primary_data_device_v1,
|
||||
source, serial);
|
||||
}
|
||||
else if (wayland_seat->gtk_primary_data_device)
|
||||
{
|
||||
gtk_primary_selection_device_set_selection (wayland_seat->gtk_primary_data_device,
|
||||
source, serial);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
#define MIN_SYSTEM_BELL_DELAY_MS 20
|
||||
|
||||
#define GTK_SHELL1_VERSION 3
|
||||
#define GTK_SHELL1_VERSION 4
|
||||
|
||||
static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland);
|
||||
|
||||
@@ -476,10 +476,16 @@ gdk_registry_handle_global (void *data,
|
||||
}
|
||||
else if (strcmp (interface, "gtk_primary_selection_device_manager") == 0)
|
||||
{
|
||||
display_wayland->primary_selection_manager =
|
||||
display_wayland->gtk_primary_selection_manager =
|
||||
wl_registry_bind(display_wayland->wl_registry, id,
|
||||
>k_primary_selection_device_manager_interface, 1);
|
||||
}
|
||||
else if (strcmp (interface, "zwp_primary_selection_device_manager_v1") == 0)
|
||||
{
|
||||
display_wayland->zwp_primary_selection_manager_v1 =
|
||||
wl_registry_bind(display_wayland->wl_registry, id,
|
||||
&zwp_primary_selection_device_manager_v1_interface, 1);
|
||||
}
|
||||
else if (strcmp (interface, "zwp_tablet_manager_v2") == 0)
|
||||
{
|
||||
display_wayland->tablet_manager =
|
||||
@@ -729,6 +735,8 @@ gdk_wayland_display_finalize (GObject *object)
|
||||
|
||||
g_ptr_array_free (display_wayland->monitors, TRUE);
|
||||
|
||||
wl_display_disconnect(display_wayland->wl_display);
|
||||
|
||||
G_OBJECT_CLASS (gdk_wayland_display_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <gdk/wayland/keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h>
|
||||
#include <gdk/wayland/server-decoration-client-protocol.h>
|
||||
#include <gdk/wayland/xdg-output-unstable-v1-client-protocol.h>
|
||||
#include <gdk/wayland/primary-selection-unstable-v1-client-protocol.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <gdk/gdkkeys.h>
|
||||
@@ -48,7 +49,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_WAYLAND_MAX_THEME_SCALE 3
|
||||
#define GDK_WAYLAND_MAX_THEME_SCALE 4
|
||||
#define GDK_WAYLAND_THEME_SCALES_COUNT GDK_WAYLAND_MAX_THEME_SCALE
|
||||
|
||||
#define GDK_ZWP_POINTER_GESTURES_V1_VERSION 1
|
||||
@@ -88,7 +89,8 @@ struct _GdkWaylandDisplay
|
||||
struct wl_data_device_manager *data_device_manager;
|
||||
struct wl_subcompositor *subcompositor;
|
||||
struct zwp_pointer_gestures_v1 *pointer_gestures;
|
||||
struct gtk_primary_selection_device_manager *primary_selection_manager;
|
||||
struct gtk_primary_selection_device_manager *gtk_primary_selection_manager;
|
||||
struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_manager_v1;
|
||||
struct zwp_tablet_manager_v2 *tablet_manager;
|
||||
struct zxdg_exporter_v1 *xdg_exporter;
|
||||
struct zxdg_importer_v1 *xdg_importer;
|
||||
|
||||
@@ -374,7 +374,7 @@ gdk_wayland_drag_context_set_hotspot (GdkDragContext *context,
|
||||
return;
|
||||
|
||||
_gdk_wayland_window_offset_next_wl_buffer (context_wayland->dnd_window,
|
||||
-hot_x, -hot_y);
|
||||
prev_hot_x - hot_x, prev_hot_y - hot_y);
|
||||
gdk_window_invalidate_rect (context_wayland->dnd_window, &damage_rect, FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <fribidi.h>
|
||||
|
||||
#include "gdk.h"
|
||||
#include "gdkwayland.h"
|
||||
|
||||
@@ -191,8 +191,8 @@ struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_devic
|
||||
void gdk_wayland_seat_set_selection (GdkSeat *seat,
|
||||
struct wl_data_source *source);
|
||||
|
||||
void gdk_wayland_seat_set_primary (GdkSeat *seat,
|
||||
struct gtk_primary_selection_source *source);
|
||||
void gdk_wayland_seat_set_primary (GdkSeat *seat,
|
||||
gpointer source);
|
||||
|
||||
GdkDragContext * gdk_wayland_device_get_drop_context (GdkDevice *gdk_device);
|
||||
|
||||
@@ -249,8 +249,8 @@ void gdk_wayland_selection_free (GdkWaylandSelection *selection);
|
||||
|
||||
void gdk_wayland_selection_ensure_offer (GdkDisplay *display,
|
||||
struct wl_data_offer *wl_offer);
|
||||
void gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display,
|
||||
struct gtk_primary_selection_offer *wp_offer);
|
||||
void gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display,
|
||||
gpointer wp_offer);
|
||||
|
||||
void gdk_wayland_selection_set_offer (GdkDisplay *display,
|
||||
GdkAtom selection,
|
||||
|
||||
@@ -351,25 +351,52 @@ update_xft_settings (GdkScreen *screen)
|
||||
{
|
||||
TranslationEntry *entry;
|
||||
|
||||
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "antialiasing");
|
||||
antialiasing = entry->fallback.i;
|
||||
entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "font-antialiasing");
|
||||
|
||||
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "hinting");
|
||||
hinting = entry->fallback.i;
|
||||
if (entry->valid)
|
||||
{
|
||||
antialiasing = entry->fallback.i;
|
||||
|
||||
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "rgba-order");
|
||||
order = entry->fallback.i;
|
||||
entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "font-hinting");
|
||||
hinting = entry->fallback.i;
|
||||
|
||||
entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "font-rgba-order");
|
||||
order = entry->fallback.i;
|
||||
}
|
||||
else
|
||||
{
|
||||
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "antialiasing");
|
||||
antialiasing = entry->fallback.i;
|
||||
|
||||
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "hinting");
|
||||
hinting = entry->fallback.i;
|
||||
|
||||
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "rgba-order");
|
||||
order = entry->fallback.i;
|
||||
}
|
||||
|
||||
entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "text-scaling-factor");
|
||||
dpi = 96.0 * entry->fallback.i / 65536.0 * 1024; /* Xft wants 1/1024th of an inch */
|
||||
}
|
||||
else
|
||||
{
|
||||
settings = g_hash_table_lookup (screen_wayland->settings,
|
||||
"org.gnome.settings-daemon.plugins.xsettings");
|
||||
TranslationEntry *entry;
|
||||
|
||||
if (settings)
|
||||
entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "font-antialiasing");
|
||||
|
||||
if (entry && entry->valid)
|
||||
{
|
||||
settings = g_hash_table_lookup (screen_wayland->settings,
|
||||
"org.gnome.desktop.interface");
|
||||
antialiasing = g_settings_get_enum (settings, "font-antialiasing");
|
||||
hinting = g_settings_get_enum (settings, "font-hinting");
|
||||
order = g_settings_get_enum (settings, "font-rgba-order");
|
||||
}
|
||||
else if (g_hash_table_contains (screen_wayland->settings,
|
||||
"org.gnome.settings-daemon.plugins.xsettings"))
|
||||
{
|
||||
settings = g_hash_table_lookup (screen_wayland->settings,
|
||||
"org.gnome.settings-daemon.plugins.xsettings");
|
||||
antialiasing = g_settings_get_enum (settings, "antialiasing");
|
||||
hinting = g_settings_get_enum (settings, "hinting");
|
||||
order = g_settings_get_enum (settings, "rgba-order");
|
||||
@@ -504,6 +531,8 @@ static TranslationEntry translations[] = {
|
||||
{ FALSE, "org.gnome.desktop.interface", "enable-animations", "gtk-enable-animations", G_TYPE_BOOLEAN, { .b = TRUE } },
|
||||
{ FALSE, "org.gnome.desktop.interface", "gtk-enable-primary-paste", "gtk-enable-primary-paste", G_TYPE_BOOLEAN, { .b = TRUE } },
|
||||
{ FALSE, "org.gnome.desktop.interface", "overlay-scrolling", "gtk-overlay-scrolling", G_TYPE_BOOLEAN, { .b = TRUE } },
|
||||
{ FALSE, "org.gnome.desktop.peripherals.mouse", "double-click", "gtk-double-click-time", G_TYPE_INT, { .i = 400 } },
|
||||
{ FALSE, "org.gnome.desktop.peripherals.mouse", "drag-threshold", "gtk-dnd-drag-threshold", G_TYPE_INT, {.i = 8 } },
|
||||
{ FALSE, "org.gnome.settings-daemon.peripherals.mouse", "double-click", "gtk-double-click-time", G_TYPE_INT, { .i = 400 } },
|
||||
{ FALSE, "org.gnome.settings-daemon.peripherals.mouse", "drag-threshold", "gtk-dnd-drag-threshold", G_TYPE_INT, {.i = 8 } },
|
||||
{ FALSE, "org.gnome.desktop.sound", "theme-name", "gtk-sound-theme-name", G_TYPE_STRING, { .s = "freedesktop" } },
|
||||
@@ -513,6 +542,10 @@ static TranslationEntry translations[] = {
|
||||
{ FALSE, "org.gnome.desktop.privacy", "remember-recent-files", "gtk-recent-files-enabled", G_TYPE_BOOLEAN, { .b = TRUE } },
|
||||
{ FALSE, WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } },
|
||||
{ FALSE, CLASSIC_WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } },
|
||||
{ FALSE, "org.gnome.desktop.interface", "font-antialiasing", "gtk-xft-antialias", G_TYPE_NONE, { .i = 0 } },
|
||||
{ FALSE, "org.gnome.desktop.interface", "font-hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 0 } },
|
||||
{ FALSE, "org.gnome.desktop.interface", "font-hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i = 0 } },
|
||||
{ FALSE, "org.gnome.desktop.interface", "font-rgba-order", "gtk-xft-rgba", G_TYPE_NONE, { .i = 0 } },
|
||||
{ FALSE, "org.gnome.settings-daemon.plugins.xsettings", "antialiasing", "gtk-xft-antialias", G_TYPE_NONE, { .i = 0 } },
|
||||
{ FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 0 } },
|
||||
{ FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i = 0 } },
|
||||
@@ -604,11 +637,14 @@ apply_portal_setting (TranslationEntry *entry,
|
||||
entry->fallback.b = g_variant_get_boolean (value);
|
||||
break;
|
||||
case G_TYPE_NONE:
|
||||
if (strcmp (entry->key, "antialiasing") == 0)
|
||||
if (strcmp (entry->key, "antialiasing") == 0 ||
|
||||
strcmp (entry->key, "font-antialiasing") == 0)
|
||||
entry->fallback.i = get_antialiasing (g_variant_get_string (value, NULL));
|
||||
else if (strcmp (entry->key, "hinting") == 0)
|
||||
else if (strcmp (entry->key, "hinting") == 0 ||
|
||||
strcmp (entry->key, "font-hinting") == 0)
|
||||
entry->fallback.i = get_hinting (g_variant_get_string (value, NULL));
|
||||
else if (strcmp (entry->key, "rgba-order") == 0)
|
||||
else if (strcmp (entry->key, "rgba-order") == 0 ||
|
||||
strcmp (entry->key, "font-rgba-order") == 0)
|
||||
entry->fallback.i = get_order (g_variant_get_string (value, NULL));
|
||||
else if (strcmp (entry->key, "text-scaling-factor") == 0)
|
||||
entry->fallback.i = (int) (g_variant_get_double (value) * 65536.0);
|
||||
@@ -725,6 +761,7 @@ init_settings (GdkScreen *screen)
|
||||
char *a = g_variant_print (v, FALSE);
|
||||
g_debug ("Using portal setting for %s %s: %s\n", schema, key, a);
|
||||
g_free (a);
|
||||
entry->valid = TRUE;
|
||||
apply_portal_setting (entry, v, screen);
|
||||
}
|
||||
else
|
||||
@@ -1539,10 +1576,12 @@ xdg_output_handle_description (void *data,
|
||||
struct zxdg_output_v1 *xdg_output,
|
||||
const char *description)
|
||||
{
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *) data;
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("handle description xdg-output %d", monitor->id));
|
||||
#endif
|
||||
}
|
||||
|
||||
static const struct zxdg_output_v1_listener xdg_output_listener = {
|
||||
|
||||
+376
-149
@@ -53,12 +53,14 @@ struct _SelectionBuffer
|
||||
|
||||
struct _StoredSelection
|
||||
{
|
||||
GdkWaylandSelection *selection;
|
||||
GdkWindow *source;
|
||||
GCancellable *cancellable;
|
||||
guchar *data;
|
||||
gsize data_len;
|
||||
GdkAtom type;
|
||||
gint fd;
|
||||
GdkAtom selection_atom;
|
||||
GPtrArray *pending_writes; /* Array of AsyncWriteData */
|
||||
};
|
||||
|
||||
struct _DataOfferData
|
||||
@@ -71,7 +73,7 @@ struct _DataOfferData
|
||||
struct _AsyncWriteData
|
||||
{
|
||||
GOutputStream *stream;
|
||||
GdkWaylandSelection *selection;
|
||||
StoredSelection *stored_selection;
|
||||
gsize index;
|
||||
};
|
||||
|
||||
@@ -97,11 +99,12 @@ struct _GdkWaylandSelection
|
||||
GHashTable *offers; /* Currently alive offers, Hashtable of wl_data_offer->DataOfferData */
|
||||
|
||||
/* Source-side data */
|
||||
StoredSelection stored_selection;
|
||||
GPtrArray *stored_selections; /* Array of StoredSelection */
|
||||
GdkAtom current_request_selection;
|
||||
GArray *source_targets;
|
||||
GdkAtom requested_target;
|
||||
|
||||
struct gtk_primary_selection_source *primary_source;
|
||||
gpointer primary_source;
|
||||
GdkWindow *primary_owner;
|
||||
|
||||
struct wl_data_source *clipboard_source;
|
||||
@@ -113,10 +116,12 @@ struct _GdkWaylandSelection
|
||||
|
||||
static void selection_buffer_read (SelectionBuffer *buffer);
|
||||
static void async_write_data_write (AsyncWriteData *write_data);
|
||||
static void async_write_data_free (AsyncWriteData *write_data);
|
||||
static void emit_selection_clear (GdkDisplay *display, GdkAtom selection);
|
||||
static void emit_empty_selection_notify (GdkWindow *requestor,
|
||||
GdkAtom selection,
|
||||
GdkAtom target);
|
||||
static void gdk_wayland_selection_handle_next_request (GdkWaylandSelection *wayland_selection);
|
||||
|
||||
static void
|
||||
selection_buffer_notify (SelectionBuffer *buffer)
|
||||
@@ -317,6 +322,89 @@ data_offer_data_free (DataOfferData *info)
|
||||
g_slice_free (DataOfferData, info);
|
||||
}
|
||||
|
||||
static StoredSelection *
|
||||
stored_selection_new (GdkWaylandSelection *wayland_selection,
|
||||
GdkWindow *source,
|
||||
GdkAtom selection,
|
||||
GdkAtom type)
|
||||
{
|
||||
StoredSelection *stored_selection;
|
||||
|
||||
stored_selection = g_new0 (StoredSelection, 1);
|
||||
stored_selection->source = source;
|
||||
stored_selection->type = type;
|
||||
stored_selection->selection_atom = selection;
|
||||
stored_selection->selection = wayland_selection;
|
||||
stored_selection->cancellable = g_cancellable_new ();
|
||||
stored_selection->pending_writes =
|
||||
g_ptr_array_new_with_free_func ((GDestroyNotify) async_write_data_free);
|
||||
|
||||
return stored_selection;
|
||||
}
|
||||
|
||||
static void
|
||||
stored_selection_add_data (StoredSelection *stored_selection,
|
||||
GdkPropMode mode,
|
||||
guchar *data,
|
||||
gsize data_len)
|
||||
{
|
||||
if (mode == GDK_PROP_MODE_REPLACE)
|
||||
{
|
||||
g_free (stored_selection->data);
|
||||
stored_selection->data = g_memdup (data, data_len);
|
||||
stored_selection->data_len = data_len;
|
||||
}
|
||||
else
|
||||
{
|
||||
GArray *array;
|
||||
|
||||
array = g_array_new (TRUE, TRUE, sizeof (guchar));
|
||||
g_array_append_vals (array, stored_selection->data, stored_selection->data_len);
|
||||
|
||||
if (mode == GDK_PROP_MODE_APPEND)
|
||||
g_array_append_vals (array, data, data_len);
|
||||
else if (mode == GDK_PROP_MODE_PREPEND)
|
||||
g_array_prepend_vals (array, data, data_len);
|
||||
|
||||
g_free (stored_selection->data);
|
||||
stored_selection->data_len = array->len;
|
||||
stored_selection->data = (guchar *) g_array_free (array, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
stored_selection_free (StoredSelection *stored_selection)
|
||||
{
|
||||
g_cancellable_cancel (stored_selection->cancellable);
|
||||
g_object_unref (stored_selection->cancellable);
|
||||
g_ptr_array_unref (stored_selection->pending_writes);
|
||||
g_free (stored_selection->data);
|
||||
g_free (stored_selection);
|
||||
}
|
||||
|
||||
static void
|
||||
stored_selection_notify_write (StoredSelection *stored_selection)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < stored_selection->pending_writes->len; i++)
|
||||
{
|
||||
AsyncWriteData *write_data;
|
||||
|
||||
write_data = g_ptr_array_index (stored_selection->pending_writes, i);
|
||||
async_write_data_write (write_data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
stored_selection_cancel_write (StoredSelection *stored_selection)
|
||||
{
|
||||
g_cancellable_cancel (stored_selection->cancellable);
|
||||
g_object_unref (stored_selection->cancellable);
|
||||
stored_selection->cancellable = g_cancellable_new ();
|
||||
g_ptr_array_set_size (stored_selection->pending_writes, 0);
|
||||
}
|
||||
|
||||
GdkWaylandSelection *
|
||||
gdk_wayland_selection_new (void)
|
||||
{
|
||||
@@ -339,11 +427,25 @@ gdk_wayland_selection_new (void)
|
||||
selection->offers =
|
||||
g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) data_offer_data_free);
|
||||
selection->stored_selection.fd = -1;
|
||||
selection->stored_selections =
|
||||
g_ptr_array_new_with_free_func ((GDestroyNotify) stored_selection_free);
|
||||
|
||||
selection->source_targets = g_array_new (FALSE, FALSE, sizeof (GdkAtom));
|
||||
return selection;
|
||||
}
|
||||
|
||||
static void
|
||||
primary_selection_source_destroy (gpointer primary_source)
|
||||
{
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
|
||||
if (display_wayland->zwp_primary_selection_manager_v1)
|
||||
zwp_primary_selection_source_v1_destroy (primary_source);
|
||||
else if (display_wayland->gtk_primary_selection_manager)
|
||||
gtk_primary_selection_source_destroy (primary_source);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_wayland_selection_free (GdkWaylandSelection *selection)
|
||||
{
|
||||
@@ -355,19 +457,10 @@ gdk_wayland_selection_free (GdkWaylandSelection *selection)
|
||||
g_array_unref (selection->source_targets);
|
||||
|
||||
g_hash_table_destroy (selection->offers);
|
||||
g_free (selection->stored_selection.data);
|
||||
|
||||
if (selection->stored_selection.cancellable)
|
||||
{
|
||||
g_cancellable_cancel (selection->stored_selection.cancellable);
|
||||
g_object_unref (selection->stored_selection.cancellable);
|
||||
}
|
||||
|
||||
if (selection->stored_selection.fd > 0)
|
||||
close (selection->stored_selection.fd);
|
||||
g_ptr_array_unref (selection->stored_selections);
|
||||
|
||||
if (selection->primary_source)
|
||||
gtk_primary_selection_source_destroy (selection->primary_source);
|
||||
primary_selection_source_destroy (selection->primary_source);
|
||||
if (selection->clipboard_source)
|
||||
wl_data_source_destroy (selection->clipboard_source);
|
||||
if (selection->dnd_source)
|
||||
@@ -465,27 +558,47 @@ static const struct wl_data_offer_listener data_offer_listener = {
|
||||
};
|
||||
|
||||
static void
|
||||
primary_offer_offer (void *data,
|
||||
struct gtk_primary_selection_offer *gtk_offer,
|
||||
const char *type)
|
||||
primary_offer_offer (void *data,
|
||||
gpointer offer,
|
||||
const char *type)
|
||||
{
|
||||
GdkWaylandSelection *selection = data;
|
||||
DataOfferData *info;
|
||||
GdkAtom atom = gdk_atom_intern (type, FALSE);
|
||||
|
||||
info = g_hash_table_lookup (selection->offers, gtk_offer);
|
||||
info = g_hash_table_lookup (selection->offers, offer);
|
||||
|
||||
if (!info || g_list_find (info->targets, atom))
|
||||
return;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("primary offer offer, offer %p, type = %s", gtk_offer, type));
|
||||
g_message ("primary offer offer, offer %p, type = %s", offer, type));
|
||||
|
||||
info->targets = g_list_prepend (info->targets, atom);
|
||||
}
|
||||
|
||||
static const struct gtk_primary_selection_offer_listener primary_offer_listener = {
|
||||
primary_offer_offer,
|
||||
static void
|
||||
gtk_primary_offer_offer (void *data,
|
||||
struct gtk_primary_selection_offer *offer,
|
||||
const char *type)
|
||||
{
|
||||
primary_offer_offer (data, (gpointer) offer, type);
|
||||
}
|
||||
|
||||
static void
|
||||
zwp_primary_offer_v1_offer (void *data,
|
||||
struct zwp_primary_selection_offer_v1 *offer,
|
||||
const char *type)
|
||||
{
|
||||
primary_offer_offer (data, (gpointer) offer, type);
|
||||
}
|
||||
|
||||
static const struct gtk_primary_selection_offer_listener gtk_primary_offer_listener = {
|
||||
gtk_primary_offer_offer,
|
||||
};
|
||||
|
||||
static const struct zwp_primary_selection_offer_v1_listener zwp_primary_offer_listener_v1 = {
|
||||
zwp_primary_offer_v1_offer,
|
||||
};
|
||||
|
||||
SelectionData *
|
||||
@@ -523,9 +636,10 @@ gdk_wayland_selection_ensure_offer (GdkDisplay *display,
|
||||
}
|
||||
|
||||
void
|
||||
gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display,
|
||||
struct gtk_primary_selection_offer *gtk_offer)
|
||||
gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display,
|
||||
gpointer gtk_offer)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
GdkWaylandSelection *selection = gdk_wayland_display_get_selection (display);
|
||||
DataOfferData *info;
|
||||
|
||||
@@ -533,12 +647,24 @@ gdk_wayland_selection_ensure_primary_offer (GdkDisplay *
|
||||
|
||||
if (!info)
|
||||
{
|
||||
info = data_offer_data_new (gtk_offer,
|
||||
(GDestroyNotify) gtk_primary_selection_offer_destroy);
|
||||
g_hash_table_insert (selection->offers, gtk_offer, info);
|
||||
gtk_primary_selection_offer_add_listener (gtk_offer,
|
||||
&primary_offer_listener,
|
||||
selection);
|
||||
if (display_wayland->zwp_primary_selection_manager_v1)
|
||||
{
|
||||
info = data_offer_data_new (gtk_offer,
|
||||
(GDestroyNotify) zwp_primary_selection_offer_v1_destroy);
|
||||
g_hash_table_insert (selection->offers, gtk_offer, info);
|
||||
zwp_primary_selection_offer_v1_add_listener (gtk_offer,
|
||||
&zwp_primary_offer_listener_v1,
|
||||
selection);
|
||||
}
|
||||
else if (display_wayland->gtk_primary_selection_manager)
|
||||
{
|
||||
info = data_offer_data_new (gtk_offer,
|
||||
(GDestroyNotify) gtk_primary_selection_offer_destroy);
|
||||
g_hash_table_insert (selection->offers, gtk_offer, info);
|
||||
gtk_primary_selection_offer_add_listener (gtk_offer,
|
||||
>k_primary_offer_listener,
|
||||
selection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -620,16 +746,15 @@ gdk_wayland_selection_emit_request (GdkWindow *window,
|
||||
}
|
||||
|
||||
static AsyncWriteData *
|
||||
async_write_data_new (GdkWaylandSelection *selection)
|
||||
async_write_data_new (StoredSelection *stored_selection,
|
||||
gint fd)
|
||||
{
|
||||
AsyncWriteData *write_data;
|
||||
|
||||
write_data = g_slice_new0 (AsyncWriteData);
|
||||
write_data->selection = selection;
|
||||
write_data->stream =
|
||||
g_unix_output_stream_new (selection->stored_selection.fd, TRUE);
|
||||
|
||||
selection->stored_selection.fd = -1;
|
||||
write_data->stored_selection = stored_selection;
|
||||
write_data->stream = g_unix_output_stream_new (fd, TRUE);
|
||||
g_ptr_array_add (stored_selection->pending_writes, write_data);
|
||||
|
||||
return write_data;
|
||||
}
|
||||
@@ -654,68 +779,89 @@ async_write_data_cb (GObject *object,
|
||||
res, &error);
|
||||
if (error)
|
||||
{
|
||||
if (error->domain != G_IO_ERROR ||
|
||||
error->code != G_IO_ERROR_CANCELLED)
|
||||
g_warning ("Error writing selection data: %s", error->message);
|
||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
{
|
||||
g_warning ("Error writing selection data: %s", error->message);
|
||||
g_ptr_array_remove_fast (write_data->stored_selection->pending_writes,
|
||||
write_data);
|
||||
}
|
||||
|
||||
g_error_free (error);
|
||||
async_write_data_free (write_data);
|
||||
return;
|
||||
}
|
||||
|
||||
write_data->index += bytes_written;
|
||||
|
||||
if (write_data->index <
|
||||
write_data->selection->stored_selection.data_len)
|
||||
if (write_data->index < write_data->stored_selection->data_len)
|
||||
{
|
||||
/* Write the next chunk */
|
||||
async_write_data_write (write_data);
|
||||
}
|
||||
else
|
||||
async_write_data_free (write_data);
|
||||
{
|
||||
g_ptr_array_remove_fast (write_data->stored_selection->pending_writes,
|
||||
write_data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
async_write_data_write (AsyncWriteData *write_data)
|
||||
{
|
||||
GdkWaylandSelection *selection = write_data->selection;
|
||||
gsize buf_len;
|
||||
guchar *buf;
|
||||
|
||||
buf = selection->stored_selection.data;
|
||||
buf_len = selection->stored_selection.data_len;
|
||||
buf = write_data->stored_selection->data;
|
||||
buf_len = write_data->stored_selection->data_len;
|
||||
|
||||
g_output_stream_write_async (write_data->stream,
|
||||
&buf[write_data->index],
|
||||
buf_len - write_data->index,
|
||||
G_PRIORITY_DEFAULT,
|
||||
selection->stored_selection.cancellable,
|
||||
write_data->stored_selection->cancellable,
|
||||
async_write_data_cb,
|
||||
write_data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_selection_check_write (GdkWaylandSelection *selection)
|
||||
static StoredSelection *
|
||||
gdk_wayland_selection_find_stored_selection (GdkWaylandSelection *wayland_selection,
|
||||
GdkWindow *window,
|
||||
GdkAtom selection,
|
||||
GdkAtom type)
|
||||
{
|
||||
AsyncWriteData *write_data;
|
||||
gint i;
|
||||
|
||||
if (selection->stored_selection.fd < 0)
|
||||
return FALSE;
|
||||
|
||||
/* Cancel any previous ongoing async write */
|
||||
if (selection->stored_selection.cancellable)
|
||||
for (i = 0; i < wayland_selection->stored_selections->len; i++)
|
||||
{
|
||||
g_cancellable_cancel (selection->stored_selection.cancellable);
|
||||
g_object_unref (selection->stored_selection.cancellable);
|
||||
StoredSelection *stored_selection;
|
||||
|
||||
stored_selection = g_ptr_array_index (wayland_selection->stored_selections, i);
|
||||
|
||||
if (stored_selection->source == window &&
|
||||
stored_selection->selection_atom == selection &&
|
||||
stored_selection->type == type)
|
||||
return stored_selection;
|
||||
}
|
||||
|
||||
selection->stored_selection.cancellable = g_cancellable_new ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
write_data = async_write_data_new (selection);
|
||||
async_write_data_write (write_data);
|
||||
selection->stored_selection.fd = -1;
|
||||
static void
|
||||
gdk_wayland_selection_reset_selection (GdkWaylandSelection *wayland_selection,
|
||||
GdkAtom selection)
|
||||
{
|
||||
gint i = 0;
|
||||
|
||||
return TRUE;
|
||||
while (i < wayland_selection->stored_selections->len)
|
||||
{
|
||||
StoredSelection *stored_selection;
|
||||
|
||||
stored_selection = g_ptr_array_index (wayland_selection->stored_selections, i);
|
||||
|
||||
if (stored_selection->selection_atom == selection)
|
||||
g_ptr_array_remove_index_fast (wayland_selection->stored_selections, i);
|
||||
else
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -727,51 +873,50 @@ gdk_wayland_selection_store (GdkWindow *window,
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkWaylandSelection *selection = gdk_wayland_display_get_selection (display);
|
||||
GArray *array;
|
||||
StoredSelection *stored_selection;
|
||||
|
||||
if (type == gdk_atom_intern_static_string ("NULL"))
|
||||
return;
|
||||
if (selection->current_request_selection == GDK_NONE)
|
||||
return;
|
||||
|
||||
array = g_array_new (TRUE, FALSE, sizeof (guchar));
|
||||
g_array_append_vals (array, data, len);
|
||||
stored_selection =
|
||||
gdk_wayland_selection_find_stored_selection (selection, window,
|
||||
selection->current_request_selection,
|
||||
type);
|
||||
|
||||
if (selection->stored_selection.data)
|
||||
if (!stored_selection)
|
||||
{
|
||||
if (mode != GDK_PROP_MODE_REPLACE &&
|
||||
type != selection->stored_selection.type)
|
||||
{
|
||||
gchar *type_str, *stored_str;
|
||||
|
||||
type_str = gdk_atom_name (type);
|
||||
stored_str = gdk_atom_name (selection->stored_selection.type);
|
||||
|
||||
g_warning (G_STRLOC ": Attempted to append/prepend selection data with "
|
||||
"type %s into the current selection with type %s",
|
||||
type_str, stored_str);
|
||||
g_free (type_str);
|
||||
g_free (stored_str);
|
||||
return;
|
||||
}
|
||||
|
||||
/* In these cases we also replace the stored data, so we
|
||||
* apply the inverse operation into the just given data.
|
||||
*/
|
||||
if (mode == GDK_PROP_MODE_APPEND)
|
||||
g_array_prepend_vals (array, selection->stored_selection.data,
|
||||
selection->stored_selection.data_len - 1);
|
||||
else if (mode == GDK_PROP_MODE_PREPEND)
|
||||
g_array_append_vals (array, selection->stored_selection.data,
|
||||
selection->stored_selection.data_len - 1);
|
||||
|
||||
g_free (selection->stored_selection.data);
|
||||
stored_selection = stored_selection_new (selection, window,
|
||||
selection->current_request_selection,
|
||||
type);
|
||||
g_ptr_array_add (selection->stored_selections, stored_selection);
|
||||
}
|
||||
|
||||
selection->stored_selection.source = window;
|
||||
selection->stored_selection.data_len = array->len;
|
||||
selection->stored_selection.data = (guchar *) g_array_free (array, FALSE);
|
||||
selection->stored_selection.type = type;
|
||||
if ((mode == GDK_PROP_MODE_PREPEND ||
|
||||
mode == GDK_PROP_MODE_REPLACE) &&
|
||||
stored_selection->data &&
|
||||
stored_selection->pending_writes->len > 0)
|
||||
{
|
||||
/* If a prepend/replace action happens, all current readers are
|
||||
* pretty much stale.
|
||||
*/
|
||||
stored_selection_cancel_write (stored_selection);
|
||||
}
|
||||
|
||||
gdk_wayland_selection_check_write (selection);
|
||||
stored_selection_add_data (stored_selection, mode, data, len);
|
||||
|
||||
if (stored_selection->data)
|
||||
stored_selection_notify_write (stored_selection);
|
||||
else
|
||||
{
|
||||
g_ptr_array_remove_fast (selection->stored_selections,
|
||||
stored_selection);
|
||||
}
|
||||
|
||||
/* Handle the next GDK_SELECTION_REQUEST / store, if any */
|
||||
selection->current_request_selection = GDK_NONE;
|
||||
gdk_wayland_selection_handle_next_request (selection);
|
||||
}
|
||||
|
||||
static SelectionBuffer *
|
||||
@@ -818,6 +963,28 @@ gdk_wayland_selection_source_handles_target (GdkWaylandSelection *wayland_select
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_selection_handle_next_request (GdkWaylandSelection *wayland_selection)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < wayland_selection->stored_selections->len; i++)
|
||||
{
|
||||
StoredSelection *stored_selection;
|
||||
|
||||
stored_selection = g_ptr_array_index (wayland_selection->stored_selections, i);
|
||||
|
||||
if (!stored_selection->data)
|
||||
{
|
||||
gdk_wayland_selection_emit_request (stored_selection->source,
|
||||
stored_selection->selection_atom,
|
||||
stored_selection->type);
|
||||
wayland_selection->current_request_selection = stored_selection->selection_atom;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
|
||||
GdkWindow *window,
|
||||
@@ -825,33 +992,41 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
|
||||
GdkAtom target,
|
||||
gint fd)
|
||||
{
|
||||
if (wayland_selection->stored_selection.fd == fd &&
|
||||
wayland_selection->requested_target == target)
|
||||
return FALSE;
|
||||
StoredSelection *stored_selection;
|
||||
AsyncWriteData *write_data;
|
||||
|
||||
/* If we didn't issue gdk_wayland_selection_check_write() yet
|
||||
* on a previous fd, it will still linger here. Just close it,
|
||||
* as we can't have more than one fd on the fly.
|
||||
*/
|
||||
if (wayland_selection->stored_selection.fd >= 0)
|
||||
close (wayland_selection->stored_selection.fd);
|
||||
|
||||
wayland_selection->stored_selection.fd = fd;
|
||||
wayland_selection->requested_target = target;
|
||||
|
||||
if (window &&
|
||||
gdk_wayland_selection_source_handles_target (wayland_selection, target))
|
||||
{
|
||||
gdk_wayland_selection_emit_request (window, selection, target);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
if (!window ||
|
||||
!gdk_wayland_selection_source_handles_target (wayland_selection, target))
|
||||
{
|
||||
close (fd);
|
||||
wayland_selection->stored_selection.fd = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
stored_selection =
|
||||
gdk_wayland_selection_find_stored_selection (wayland_selection, window,
|
||||
selection, target);
|
||||
|
||||
if (stored_selection && stored_selection->data)
|
||||
{
|
||||
/* Fast path, we already have the type cached */
|
||||
write_data = async_write_data_new (stored_selection, fd);
|
||||
async_write_data_write (write_data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!stored_selection)
|
||||
{
|
||||
stored_selection = stored_selection_new (wayland_selection, window,
|
||||
selection, target);
|
||||
g_ptr_array_add (wayland_selection->stored_selections, stored_selection);
|
||||
}
|
||||
|
||||
write_data = async_write_data_new (stored_selection, fd);
|
||||
|
||||
if (wayland_selection->current_request_selection == GDK_NONE)
|
||||
gdk_wayland_selection_handle_next_request (wayland_selection);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -903,11 +1078,10 @@ data_source_send (void *data,
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!gdk_wayland_selection_request_target (wayland_selection, window,
|
||||
selection,
|
||||
gdk_atom_intern (mime_type, FALSE),
|
||||
fd))
|
||||
gdk_wayland_selection_check_write (wayland_selection);
|
||||
gdk_wayland_selection_request_target (wayland_selection, window,
|
||||
selection,
|
||||
gdk_atom_intern (mime_type, FALSE),
|
||||
fd);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1009,10 +1183,10 @@ static const struct wl_data_source_listener data_source_listener = {
|
||||
};
|
||||
|
||||
static void
|
||||
primary_source_send (void *data,
|
||||
struct gtk_primary_selection_source *source,
|
||||
const char *mime_type,
|
||||
int32_t fd)
|
||||
primary_source_send (void *data,
|
||||
gpointer source,
|
||||
const char *mime_type,
|
||||
int32_t fd)
|
||||
{
|
||||
GdkWaylandSelection *wayland_selection = data;
|
||||
|
||||
@@ -1026,17 +1200,34 @@ primary_source_send (void *data,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gdk_wayland_selection_request_target (wayland_selection,
|
||||
wayland_selection->primary_owner,
|
||||
atoms[ATOM_PRIMARY],
|
||||
gdk_atom_intern (mime_type, FALSE),
|
||||
fd))
|
||||
gdk_wayland_selection_check_write (wayland_selection);
|
||||
gdk_wayland_selection_request_target (wayland_selection,
|
||||
wayland_selection->primary_owner,
|
||||
atoms[ATOM_PRIMARY],
|
||||
gdk_atom_intern (mime_type, FALSE),
|
||||
fd);
|
||||
}
|
||||
|
||||
static void
|
||||
primary_source_cancelled (void *data,
|
||||
struct gtk_primary_selection_source *source)
|
||||
gtk_primary_source_send (void *data,
|
||||
struct gtk_primary_selection_source *source,
|
||||
const char *mime_type,
|
||||
int32_t fd)
|
||||
{
|
||||
primary_source_send (data, (gpointer) source, mime_type, fd);
|
||||
}
|
||||
|
||||
static void
|
||||
zwp_primary_source_v1_send (void *data,
|
||||
struct zwp_primary_selection_source_v1 *source,
|
||||
const char *mime_type,
|
||||
int32_t fd)
|
||||
{
|
||||
primary_source_send (data, (gpointer) source, mime_type, fd);
|
||||
}
|
||||
|
||||
static void
|
||||
primary_source_cancelled (void *data,
|
||||
gpointer source)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkAtom atom;
|
||||
@@ -1052,9 +1243,28 @@ primary_source_cancelled (void *data,
|
||||
gdk_wayland_selection_unset_data_source (display, atom);
|
||||
}
|
||||
|
||||
static const struct gtk_primary_selection_source_listener primary_source_listener = {
|
||||
primary_source_send,
|
||||
primary_source_cancelled,
|
||||
static void
|
||||
gtk_primary_source_cancelled (void *data,
|
||||
struct gtk_primary_selection_source *source)
|
||||
{
|
||||
primary_source_cancelled (data, source);
|
||||
}
|
||||
|
||||
static void
|
||||
zwp_primary_source_v1_cancelled (void *data,
|
||||
struct zwp_primary_selection_source_v1 *source)
|
||||
{
|
||||
primary_source_cancelled (data, source);
|
||||
}
|
||||
|
||||
static const struct gtk_primary_selection_source_listener gtk_primary_source_listener = {
|
||||
gtk_primary_source_send,
|
||||
gtk_primary_source_cancelled,
|
||||
};
|
||||
|
||||
static const struct zwp_primary_selection_source_v1_listener zwp_primary_source_v1_listener = {
|
||||
zwp_primary_source_v1_send,
|
||||
zwp_primary_source_v1_cancelled,
|
||||
};
|
||||
|
||||
struct wl_data_source *
|
||||
@@ -1076,11 +1286,11 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner,
|
||||
{
|
||||
if (wayland_selection->primary_source &&
|
||||
(!owner || owner == wayland_selection->primary_owner))
|
||||
return (gpointer) wayland_selection->primary_source;
|
||||
return wayland_selection->primary_source;
|
||||
|
||||
if (wayland_selection->primary_source)
|
||||
{
|
||||
gtk_primary_selection_source_destroy (wayland_selection->primary_source);
|
||||
primary_selection_source_destroy (wayland_selection->primary_source);
|
||||
wayland_selection->primary_source = NULL;
|
||||
}
|
||||
}
|
||||
@@ -1106,11 +1316,18 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner,
|
||||
|
||||
if (selection == atoms[ATOM_PRIMARY])
|
||||
{
|
||||
if (display_wayland->primary_selection_manager)
|
||||
if (display_wayland->zwp_primary_selection_manager_v1)
|
||||
{
|
||||
source = gtk_primary_selection_device_manager_create_source (display_wayland->primary_selection_manager);
|
||||
source = zwp_primary_selection_device_manager_v1_create_source (display_wayland->zwp_primary_selection_manager_v1);
|
||||
zwp_primary_selection_source_v1_add_listener (source,
|
||||
&zwp_primary_source_v1_listener,
|
||||
wayland_selection);
|
||||
}
|
||||
else if (display_wayland->gtk_primary_selection_manager)
|
||||
{
|
||||
source = gtk_primary_selection_device_manager_create_source (display_wayland->gtk_primary_selection_manager);
|
||||
gtk_primary_selection_source_add_listener (source,
|
||||
&primary_source_listener,
|
||||
>k_primary_source_listener,
|
||||
wayland_selection);
|
||||
}
|
||||
}
|
||||
@@ -1150,7 +1367,7 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display,
|
||||
{
|
||||
if (wayland_selection->primary_source)
|
||||
{
|
||||
gtk_primary_selection_source_destroy (wayland_selection->primary_source);
|
||||
primary_selection_source_destroy (wayland_selection->primary_source);
|
||||
wayland_selection->primary_source = NULL;
|
||||
}
|
||||
}
|
||||
@@ -1186,6 +1403,8 @@ _gdk_wayland_display_set_selection_owner (GdkDisplay *display,
|
||||
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
|
||||
GdkSeat *seat = gdk_display_get_default_seat (display);
|
||||
|
||||
gdk_wayland_selection_reset_selection (wayland_selection, selection);
|
||||
|
||||
if (selection == atoms[ATOM_CLIPBOARD])
|
||||
{
|
||||
wayland_selection->clipboard_owner = owner;
|
||||
@@ -1319,6 +1538,7 @@ _gdk_wayland_display_convert_selection (GdkDisplay *display,
|
||||
GdkAtom target,
|
||||
guint32 time)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
|
||||
const SelectionData *selection_data;
|
||||
SelectionBuffer *buffer_data;
|
||||
@@ -1384,9 +1604,16 @@ _gdk_wayland_display_convert_selection (GdkDisplay *display,
|
||||
g_unix_open_pipe (pipe_fd, FD_CLOEXEC, NULL);
|
||||
|
||||
if (selection == atoms[ATOM_PRIMARY])
|
||||
gtk_primary_selection_offer_receive (offer, mimetype, pipe_fd[1]);
|
||||
{
|
||||
if (display_wayland->zwp_primary_selection_manager_v1)
|
||||
zwp_primary_selection_offer_v1_receive (offer, mimetype, pipe_fd[1]);
|
||||
else if (display_wayland->gtk_primary_selection_manager)
|
||||
gtk_primary_selection_offer_receive (offer, mimetype, pipe_fd[1]);
|
||||
}
|
||||
else
|
||||
wl_data_offer_receive (offer, mimetype, pipe_fd[1]);
|
||||
{
|
||||
wl_data_offer_receive (offer, mimetype, pipe_fd[1]);
|
||||
}
|
||||
|
||||
stream = g_unix_input_stream_new (pipe_fd[0], TRUE);
|
||||
close (pipe_fd[1]);
|
||||
|
||||
@@ -77,12 +77,24 @@ GDK_AVAILABLE_IN_3_22
|
||||
gboolean gdk_wayland_window_set_transient_for_exported (GdkWindow *window,
|
||||
char *parent_handle_str);
|
||||
|
||||
GDK_AVAILABLE_IN_3_24
|
||||
void gdk_wayland_window_set_application_id (GdkWindow *window,
|
||||
const char *application_id);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
void gdk_wayland_window_announce_csd (GdkWindow *window);
|
||||
|
||||
GDK_AVAILABLE_IN_3_24
|
||||
void gdk_wayland_window_announce_ssd (GdkWindow *window);
|
||||
|
||||
GDK_AVAILABLE_IN_3_24
|
||||
void gdk_wayland_window_add_frame_callback_surface (GdkWindow *window,
|
||||
struct wl_surface *surface);
|
||||
|
||||
GDK_AVAILABLE_IN_3_24
|
||||
void gdk_wayland_window_remove_frame_callback_surface (GdkWindow *window,
|
||||
struct wl_surface *surface);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_WAYLAND_WINDOW_H__ */
|
||||
|
||||
+371
-55
@@ -202,6 +202,13 @@ struct _GdkWindowImplWayland
|
||||
|
||||
int saved_width;
|
||||
int saved_height;
|
||||
gboolean saved_size_changed;
|
||||
|
||||
int unconfigured_width;
|
||||
int unconfigured_height;
|
||||
|
||||
int fixed_size_width;
|
||||
int fixed_size_height;
|
||||
|
||||
gulong parent_surface_committed_handler;
|
||||
|
||||
@@ -229,6 +236,9 @@ struct _GdkWindowImplWayland
|
||||
|
||||
struct zxdg_imported_v1 *imported_transient_for;
|
||||
GHashTable *shortcuts_inhibitors;
|
||||
|
||||
struct wl_callback *surface_callback;
|
||||
GHashTable *frame_callback_surfaces;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplWaylandClass
|
||||
@@ -266,6 +276,9 @@ static gboolean gdk_wayland_window_is_exported (GdkWindow *window);
|
||||
static void gdk_wayland_window_unexport (GdkWindow *window);
|
||||
static void gdk_wayland_window_announce_decoration_mode (GdkWindow *window);
|
||||
|
||||
static gboolean should_map_as_subsurface (GdkWindow *window);
|
||||
static gboolean should_map_as_popup (GdkWindow *window);
|
||||
|
||||
GType _gdk_window_impl_wayland_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWindowImplWayland, _gdk_window_impl_wayland, GDK_TYPE_WINDOW_IMPL)
|
||||
@@ -304,16 +317,54 @@ drop_cairo_surfaces (GdkWindow *window)
|
||||
impl->committed_cairo_surface = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
calculate_width_without_margin (GdkWindow *window,
|
||||
int width)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
return width - (impl->margin_left + impl->margin_right);
|
||||
}
|
||||
|
||||
static int
|
||||
calculate_height_without_margin (GdkWindow *window,
|
||||
int height)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
return height - (impl->margin_top + impl->margin_bottom);
|
||||
}
|
||||
|
||||
static int
|
||||
calculate_width_with_margin (GdkWindow *window,
|
||||
int width)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
return width + impl->margin_left + impl->margin_right;
|
||||
}
|
||||
|
||||
static int
|
||||
calculate_height_with_margin (GdkWindow *window,
|
||||
int height)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
return height + impl->margin_top + impl->margin_bottom;
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_wayland_window_save_size (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
if (window->state & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED))
|
||||
if (window->state & (GDK_WINDOW_STATE_FULLSCREEN |
|
||||
GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_TILED))
|
||||
return;
|
||||
|
||||
impl->saved_width = window->width - impl->margin_left - impl->margin_right;
|
||||
impl->saved_height = window->height - impl->margin_top - impl->margin_bottom;
|
||||
impl->saved_width = calculate_width_without_margin (window, window->width);
|
||||
impl->saved_height = calculate_height_without_margin (window, window->height);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -321,7 +372,9 @@ _gdk_wayland_window_clear_saved_size (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
if (window->state & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED))
|
||||
if (window->state & (GDK_WINDOW_STATE_FULLSCREEN |
|
||||
GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_TILED))
|
||||
return;
|
||||
|
||||
impl->saved_width = -1;
|
||||
@@ -522,9 +575,25 @@ frame_callback (void *data,
|
||||
GdkFrameClock *clock = gdk_window_get_frame_clock (window);
|
||||
GdkFrameTimings *timings;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("frame %p", window));
|
||||
if (callback == impl->surface_callback)
|
||||
{
|
||||
impl->surface_callback = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
GHashTableIter iter;
|
||||
gpointer surface_callback;
|
||||
|
||||
g_hash_table_iter_init (&iter, impl->frame_callback_surfaces);
|
||||
while (g_hash_table_iter_next (&iter, NULL, &surface_callback))
|
||||
{
|
||||
if (callback == surface_callback)
|
||||
{
|
||||
g_hash_table_iter_replace (&iter, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
wl_callback_destroy (callback);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -533,6 +602,9 @@ frame_callback (void *data,
|
||||
if (!impl->awaiting_frame)
|
||||
return;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("frame %p", window));
|
||||
|
||||
impl->awaiting_frame = FALSE;
|
||||
_gdk_frame_clock_thaw (clock);
|
||||
|
||||
@@ -610,6 +682,8 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
struct wl_callback *callback;
|
||||
GHashTableIter iter;
|
||||
gpointer surface, surface_callback;
|
||||
|
||||
if (!impl->pending_commit)
|
||||
return;
|
||||
@@ -617,8 +691,6 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
if (window->update_freeze_count > 0)
|
||||
return;
|
||||
|
||||
callback = wl_surface_frame (impl->display_server.wl_surface);
|
||||
wl_callback_add_listener (callback, &frame_listener, window);
|
||||
_gdk_frame_clock_freeze (clock);
|
||||
|
||||
/* Before we commit a new buffer, make sure we've backfilled
|
||||
@@ -627,6 +699,24 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
if (impl->pending_buffer_attached)
|
||||
read_back_cairo_surface (window);
|
||||
|
||||
if (impl->surface_callback == NULL)
|
||||
{
|
||||
callback = wl_surface_frame (impl->display_server.wl_surface);
|
||||
wl_callback_add_listener (callback, &frame_listener, window);
|
||||
impl->surface_callback = callback;
|
||||
}
|
||||
|
||||
g_hash_table_iter_init (&iter, impl->frame_callback_surfaces);
|
||||
while (g_hash_table_iter_next (&iter, &surface, &surface_callback))
|
||||
{
|
||||
if (surface_callback)
|
||||
continue;
|
||||
|
||||
callback = wl_surface_frame (surface);
|
||||
wl_callback_add_listener (callback, &frame_listener, window);
|
||||
g_hash_table_iter_replace (&iter, callback);
|
||||
}
|
||||
|
||||
/* From this commit forward, we can't write to the buffer,
|
||||
* it's "live". In the future, if we need to stage more changes
|
||||
* we have to allocate a new staging buffer and draw to it instead.
|
||||
@@ -701,9 +791,13 @@ _gdk_wayland_display_create_window_impl (GdkDisplay *display,
|
||||
|
||||
impl = g_object_new (GDK_TYPE_WINDOW_IMPL_WAYLAND, NULL);
|
||||
window->impl = GDK_WINDOW_IMPL (impl);
|
||||
impl->unconfigured_width = window->width;
|
||||
impl->unconfigured_height = window->height;
|
||||
impl->wrapper = GDK_WINDOW (window);
|
||||
impl->shortcuts_inhibitors = g_hash_table_new (NULL, NULL);
|
||||
impl->using_csd = TRUE;
|
||||
impl->surface_callback = NULL;
|
||||
impl->frame_callback_surfaces = g_hash_table_new (NULL, NULL);
|
||||
|
||||
if (window->width > 65535)
|
||||
{
|
||||
@@ -992,15 +1086,14 @@ gdk_window_impl_wayland_beep (GdkWindow *window)
|
||||
static void
|
||||
gdk_window_impl_wayland_finalize (GObject *object)
|
||||
{
|
||||
GdkWindow *window = GDK_WINDOW (object);
|
||||
GdkWindowImplWayland *impl;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (object));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (object);
|
||||
|
||||
if (gdk_wayland_window_is_exported (window))
|
||||
gdk_wayland_window_unexport_handle (window);
|
||||
if (gdk_wayland_window_is_exported (impl->wrapper))
|
||||
gdk_wayland_window_unexport_handle (impl->wrapper);
|
||||
|
||||
g_free (impl->title);
|
||||
|
||||
@@ -1016,6 +1109,7 @@ gdk_window_impl_wayland_finalize (GObject *object)
|
||||
g_clear_pointer (&impl->staged_updates_region, cairo_region_destroy);
|
||||
|
||||
g_clear_pointer (&impl->shortcuts_inhibitors, g_hash_table_unref);
|
||||
g_clear_pointer (&impl->frame_callback_surfaces, g_hash_table_unref);
|
||||
|
||||
G_OBJECT_CLASS (_gdk_window_impl_wayland_parent_class)->finalize (object);
|
||||
}
|
||||
@@ -1029,6 +1123,9 @@ gdk_wayland_window_configure (GdkWindow *window,
|
||||
GdkDisplay *display;
|
||||
GdkEvent *event;
|
||||
|
||||
g_return_if_fail (width > 0);
|
||||
g_return_if_fail (height > 0);
|
||||
|
||||
event = gdk_event_new (GDK_CONFIGURE);
|
||||
event->configure.window = g_object_ref (window);
|
||||
event->configure.send_event = FALSE;
|
||||
@@ -1069,6 +1166,30 @@ is_realized_popup (GdkWindow *window)
|
||||
impl->display_server.zxdg_popup_v6);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_inhibit_resize (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
if (impl->display_server.wl_subsurface)
|
||||
return FALSE;
|
||||
else if (impl->use_custom_surface)
|
||||
return FALSE;
|
||||
else if (impl->hint == GDK_WINDOW_TYPE_HINT_DND)
|
||||
return FALSE;
|
||||
else if (is_realized_popup (window))
|
||||
return FALSE;
|
||||
else if (should_map_as_popup (window))
|
||||
return FALSE;
|
||||
else if (should_map_as_subsurface (window))
|
||||
return FALSE;
|
||||
|
||||
/* This should now either be, or eventually be, a toplevel window,
|
||||
* and we should wait for the initial configure to really configure it.
|
||||
*/
|
||||
return !impl->initial_configure_received;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_maybe_configure (GdkWindow *window,
|
||||
int width,
|
||||
@@ -1079,6 +1200,12 @@ gdk_wayland_window_maybe_configure (GdkWindow *window,
|
||||
gboolean is_xdg_popup;
|
||||
gboolean is_visible;
|
||||
|
||||
impl->unconfigured_width = calculate_width_without_margin (window, width);
|
||||
impl->unconfigured_height = calculate_height_without_margin (window, height);
|
||||
|
||||
if (should_inhibit_resize (window))
|
||||
return;
|
||||
|
||||
if (window->width == width &&
|
||||
window->height == height &&
|
||||
impl->scale == scale)
|
||||
@@ -1248,8 +1375,8 @@ gdk_wayland_window_get_window_geometry (GdkWindow *window,
|
||||
*geometry = (GdkRectangle) {
|
||||
.x = impl->margin_left,
|
||||
.y = impl->margin_top,
|
||||
.width = window->width - (impl->margin_left + impl->margin_right),
|
||||
.height = window->height - (impl->margin_top + impl->margin_bottom)
|
||||
.width = calculate_width_without_margin (window, window->width),
|
||||
.height = calculate_height_without_margin (window, window->height)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1265,6 +1392,9 @@ gdk_wayland_window_sync_margin (GdkWindow *window)
|
||||
return;
|
||||
|
||||
gdk_wayland_window_get_window_geometry (window, &geometry);
|
||||
|
||||
g_return_if_fail (geometry.width > 0 && geometry.height > 0);
|
||||
|
||||
gdk_window_set_geometry_hints (window,
|
||||
&impl->geometry_hints,
|
||||
impl->geometry_mask);
|
||||
@@ -1502,6 +1632,14 @@ gdk_wayland_window_create_surface (GdkWindow *window)
|
||||
wl_surface_add_listener (impl->display_server.wl_surface, &surface_listener, window);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_use_fixed_size (GdkWindowState state)
|
||||
{
|
||||
return state & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN |
|
||||
GDK_WINDOW_STATE_TILED);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_handle_configure (GdkWindow *window,
|
||||
uint32_t serial)
|
||||
@@ -1536,10 +1674,7 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
|
||||
new_state = impl->pending.state;
|
||||
impl->pending.state = 0;
|
||||
|
||||
fixed_size =
|
||||
new_state & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN |
|
||||
GDK_WINDOW_STATE_TILED);
|
||||
fixed_size = should_use_fixed_size (new_state);
|
||||
|
||||
saved_size = (width == 0 && height == 0);
|
||||
/* According to xdg_shell, an xdg_surface.configure with size 0x0
|
||||
@@ -1549,16 +1684,23 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
|
||||
* When transitioning from maximize or fullscreen state, this means
|
||||
* the client should configure its size back to what it was before
|
||||
* being maximize or fullscreen.
|
||||
* Additionally, if we receive a manual resize request, we must prefer this
|
||||
* new size instead of the compositor's size hints.
|
||||
* In such a scenario, and without letting the compositor know about the new
|
||||
* size, the client has to manage all dimensions and ignore any server hints.
|
||||
*/
|
||||
if (saved_size && !fixed_size)
|
||||
if (!fixed_size && (saved_size || impl->saved_size_changed))
|
||||
{
|
||||
width = impl->saved_width;
|
||||
height = impl->saved_height;
|
||||
impl->saved_size_changed = FALSE;
|
||||
}
|
||||
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
GdkWindowHints geometry_mask = impl->geometry_mask;
|
||||
int configure_width;
|
||||
int configure_height;
|
||||
|
||||
/* Ignore size increments for maximized/fullscreen windows */
|
||||
if (fixed_size)
|
||||
@@ -1568,8 +1710,8 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
|
||||
/* Do not reapply contrains if we are restoring original size */
|
||||
gdk_window_constrain_size (&impl->geometry_hints,
|
||||
geometry_mask,
|
||||
width + impl->margin_left + impl->margin_right,
|
||||
height + impl->margin_top + impl->margin_bottom,
|
||||
calculate_width_with_margin (window, width),
|
||||
calculate_height_with_margin (window, height),
|
||||
&width,
|
||||
&height);
|
||||
|
||||
@@ -1577,7 +1719,40 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
|
||||
_gdk_wayland_window_save_size (window);
|
||||
}
|
||||
|
||||
gdk_wayland_window_configure (window, width, height, impl->scale);
|
||||
if (saved_size)
|
||||
{
|
||||
configure_width = calculate_width_with_margin (window, width);
|
||||
configure_height = calculate_height_with_margin (window, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
configure_width = width;
|
||||
configure_height = height;
|
||||
}
|
||||
gdk_wayland_window_configure (window,
|
||||
configure_width,
|
||||
configure_height,
|
||||
impl->scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
int unconfigured_width;
|
||||
int unconfigured_height;
|
||||
|
||||
unconfigured_width =
|
||||
calculate_width_with_margin (window, impl->unconfigured_width);
|
||||
unconfigured_height =
|
||||
calculate_height_with_margin (window, impl->unconfigured_height);
|
||||
gdk_wayland_window_configure (window,
|
||||
unconfigured_width,
|
||||
unconfigured_height,
|
||||
impl->scale);
|
||||
}
|
||||
|
||||
if (fixed_size)
|
||||
{
|
||||
impl->fixed_size_width = width;
|
||||
impl->fixed_size_height = height;
|
||||
}
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
@@ -1810,6 +1985,36 @@ create_zxdg_toplevel_v6_resources (GdkWindow *window)
|
||||
window);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_wayland_window_set_application_id (GdkWindow *window, const char* application_id)
|
||||
{
|
||||
GdkWindowImplWayland *impl;
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
|
||||
g_return_if_fail (application_id != NULL);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
if (!is_realized_toplevel (window))
|
||||
return;
|
||||
|
||||
display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
switch (display_wayland->shell_variant)
|
||||
{
|
||||
case GDK_WAYLAND_SHELL_VARIANT_XDG_SHELL:
|
||||
xdg_toplevel_set_app_id (impl->display_server.xdg_toplevel,
|
||||
application_id);
|
||||
break;
|
||||
case GDK_WAYLAND_SHELL_VARIANT_ZXDG_SHELL_V6:
|
||||
zxdg_toplevel_v6_set_app_id (impl->display_server.zxdg_toplevel_v6,
|
||||
application_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_create_xdg_toplevel (GdkWindow *window)
|
||||
{
|
||||
@@ -1865,17 +2070,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (app_id == NULL)
|
||||
app_id = gdk_get_program_class ();
|
||||
|
||||
switch (display_wayland->shell_variant)
|
||||
{
|
||||
case GDK_WAYLAND_SHELL_VARIANT_XDG_SHELL:
|
||||
xdg_toplevel_set_app_id (impl->display_server.xdg_toplevel,
|
||||
app_id);
|
||||
break;
|
||||
case GDK_WAYLAND_SHELL_VARIANT_ZXDG_SHELL_V6:
|
||||
zxdg_toplevel_v6_set_app_id (impl->display_server.zxdg_toplevel_v6,
|
||||
app_id);
|
||||
break;
|
||||
}
|
||||
gdk_wayland_window_set_application_id (window, app_id);
|
||||
|
||||
maybe_set_gtk_surface_dbus_properties (window);
|
||||
maybe_set_gtk_surface_modal (window);
|
||||
@@ -2182,7 +2377,7 @@ get_real_parent_and_translate (GdkWindow *window,
|
||||
GDK_WINDOW_IMPL_WAYLAND (parent->impl);
|
||||
GdkWindow *effective_parent = gdk_window_get_effective_parent (parent);
|
||||
|
||||
if ((gdk_window_has_native (parent) &&
|
||||
if (parent == NULL || (gdk_window_has_native (parent) &&
|
||||
!parent_impl->display_server.wl_subsurface) ||
|
||||
!effective_parent)
|
||||
break;
|
||||
@@ -2209,8 +2404,10 @@ translate_to_real_parent_window_geometry (GdkWindow *window,
|
||||
|
||||
parent = get_real_parent_and_translate (window, x, y);
|
||||
|
||||
*x -= parent->shadow_left;
|
||||
*y -= parent->shadow_top;
|
||||
if (parent != NULL) {
|
||||
*x -= parent->shadow_left;
|
||||
*y -= parent->shadow_top;
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
@@ -2224,8 +2421,13 @@ translate_from_real_parent_window_geometry (GdkWindow *window,
|
||||
|
||||
parent = get_real_parent_and_translate (window, &dx, &dy);
|
||||
|
||||
*x -= dx - parent->shadow_left;
|
||||
*y -= dy - parent->shadow_top;
|
||||
*x -= dx;
|
||||
*y -= dy;
|
||||
|
||||
if (parent != NULL) {
|
||||
*x += parent->shadow_left;
|
||||
*y += parent->shadow_top;
|
||||
}
|
||||
|
||||
return parent;
|
||||
}
|
||||
@@ -2405,12 +2607,17 @@ calculate_moved_to_rect_result (GdkWindow *window,
|
||||
gboolean *flipped_x,
|
||||
gboolean *flipped_y)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
GdkWindowImplWayland *impl;
|
||||
GdkWindow *parent;
|
||||
gint window_x, window_y;
|
||||
gint window_width, window_height;
|
||||
GdkRectangle best_rect;
|
||||
|
||||
g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (window->impl));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
parent = translate_from_real_parent_window_geometry (window, &x, &y);
|
||||
*final_rect = (GdkRectangle) {
|
||||
.x = x,
|
||||
@@ -2825,10 +3032,6 @@ should_map_as_popup (GdkWindow *window)
|
||||
if (impl->grab_input_seat)
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
g_message ("Window %p is a temporary window without parent, "
|
||||
"application will not be able to position it on screen.",
|
||||
window);
|
||||
}
|
||||
|
||||
/* Yet we need to keep the window type hint tests for compatibility */
|
||||
@@ -2913,6 +3116,16 @@ gdk_wayland_window_map (GdkWindow *window)
|
||||
if (impl->mapped || impl->use_custom_surface)
|
||||
return;
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
|
||||
{
|
||||
if (!impl->transient_for)
|
||||
{
|
||||
g_message ("Window %p is a temporary window without parent, "
|
||||
"application will not be able to position it on screen.",
|
||||
window);
|
||||
}
|
||||
}
|
||||
|
||||
if (should_map_as_subsurface (window))
|
||||
{
|
||||
if (impl->transient_for)
|
||||
@@ -3165,7 +3378,11 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
|
||||
|
||||
if (impl->display_server.gtk_surface)
|
||||
{
|
||||
gtk_surface1_destroy (impl->display_server.gtk_surface);
|
||||
if (display_wayland->gtk_shell_version >=
|
||||
GTK_SURFACE1_RELEASE_SINCE_VERSION)
|
||||
gtk_surface1_release (impl->display_server.gtk_surface);
|
||||
else
|
||||
gtk_surface1_destroy (impl->display_server.gtk_surface);
|
||||
impl->display_server.gtk_surface = NULL;
|
||||
impl->application.was_set = FALSE;
|
||||
}
|
||||
@@ -3178,6 +3395,7 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
|
||||
|
||||
wl_surface_destroy (impl->display_server.wl_surface);
|
||||
impl->display_server.wl_surface = NULL;
|
||||
impl->surface_callback = NULL;
|
||||
|
||||
g_slist_free (impl->display_server.outputs);
|
||||
impl->display_server.outputs = NULL;
|
||||
@@ -3311,17 +3529,37 @@ gdk_window_wayland_move_resize (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
if (window->state & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED))
|
||||
if (window->state & (GDK_WINDOW_STATE_FULLSCREEN |
|
||||
GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_TILED))
|
||||
{
|
||||
impl->saved_width = width;
|
||||
impl->saved_height = height;
|
||||
impl->saved_size_changed = (width > 0 && height > 0);
|
||||
}
|
||||
|
||||
/* If this function is called with width and height = -1 then that means
|
||||
* just move the window - don't update its size
|
||||
*/
|
||||
if (width > 0 && height > 0)
|
||||
gdk_wayland_window_maybe_configure (window, width, height, impl->scale);
|
||||
{
|
||||
if (!should_use_fixed_size (window->state) ||
|
||||
(width == impl->fixed_size_width &&
|
||||
height == impl->fixed_size_height))
|
||||
{
|
||||
gdk_wayland_window_maybe_configure (window,
|
||||
width,
|
||||
height,
|
||||
impl->scale);
|
||||
}
|
||||
else if (!should_inhibit_resize (window))
|
||||
{
|
||||
gdk_wayland_window_configure (window,
|
||||
window->width,
|
||||
window->height,
|
||||
impl->scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Avoid zero width/height as this is a protocol error */
|
||||
@@ -3760,14 +3998,18 @@ gdk_wayland_window_set_geometry_hints (GdkWindow *window,
|
||||
|
||||
if (geom_mask & GDK_HINT_MIN_SIZE)
|
||||
{
|
||||
min_width = MAX (0, geometry->min_width - (impl->margin_left + impl->margin_right));
|
||||
min_height = MAX (0, geometry->min_height - (impl->margin_top + impl->margin_bottom));
|
||||
min_width =
|
||||
MAX (0, calculate_width_without_margin (window, geometry->min_width));
|
||||
min_height =
|
||||
MAX (0, calculate_height_without_margin (window, geometry->min_height));
|
||||
}
|
||||
|
||||
if (geom_mask & GDK_HINT_MAX_SIZE)
|
||||
{
|
||||
max_width = MAX (0, geometry->max_width - (impl->margin_left + impl->margin_right));
|
||||
max_height = MAX (0, geometry->max_height - (impl->margin_top + impl->margin_bottom));
|
||||
max_width =
|
||||
MAX (0, calculate_width_without_margin (window, geometry->max_width));
|
||||
max_height =
|
||||
MAX (0, calculate_height_without_margin (window, geometry->max_height));
|
||||
}
|
||||
|
||||
switch (display_wayland->shell_variant)
|
||||
@@ -4446,10 +4688,10 @@ gdk_wayland_window_set_shadow_width (GdkWindow *window,
|
||||
return;
|
||||
|
||||
/* Reconfigure window to keep the same window geometry */
|
||||
new_width = window->width -
|
||||
(impl->margin_left + impl->margin_right) + (left + right);
|
||||
new_height = window->height -
|
||||
(impl->margin_top + impl->margin_bottom) + (top + bottom);
|
||||
new_width = (calculate_width_without_margin (window, window->width) +
|
||||
(left + right));
|
||||
new_height = (calculate_height_without_margin (window, window->height) +
|
||||
(top + bottom));
|
||||
gdk_wayland_window_maybe_configure (window, new_width, new_height, impl->scale);
|
||||
|
||||
impl->margin_left = left;
|
||||
@@ -5181,10 +5423,16 @@ void
|
||||
gdk_wayland_window_restore_shortcuts (GdkWindow *window,
|
||||
GdkSeat *gdk_seat)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
struct wl_seat *seat = gdk_wayland_seat_get_wl_seat (gdk_seat);
|
||||
GdkWindowImplWayland *impl;
|
||||
struct wl_seat *seat;
|
||||
struct zwp_keyboard_shortcuts_inhibitor_v1 *inhibitor;
|
||||
|
||||
g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (window->impl));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
seat = gdk_wayland_seat_get_wl_seat (gdk_seat);
|
||||
|
||||
inhibitor = gdk_wayland_window_get_inhibitor (impl, seat);
|
||||
if (inhibitor == NULL)
|
||||
return; /* Not inhibitted */
|
||||
@@ -5193,3 +5441,71 @@ gdk_wayland_window_restore_shortcuts (GdkWindow *window,
|
||||
g_hash_table_remove (impl->shortcuts_inhibitors, seat);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_wayland_window_add_frame_callback_surface:
|
||||
* @window: the #GdkWindow requesting callbacks
|
||||
* @surface: the wl_surface to add
|
||||
*
|
||||
* Add @surface to a list of surfaces for which frame callback
|
||||
* listeners will get set up, additionally to the one of @window.
|
||||
*
|
||||
* This is useful when clients use subsurfaces independently of GDK.
|
||||
* For example if a client creates a subsurface that covers @window
|
||||
* entirely. If this subsurface is opaque, Wayland compositors may not
|
||||
* emit callbacks for the surface of @window any more.
|
||||
* Adding the covering subsurface via this function ensures the
|
||||
* @window will continue to update.
|
||||
*
|
||||
* A single callback is sufficient to trigger the next update. If more
|
||||
* than one are triggered, the later ones will get ignored.
|
||||
*
|
||||
* Before @surface gets destroyed it must get removed again using
|
||||
* gdk_wayland_window_remove_frame_callback_surface().
|
||||
*
|
||||
* Note that the client is responsible to commit the @surface.
|
||||
* One way to archive this is to always commit after the
|
||||
* #GdkSurface::after-paint signal was triggered.
|
||||
*
|
||||
* Since: 3.24.25
|
||||
*/
|
||||
void
|
||||
gdk_wayland_window_add_frame_callback_surface (GdkWindow *window,
|
||||
struct wl_surface *surface)
|
||||
{
|
||||
GdkWindowImplWayland *impl;
|
||||
|
||||
g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (window->impl));
|
||||
g_return_if_fail (surface != NULL);
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
g_hash_table_insert (impl->frame_callback_surfaces, surface, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_wayland_window_remove_frame_callback_surface:
|
||||
* @window: the #GdkWindow requesting callbacks
|
||||
* @surface: the surface to remove
|
||||
*
|
||||
* Remove @surface from the list of surfaces again that got added via
|
||||
* gdk_wayland_window_add_frame_callback_surface().
|
||||
*
|
||||
* This function must be called before @surface gets destroyed.
|
||||
*
|
||||
* Since: 3.24.25
|
||||
*/
|
||||
void
|
||||
gdk_wayland_window_remove_frame_callback_surface (GdkWindow *window,
|
||||
struct wl_surface *surface)
|
||||
{
|
||||
GdkWindowImplWayland *impl;
|
||||
|
||||
g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (window->impl));
|
||||
g_return_if_fail (surface != NULL);
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
g_hash_table_remove (impl->frame_callback_surfaces, surface);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ proto_sources = [
|
||||
['keyboard-shortcuts-inhibit', 'unstable', 'v1', ],
|
||||
['server-decoration', 'private' ],
|
||||
['xdg-output', 'unstable', 'v1', ],
|
||||
['primary-selection', 'unstable', 'v1', ],
|
||||
]
|
||||
|
||||
gdk_wayland_gen_headers = []
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<protocol name="gtk">
|
||||
|
||||
<interface name="gtk_shell1" version="3">
|
||||
<interface name="gtk_shell1" version="4">
|
||||
<description summary="gtk specific extensions">
|
||||
gtk_shell is a protocol extension providing additional features for
|
||||
clients implementing it.
|
||||
@@ -35,7 +35,7 @@
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="gtk_surface1" version="3">
|
||||
<interface name="gtk_surface1" version="4">
|
||||
<request name="set_dbus_properties">
|
||||
<arg name="application_id" type="string" allow-null="true"/>
|
||||
<arg name="app_menu_path" type="string" allow-null="true"/>
|
||||
@@ -82,6 +82,9 @@
|
||||
<request name="request_focus" since="3">
|
||||
<arg name="startup_id" type="string" allow-null="true"/>
|
||||
</request>
|
||||
|
||||
<!-- Version 4 additions -->
|
||||
<request name="release" type="destructor" since="4"/>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
|
||||
@@ -107,10 +107,10 @@ gdk3_win32_HEADERS_INST = $(libgdkwin32include_HEADERS)
|
||||
|
||||
gdk3_win32_HEADERS_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
include $(top_srcdir)/win32/Makefile.msvcproj
|
||||
|
||||
dist-hook: \
|
||||
$(top_builddir)/build/win32/vs9/gdk3-win32.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/gdk3-win32.headers
|
||||
$(top_builddir)/win32/vs9/gdk3-win32.vcproj \
|
||||
$(top_builddir)/win32/vs9/gdk3-win32.headers
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
|
||||
#include "gdkwin32langnotification.h"
|
||||
|
||||
#ifndef IMAGE_FILE_MACHINE_ARM64
|
||||
# define IMAGE_FILE_MACHINE_ARM64 0xAA64
|
||||
#endif
|
||||
|
||||
static int debug_indent = 0;
|
||||
|
||||
static GdkMonitor *
|
||||
@@ -523,8 +527,6 @@ gdk_win32_display_supports_selection_notification (GdkDisplay *display)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static HWND _hwnd_next_viewer = NULL;
|
||||
|
||||
/*
|
||||
* maybe this should be integrated with the default message loop - or maybe not ;-)
|
||||
*/
|
||||
@@ -538,24 +540,11 @@ inner_clipboard_window_procedure (HWND hwnd,
|
||||
{
|
||||
case WM_DESTROY: /* remove us from chain */
|
||||
{
|
||||
ChangeClipboardChain (hwnd, _hwnd_next_viewer);
|
||||
RemoveClipboardFormatListener (hwnd);
|
||||
PostQuitMessage (0);
|
||||
return 0;
|
||||
}
|
||||
case WM_CHANGECBCHAIN:
|
||||
{
|
||||
HWND hwndRemove = (HWND) wparam; /* handle of window being removed */
|
||||
HWND hwndNext = (HWND) lparam; /* handle of next window in chain */
|
||||
|
||||
if (hwndRemove == _hwnd_next_viewer)
|
||||
_hwnd_next_viewer = hwndNext == hwnd ? NULL : hwndNext;
|
||||
else if (_hwnd_next_viewer != NULL)
|
||||
return SendMessage (_hwnd_next_viewer, message, wparam, lparam);
|
||||
|
||||
return 0;
|
||||
}
|
||||
case WM_CLIPBOARDUPDATE:
|
||||
case WM_DRAWCLIPBOARD:
|
||||
{
|
||||
HWND hwnd_owner;
|
||||
HWND stored_hwnd_owner;
|
||||
@@ -632,9 +621,6 @@ inner_clipboard_window_procedure (HWND hwnd,
|
||||
event->owner_change.selection_time = GDK_CURRENT_TIME;
|
||||
_gdk_win32_append_event (event);
|
||||
|
||||
if (_hwnd_next_viewer != NULL)
|
||||
return SendMessage (_hwnd_next_viewer, message, wparam, lparam);
|
||||
|
||||
/* clear error to avoid confusing SetClipboardViewer() return */
|
||||
SetLastError (0);
|
||||
return 0;
|
||||
@@ -694,16 +680,10 @@ register_clipboard_notification (GdkDisplay *display)
|
||||
goto failed;
|
||||
|
||||
SetLastError (0);
|
||||
_hwnd_next_viewer = SetClipboardViewer (display_win32->clipboard_hwnd);
|
||||
|
||||
if (_hwnd_next_viewer == NULL && GetLastError() != 0)
|
||||
if (AddClipboardFormatListener (display_win32->clipboard_hwnd) == FALSE)
|
||||
goto failed;
|
||||
|
||||
/* FIXME: http://msdn.microsoft.com/en-us/library/ms649033(v=VS.85).aspx */
|
||||
/* This is only supported by Vista, and not yet by mingw64 */
|
||||
/* if (AddClipboardFormatListener (hwnd) == FALSE) */
|
||||
/* goto failed; */
|
||||
|
||||
return TRUE;
|
||||
|
||||
failed:
|
||||
@@ -850,7 +830,6 @@ gdk_win32_display_dispose (GObject *object)
|
||||
{
|
||||
DestroyWindow (display_win32->clipboard_hwnd);
|
||||
display_win32->clipboard_hwnd = NULL;
|
||||
_hwnd_next_viewer = NULL;
|
||||
}
|
||||
|
||||
if (display_win32->have_at_least_win81)
|
||||
@@ -1059,6 +1038,40 @@ _gdk_win32_enable_hidpi (GdkWin32Display *display)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_win32_check_on_arm64 (GdkWin32Display *display)
|
||||
{
|
||||
static gsize checked = 0;
|
||||
|
||||
if (g_once_init_enter (&checked))
|
||||
{
|
||||
HMODULE kernel32 = LoadLibraryW (L"kernel32.dll");
|
||||
|
||||
if (kernel32 != NULL)
|
||||
{
|
||||
display->cpu_funcs.isWow64Process2 =
|
||||
(funcIsWow64Process2) GetProcAddress (kernel32, "IsWow64Process2");
|
||||
|
||||
if (display->cpu_funcs.isWow64Process2 != NULL)
|
||||
{
|
||||
USHORT proc_cpu = 0;
|
||||
USHORT native_cpu = 0;
|
||||
|
||||
display->cpu_funcs.isWow64Process2 (GetCurrentProcess (),
|
||||
&proc_cpu,
|
||||
&native_cpu);
|
||||
|
||||
if (native_cpu == IMAGE_FILE_MACHINE_ARM64)
|
||||
display->running_on_arm64 = TRUE;
|
||||
}
|
||||
|
||||
FreeLibrary (kernel32);
|
||||
}
|
||||
|
||||
g_once_init_leave (&checked, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_display_init (GdkWin32Display *display)
|
||||
{
|
||||
@@ -1067,6 +1080,7 @@ gdk_win32_display_init (GdkWin32Display *display)
|
||||
display->monitors = g_ptr_array_new_with_free_func (g_object_unref);
|
||||
|
||||
_gdk_win32_enable_hidpi (display);
|
||||
_gdk_win32_check_on_arm64 (display);
|
||||
|
||||
/* if we have DPI awareness, set up fixed scale if set */
|
||||
if (display->dpi_aware_type != PROCESS_DPI_UNAWARE &&
|
||||
|
||||
@@ -60,6 +60,13 @@ typedef struct _GdkWin32User32DPIFuncs
|
||||
funcIsProcessDPIAware isDpiAwareFunc;
|
||||
} GdkWin32User32DPIFuncs;
|
||||
|
||||
/* Detect running architecture */
|
||||
typedef BOOL (WINAPI *funcIsWow64Process2) (HANDLE, USHORT *, USHORT *);
|
||||
typedef struct _GdkWin32KernelCPUFuncs
|
||||
{
|
||||
funcIsWow64Process2 isWow64Process2;
|
||||
} GdkWin32KernelCPUFuncs;
|
||||
|
||||
struct _GdkWin32Display
|
||||
{
|
||||
GdkDisplay display;
|
||||
@@ -95,6 +102,9 @@ struct _GdkWin32Display
|
||||
guint hasWglARBPixelFormat : 1;
|
||||
guint hasWglARBmultisample : 1;
|
||||
|
||||
/* compensate around Intel OpenGL driver issues on blitting, see issue #3487 */
|
||||
guint needIntelGLWorkaround : 1;
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
guint hasEglKHRCreateContext : 1;
|
||||
guint hasEglSurfacelessContext : 1;
|
||||
@@ -109,6 +119,10 @@ struct _GdkWin32Display
|
||||
|
||||
GdkWin32ShcoreFuncs shcore_funcs;
|
||||
GdkWin32User32DPIFuncs user32_dpi_funcs;
|
||||
|
||||
/* Running CPU items */
|
||||
guint running_on_arm64 : 1;
|
||||
GdkWin32KernelCPUFuncs cpu_funcs;
|
||||
};
|
||||
|
||||
struct _GdkWin32DisplayClass
|
||||
|
||||
+39
-268
@@ -1863,202 +1863,6 @@ generate_button_event (GdkEventType type,
|
||||
_gdk_win32_append_event (event);
|
||||
}
|
||||
|
||||
/*
|
||||
* Used by the stacking functions to see if a window
|
||||
* should be always on top.
|
||||
* Restacking is only done if both windows are either ontop
|
||||
* or not ontop.
|
||||
*/
|
||||
static gboolean
|
||||
should_window_be_always_on_top (GdkWindow *window)
|
||||
{
|
||||
DWORD exstyle;
|
||||
|
||||
if ((GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP) ||
|
||||
(window->state & GDK_WINDOW_STATE_ABOVE))
|
||||
return TRUE;
|
||||
|
||||
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
if (exstyle & WS_EX_TOPMOST)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_stacking_on_unminimize (MSG *msg)
|
||||
{
|
||||
HWND rover;
|
||||
HWND lowest_transient = NULL;
|
||||
GdkWindow *msg_window;
|
||||
gboolean window_ontop = FALSE;
|
||||
|
||||
msg_window = gdk_win32_handle_table_lookup (msg->hwnd);
|
||||
|
||||
if (msg_window)
|
||||
window_ontop = should_window_be_always_on_top (msg_window);
|
||||
|
||||
for (rover = GetNextWindow (msg->hwnd, GW_HWNDNEXT);
|
||||
rover;
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT))
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkWindowImplWin32 *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw == NULL)
|
||||
continue;
|
||||
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL) &&
|
||||
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
|
||||
{
|
||||
lowest_transient = rover;
|
||||
}
|
||||
}
|
||||
|
||||
if (lowest_transient != NULL)
|
||||
{
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" restacking %p above %p",
|
||||
msg->hwnd, lowest_transient));
|
||||
SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ensure_stacking_on_window_pos_changing (MSG *msg,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
WINDOWPOS *windowpos = (WINDOWPOS *) msg->lParam;
|
||||
HWND rover;
|
||||
gboolean restacking;
|
||||
gboolean window_ontop;
|
||||
|
||||
if (GetActiveWindow () != msg->hwnd ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
impl->transient_owner != NULL)
|
||||
return FALSE;
|
||||
|
||||
/* Make sure the window stays behind any transient-type windows
|
||||
* of the same window group.
|
||||
*
|
||||
* If the window is not active and being activated, we let
|
||||
* Windows bring it to the top and rely on the WM_ACTIVATEAPP
|
||||
* handling to bring any utility windows on top of it.
|
||||
*/
|
||||
|
||||
window_ontop = should_window_be_always_on_top (window);
|
||||
|
||||
for (rover = windowpos->hwndInsertAfter, restacking = FALSE;
|
||||
rover;
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT))
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkWindowImplWin32 *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
|
||||
if (rover_gdkw == NULL)
|
||||
continue;
|
||||
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL) &&
|
||||
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
|
||||
{
|
||||
restacking = TRUE;
|
||||
windowpos->hwndInsertAfter = rover;
|
||||
}
|
||||
}
|
||||
|
||||
if (restacking)
|
||||
{
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" letting Windows restack %p above %p",
|
||||
msg->hwnd, windowpos->hwndInsertAfter));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_stacking_on_activate_app (MSG *msg,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
HWND rover;
|
||||
gboolean window_ontop;
|
||||
|
||||
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
impl->transient_owner != NULL)
|
||||
{
|
||||
SetWindowPos (msg->hwnd, HWND_TOP, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsWindowVisible (msg->hwnd) ||
|
||||
msg->hwnd != GetActiveWindow ())
|
||||
return;
|
||||
|
||||
|
||||
/* This window is not a transient-type window and it is the
|
||||
* activated window. Make sure this window is as visible as
|
||||
* possible, just below the lowest transient-type window of this
|
||||
* app.
|
||||
*/
|
||||
|
||||
window_ontop = should_window_be_always_on_top (window);
|
||||
|
||||
for (rover = GetNextWindow (msg->hwnd, GW_HWNDPREV);
|
||||
rover;
|
||||
rover = GetNextWindow (rover, GW_HWNDPREV))
|
||||
{
|
||||
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkWindowImplWin32 *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
if (rover_gdkw == NULL)
|
||||
continue;
|
||||
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
|
||||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
|
||||
rover_impl->transient_owner != NULL) &&
|
||||
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
|
||||
{
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" restacking %p above %p",
|
||||
msg->hwnd, rover));
|
||||
SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
handle_wm_sysmenu (GdkWindow *window, MSG *msg, gint *ret_valp)
|
||||
{
|
||||
@@ -2556,31 +2360,6 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
API_CALL (GetKeyboardState, (key_state));
|
||||
|
||||
ccount = 0;
|
||||
|
||||
if (msg->wParam == VK_PACKET)
|
||||
{
|
||||
ccount = ToUnicode (VK_PACKET, HIWORD (msg->lParam), key_state, wbuf, 1, 0);
|
||||
if (ccount == 1)
|
||||
{
|
||||
if (wbuf[0] >= 0xD800 && wbuf[0] < 0xDC00)
|
||||
{
|
||||
if (msg->message == WM_KEYDOWN)
|
||||
impl->leading_surrogate_keydown = wbuf[0];
|
||||
else
|
||||
impl->leading_surrogate_keyup = wbuf[0];
|
||||
|
||||
/* don't emit an event */
|
||||
return_val = TRUE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* wait until an event is created */;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
event = gdk_event_new ((msg->message == WM_KEYDOWN ||
|
||||
msg->message == WM_SYSKEYDOWN) ?
|
||||
GDK_KEY_PRESS : GDK_KEY_RELEASE);
|
||||
@@ -2595,6 +2374,39 @@ gdk_event_translate (MSG *msg,
|
||||
gdk_event_set_device (event, device_manager_win32->core_keyboard);
|
||||
gdk_event_set_source_device (event, device_manager_win32->system_keyboard);
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager_win32->core_keyboard));
|
||||
|
||||
/* Get the WinAPI translation of the WM_KEY messages to characters.
|
||||
|
||||
The WM_CHAR messages are generated by a previous call to TranslateMessage() and always
|
||||
follow directly after the corresponding WM_KEY* messages.
|
||||
There could be 0 or more WM_CHAR messages following (for example dead keys don't generate
|
||||
WM_CHAR messages - they generate WM_DEAD_CHAR instead, but we are not interested in those
|
||||
messages). */
|
||||
|
||||
if (gdk_event_is_allocated (event)) /* Should always be true */
|
||||
{
|
||||
GdkEventPrivate *event_priv = (GdkEventPrivate*) event;
|
||||
|
||||
MSG msg2;
|
||||
while (PeekMessageW (&msg2, msg->hwnd, 0, 0, 0) && (msg2.message == WM_CHAR || msg2.message == WM_SYSCHAR))
|
||||
{
|
||||
/* The character is encoded in WPARAM as UTF-16. */
|
||||
gunichar2 c = msg2.wParam;
|
||||
|
||||
/* Ignore control sequences like Backspace */
|
||||
if (!g_unichar_iscntrl(c))
|
||||
{
|
||||
/* Append character to translation string. */
|
||||
event_priv->translation_len ++;
|
||||
event_priv->translation = g_realloc (event_priv->translation, event_priv->translation_len * sizeof (event_priv->translation[0]));
|
||||
event_priv->translation[event_priv->translation_len - 1] = c;
|
||||
}
|
||||
|
||||
/* Remove message from queue */
|
||||
GetMessageW (&msg2, msg->hwnd, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (HIWORD (msg->lParam) & KF_EXTENDED)
|
||||
{
|
||||
switch (msg->wParam)
|
||||
@@ -2623,42 +2435,12 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
build_key_event_state (event, key_state);
|
||||
|
||||
if (msg->wParam == VK_PACKET && ccount == 1)
|
||||
{
|
||||
if (wbuf[0] >= 0xD800 && wbuf[0] < 0xDC00)
|
||||
{
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
else if (wbuf[0] >= 0xDC00 && wbuf[0] < 0xE000)
|
||||
{
|
||||
wchar_t leading;
|
||||
|
||||
if (msg->message == WM_KEYDOWN)
|
||||
leading = impl->leading_surrogate_keydown;
|
||||
else
|
||||
leading = impl->leading_surrogate_keyup;
|
||||
|
||||
event->key.keyval = gdk_unicode_to_keyval ((leading - 0xD800) * 0x400 + wbuf[0] - 0xDC00 + 0x10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
event->key.keyval = gdk_unicode_to_keyval (wbuf[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_keymap_translate_keyboard_state (_gdk_win32_display_get_keymap (display),
|
||||
event->key.hardware_keycode,
|
||||
event->key.state,
|
||||
event->key.group,
|
||||
&event->key.keyval,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
if (msg->message == WM_KEYDOWN)
|
||||
impl->leading_surrogate_keydown = 0;
|
||||
else
|
||||
impl->leading_surrogate_keyup = 0;
|
||||
gdk_keymap_translate_keyboard_state (_gdk_win32_display_get_keymap (display),
|
||||
event->key.hardware_keycode,
|
||||
event->key.state,
|
||||
event->key.group,
|
||||
&event->key.keyval,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
fill_key_event_string (event);
|
||||
|
||||
@@ -3389,8 +3171,6 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
{
|
||||
return_val = ensure_stacking_on_window_pos_changing (msg, window);
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
|
||||
if (impl->maximizing)
|
||||
@@ -3480,13 +3260,6 @@ gdk_event_translate (MSG *msg,
|
||||
if ((old_state & GDK_WINDOW_STATE_ICONIFIED) !=
|
||||
(new_state & GDK_WINDOW_STATE_ICONIFIED))
|
||||
do_show_window (window, (new_state & GDK_WINDOW_STATE_ICONIFIED));
|
||||
|
||||
|
||||
/* When un-minimizing, make sure we're stacked under any
|
||||
transient-type windows. */
|
||||
if (!(old_state & GDK_WINDOW_STATE_ICONIFIED) &&
|
||||
(new_state & GDK_WINDOW_STATE_ICONIFIED))
|
||||
ensure_stacking_on_unminimize (msg);
|
||||
}
|
||||
|
||||
/* Show, New size or position => configure event */
|
||||
@@ -3968,8 +3741,6 @@ gdk_event_translate (MSG *msg,
|
||||
GDK_NOTE (EVENTS, g_print (" %s thread: %" G_GINT64_FORMAT,
|
||||
msg->wParam ? "YES" : "NO",
|
||||
(gint64) msg->lParam));
|
||||
if (msg->wParam && GDK_WINDOW_IS_MAPPED (window))
|
||||
ensure_stacking_on_activate_app (msg, window);
|
||||
break;
|
||||
case WM_NCHITTEST:
|
||||
/* TODO: pass all messages to DwmDefWindowProc() first! */
|
||||
|
||||
@@ -123,21 +123,34 @@ gdk_win32_gl_context_init (GdkWin32GLContext *self)
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_gl_blit_region (GdkWindow *window, cairo_region_t *region)
|
||||
gdk_gl_blit_region (GdkWindow *window,
|
||||
cairo_region_t *region,
|
||||
gboolean use_intel_workaround)
|
||||
{
|
||||
int n_rects, i;
|
||||
int n_rects, i, j;
|
||||
int scale = gdk_window_get_scale_factor (window);
|
||||
int wh = gdk_window_get_height (window);
|
||||
cairo_rectangle_int_t rect;
|
||||
int retries = 0;
|
||||
|
||||
if (use_intel_workaround)
|
||||
retries = 1;
|
||||
|
||||
n_rects = cairo_region_num_rectangles (region);
|
||||
for (i = 0; i < n_rects; i++)
|
||||
|
||||
for (i = 0; i <= retries; i ++)
|
||||
{
|
||||
cairo_region_get_rectangle (region, i, &rect);
|
||||
glScissor (rect.x * scale, (wh - rect.y - rect.height) * scale, rect.width * scale, rect.height * scale);
|
||||
glBlitFramebuffer (rect.x * scale, (wh - rect.y - rect.height) * scale, (rect.x + rect.width) * scale, (wh - rect.y) * scale,
|
||||
rect.x * scale, (wh - rect.y - rect.height) * scale, (rect.x + rect.width) * scale, (wh - rect.y) * scale,
|
||||
GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
||||
for (j = 0; j < n_rects; j++)
|
||||
{
|
||||
cairo_region_get_rectangle (region, j, &rect);
|
||||
glScissor (rect.x * scale, (wh - rect.y - rect.height) * scale, rect.width * scale, rect.height * scale);
|
||||
glBlitFramebuffer (rect.x * scale, (wh - rect.y - rect.height) * scale, (rect.x + rect.width) * scale, (wh - rect.y) * scale,
|
||||
rect.x * scale, (wh - rect.y - rect.height) * scale, (rect.x + rect.width) * scale, (wh - rect.y) * scale,
|
||||
GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
||||
}
|
||||
|
||||
if (retries > 0 && i < retries)
|
||||
glFlush ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +219,7 @@ _gdk_win32_gl_context_end_frame (GdkGLContext *context,
|
||||
{
|
||||
glDrawBuffer(GL_FRONT);
|
||||
glReadBuffer(GL_BACK);
|
||||
gdk_gl_blit_region (window, painted);
|
||||
gdk_gl_blit_region (window, painted, display->needIntelGLWorkaround);
|
||||
glDrawBuffer(GL_BACK);
|
||||
glFlush();
|
||||
|
||||
@@ -224,7 +237,7 @@ _gdk_win32_gl_context_end_frame (GdkGLContext *context,
|
||||
gboolean force_egl_redraw_all = _get_is_egl_force_redraw (window);
|
||||
|
||||
if (context_win32->do_blit_swap && !force_egl_redraw_all)
|
||||
gdk_gl_blit_region (window, painted);
|
||||
gdk_gl_blit_region (window, painted, FALSE);
|
||||
else if (force_egl_redraw_all)
|
||||
{
|
||||
GdkRectangle rect = {0, 0, gdk_window_get_width (window), gdk_window_get_height (window)};
|
||||
@@ -577,7 +590,9 @@ _gdk_win32_display_init_gl (GdkDisplay *display,
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
EGLDisplay egl_disp;
|
||||
disable_wgl = (_gdk_gl_flags & GDK_GL_GLES) != 0;
|
||||
|
||||
disable_wgl = ((_gdk_gl_flags & GDK_GL_GLES) != 0) ||
|
||||
display_win32->running_on_arm64;
|
||||
#endif
|
||||
|
||||
if (display_win32->have_wgl
|
||||
@@ -614,10 +629,13 @@ _gdk_win32_display_init_gl (GdkDisplay *display,
|
||||
epoxy_has_wgl_extension (dummy.hdc, "WGL_ARB_pixel_format");
|
||||
display_win32->hasWglARBmultisample =
|
||||
epoxy_has_wgl_extension (dummy.hdc, "WGL_ARB_multisample");
|
||||
display_win32->needIntelGLWorkaround =
|
||||
(g_ascii_strcasecmp (glGetString (GL_VENDOR), "intel") == 0);
|
||||
|
||||
GDK_NOTE (OPENGL,
|
||||
g_print ("WGL API version %d.%d found\n"
|
||||
" - Vendor: %s\n"
|
||||
" - Intel OpenGL workaround: %s\n"
|
||||
" - Checked extensions:\n"
|
||||
"\t* WGL_ARB_pixel_format: %s\n"
|
||||
"\t* WGL_ARB_create_context: %s\n"
|
||||
@@ -627,6 +645,7 @@ _gdk_win32_display_init_gl (GdkDisplay *display,
|
||||
display_win32->gl_version / 10,
|
||||
display_win32->gl_version % 10,
|
||||
glGetString (GL_VENDOR),
|
||||
display_win32->needIntelGLWorkaround ? "yes" : "no",
|
||||
display_win32->hasWglARBPixelFormat ? "yes" : "no",
|
||||
display_win32->hasWglARBCreateContext ? "yes" : "no",
|
||||
display_win32->hasWglEXTSwapControl ? "yes" : "no",
|
||||
|
||||
@@ -559,6 +559,7 @@ enum_monitor (HMONITOR hmonitor,
|
||||
DEVMODEW dm;
|
||||
DWORD i_monitor;
|
||||
DWORD frequency;
|
||||
GdkWin32MonitorRotation orientation;
|
||||
|
||||
memset (&dd, 0, sizeof (dd));
|
||||
dd.cb = sizeof (dd);
|
||||
@@ -577,12 +578,36 @@ enum_monitor (HMONITOR hmonitor,
|
||||
continue;
|
||||
|
||||
dm.dmSize = sizeof (dm);
|
||||
dm.dmDriverExtra = 0;
|
||||
frequency = 0;
|
||||
orientation = GDK_WIN32_MONITOR_ROTATION_UNKNOWN;
|
||||
|
||||
/* Grab refresh rate for this adapter while we're at it */
|
||||
if (EnumDisplaySettingsW (dd.DeviceName, ENUM_CURRENT_SETTINGS, &dm))
|
||||
frequency = dm.dmDisplayFrequency;
|
||||
else
|
||||
frequency = 0;
|
||||
if (EnumDisplaySettingsExW (dd.DeviceName, ENUM_CURRENT_SETTINGS, &dm, 0))
|
||||
{
|
||||
if ((dm.dmFields & DM_DISPLAYORIENTATION) == DM_DISPLAYORIENTATION)
|
||||
{
|
||||
switch (dm.dmDisplayOrientation)
|
||||
{
|
||||
default:
|
||||
case DMDO_DEFAULT:
|
||||
orientation = GDK_WIN32_MONITOR_ROTATION_0;
|
||||
break;
|
||||
case DMDO_90:
|
||||
orientation = GDK_WIN32_MONITOR_ROTATION_90;
|
||||
break;
|
||||
case DMDO_180:
|
||||
orientation = GDK_WIN32_MONITOR_ROTATION_180;
|
||||
break;
|
||||
case DMDO_270:
|
||||
orientation = GDK_WIN32_MONITOR_ROTATION_270;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((dm.dmFields & DM_DISPLAYFREQUENCY) == DM_DISPLAYFREQUENCY)
|
||||
frequency = dm.dmDisplayFrequency;
|
||||
}
|
||||
|
||||
/* Enumerate monitors connected to this display adapter */
|
||||
for (i_monitor = 0; TRUE; i_monitor++)
|
||||
@@ -744,6 +769,7 @@ enum_monitor (HMONITOR hmonitor,
|
||||
* keep remove == TRUE and be removed further up the stack.
|
||||
*/
|
||||
w32mon->remove = FALSE;
|
||||
w32mon->orientation = orientation;
|
||||
|
||||
/* One virtual monitor per display adapter */
|
||||
if (w32mon->madeup)
|
||||
@@ -770,6 +796,58 @@ prune_monitors (EnumMonitorData *data)
|
||||
}
|
||||
}
|
||||
|
||||
const gchar *
|
||||
_gdk_win32_monitor_get_pixel_structure (GdkMonitor *monitor)
|
||||
{
|
||||
GdkWin32Monitor *w32_m;
|
||||
BOOL enabled = TRUE;
|
||||
unsigned int smoothing_orientation = FE_FONTSMOOTHINGORIENTATIONRGB;
|
||||
UINT cleartype = FE_FONTSMOOTHINGCLEARTYPE;
|
||||
|
||||
g_return_val_if_fail (monitor != NULL, NULL);
|
||||
|
||||
w32_m = GDK_WIN32_MONITOR (monitor);
|
||||
|
||||
SystemParametersInfoW (SPI_GETFONTSMOOTHING, 0, &enabled, 0);
|
||||
SystemParametersInfoW (SPI_GETFONTSMOOTHINGTYPE, 0, &cleartype, 0);
|
||||
|
||||
if (!enabled ||
|
||||
(cleartype == FE_FONTSMOOTHINGSTANDARD) ||
|
||||
!SystemParametersInfoW (SPI_GETFONTSMOOTHINGORIENTATION, 0, &smoothing_orientation, 0))
|
||||
return "none";
|
||||
|
||||
if (smoothing_orientation == FE_FONTSMOOTHINGORIENTATIONBGR)
|
||||
switch (w32_m->orientation)
|
||||
{
|
||||
default:
|
||||
case GDK_WIN32_MONITOR_ROTATION_UNKNOWN:
|
||||
return "none";
|
||||
case GDK_WIN32_MONITOR_ROTATION_0:
|
||||
return "bgr";
|
||||
case GDK_WIN32_MONITOR_ROTATION_90:
|
||||
return "vbgr";
|
||||
case GDK_WIN32_MONITOR_ROTATION_180:
|
||||
return "rgb";
|
||||
case GDK_WIN32_MONITOR_ROTATION_270:
|
||||
return "vrgb";
|
||||
}
|
||||
else
|
||||
switch (w32_m->orientation)
|
||||
{
|
||||
default:
|
||||
case GDK_WIN32_MONITOR_ROTATION_UNKNOWN:
|
||||
return "none";
|
||||
case GDK_WIN32_MONITOR_ROTATION_0:
|
||||
return "rgb";
|
||||
case GDK_WIN32_MONITOR_ROTATION_90:
|
||||
return "vrgb";
|
||||
case GDK_WIN32_MONITOR_ROTATION_180:
|
||||
return "bgr";
|
||||
case GDK_WIN32_MONITOR_ROTATION_270:
|
||||
return "vbgr";
|
||||
}
|
||||
}
|
||||
|
||||
GPtrArray *
|
||||
_gdk_win32_display_get_monitor_list (GdkWin32Display *win32_display)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,36 @@
|
||||
|
||||
#include "gdkwin32monitor.h"
|
||||
|
||||
/*
|
||||
* The number is the degrees the display is rotated clockwise
|
||||
* from its natural position.
|
||||
* I.e. most displays will have 0. A normal display
|
||||
* that is rotated by 90 degrees will
|
||||
* have 90. The same display rotated counter-clockwise
|
||||
* will have 270. The same display
|
||||
* rotated by 180 degrees (i.e. upside-down)
|
||||
* will have 180.
|
||||
* Accordingly, 0 mode
|
||||
* fontsmoothing is used as-is - i.e. it is assumed that
|
||||
* subpixel structure is horizontal (ClearType does not support
|
||||
* vertical subpixels; if the display has naturally vertical
|
||||
* subpixel structure, ClearType should be disabled altogether).
|
||||
* In 90 subpixel structure has
|
||||
* its verticality flipped (rgb -> vrgb; bgr -> vbgr).
|
||||
* In 180 subpixel structure is
|
||||
* horizontally flipped (rgb -> bgr; bgr -> rgb).
|
||||
* In 270 subpixel structure is
|
||||
* flipped both horizontally and vertically
|
||||
* (rgb -> vbgr; bgr -> vrgb).
|
||||
*/
|
||||
typedef enum _GdkWin32MonitorRotation {
|
||||
GDK_WIN32_MONITOR_ROTATION_UNKNOWN = 0,
|
||||
GDK_WIN32_MONITOR_ROTATION_0 = 1,
|
||||
GDK_WIN32_MONITOR_ROTATION_90 = 2,
|
||||
GDK_WIN32_MONITOR_ROTATION_180 = 3,
|
||||
GDK_WIN32_MONITOR_ROTATION_270 = 4,
|
||||
} GdkWin32MonitorRotation;
|
||||
|
||||
struct _GdkWin32Monitor
|
||||
{
|
||||
GdkMonitor parent;
|
||||
@@ -36,6 +66,11 @@ struct _GdkWin32Monitor
|
||||
/* Device instance path (used to match GdkWin32Monitor to monitor device) */
|
||||
gchar *instance_path;
|
||||
|
||||
/* Indicates display rotation and its normal proportions.
|
||||
* Used to determine pixel structure for subpixel smoothing.
|
||||
*/
|
||||
GdkWin32MonitorRotation orientation;
|
||||
|
||||
/* TRUE if monitor is made up by us
|
||||
* (this happens when system has logical monitors, but no physical ones).
|
||||
*/
|
||||
@@ -54,4 +89,6 @@ struct _GdkWin32MonitorClass {
|
||||
|
||||
int _gdk_win32_monitor_compare (GdkWin32Monitor *a, GdkWin32Monitor *b);
|
||||
|
||||
const gchar *_gdk_win32_monitor_get_pixel_structure (GdkMonitor *monitor);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -298,7 +298,7 @@ extern UINT _gdk_input_codepage;
|
||||
extern guint _gdk_keymap_serial;
|
||||
|
||||
/* The singleton selection object pointer */
|
||||
GdkWin32Selection *_win32_selection;
|
||||
extern GdkWin32Selection *_win32_selection;
|
||||
|
||||
void _gdk_win32_dnd_do_dragdrop (void);
|
||||
void _gdk_win32_ole2_dnd_property_change (GdkAtom type,
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "gdkproperty.h"
|
||||
#include "gdkselection.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
#include "gdkmonitor-win32.h"
|
||||
#include "gdkwin32.h"
|
||||
|
||||
GdkAtom
|
||||
@@ -368,8 +369,11 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
|
||||
}
|
||||
else if (strcmp ("gtk-xft-antialias", name) == 0)
|
||||
{
|
||||
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : 1\n", name));
|
||||
g_value_set_int (value, 1);
|
||||
BOOL val = TRUE;
|
||||
SystemParametersInfoW (SPI_GETFONTSMOOTHING, 0, &val, 0);
|
||||
g_value_set_int (value, val ? 1 : 0);
|
||||
|
||||
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : %u\n", name, val));
|
||||
return TRUE;
|
||||
}
|
||||
else if (strcmp ("gtk-xft-hintstyle", name) == 0)
|
||||
@@ -380,18 +384,11 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
|
||||
}
|
||||
else if (strcmp ("gtk-xft-rgba", name) == 0)
|
||||
{
|
||||
unsigned int orientation = 0;
|
||||
if (SystemParametersInfoW (SPI_GETFONTSMOOTHINGORIENTATION, 0, &orientation, 0))
|
||||
{
|
||||
if (orientation == FE_FONTSMOOTHINGORIENTATIONRGB)
|
||||
g_value_set_static_string (value, "rgb");
|
||||
else if (orientation == FE_FONTSMOOTHINGORIENTATIONBGR)
|
||||
g_value_set_static_string (value, "bgr");
|
||||
else
|
||||
g_value_set_static_string (value, "none");
|
||||
}
|
||||
else
|
||||
g_value_set_static_string (value, "none");
|
||||
const gchar *rgb_value;
|
||||
GdkMonitor *monitor;
|
||||
monitor = gdk_display_get_monitor (gdk_display_get_default (), 0);
|
||||
rgb_value = _gdk_win32_monitor_get_pixel_structure (monitor);
|
||||
g_value_set_static_string (value, rgb_value);
|
||||
|
||||
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : %s\n", name, g_value_get_string (value)));
|
||||
return TRUE;
|
||||
|
||||
@@ -1474,7 +1474,7 @@ show_window_internal (GdkWindow *window,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
(window->state & GDK_WINDOW_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1834,7 +1834,7 @@ gdk_win32_window_raise (GdkWindow *window)
|
||||
else
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1851,7 +1851,7 @@ gdk_win32_window_lower (GdkWindow *window)
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_BOTTOM,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2910,7 +2910,7 @@ _gdk_win32_window_update_style_bits (GdkWindow *window)
|
||||
rect.right += after.right - before.right;
|
||||
rect.bottom += after.bottom - before.bottom;
|
||||
|
||||
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION | SWP_NOOWNERZORDER;
|
||||
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION;
|
||||
|
||||
if (will_be_topmost && !was_topmost)
|
||||
{
|
||||
@@ -5372,7 +5372,7 @@ gdk_win32_window_fullscreen (GdkWindow *window)
|
||||
y - workaround_padding,
|
||||
width + (workaround_padding * 2),
|
||||
height + (workaround_padding * 2),
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5392,10 +5392,11 @@ gdk_win32_window_unfullscreen (GdkWindow *window)
|
||||
|
||||
impl->hint_flags = fi->hint_flags;
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, fi->style);
|
||||
_gdk_win32_window_invalidate_egl_framebuffer (window);
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_NOTOPMOST,
|
||||
fi->r.left, fi->r.top,
|
||||
fi->r.right - fi->r.left, fi->r.bottom - fi->r.top,
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
|
||||
|
||||
g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
|
||||
g_free (fi);
|
||||
@@ -5421,7 +5422,7 @@ gdk_win32_window_set_keep_above (GdkWindow *window,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
setting ? HWND_TOPMOST : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
|
||||
}
|
||||
|
||||
gdk_synthesize_window_state (window,
|
||||
@@ -5447,7 +5448,7 @@ gdk_win32_window_set_keep_below (GdkWindow *window,
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
setting ? HWND_BOTTOM : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
|
||||
}
|
||||
|
||||
gdk_synthesize_window_state (window,
|
||||
|
||||
@@ -240,14 +240,6 @@ struct _GdkWindowImplWin32
|
||||
HICON hicon_big;
|
||||
HICON hicon_small;
|
||||
|
||||
/* When VK_PACKET sends us a leading surrogate, it's stashed here.
|
||||
* Later, when another VK_PACKET sends a tailing surrogate, we make up
|
||||
* a full unicode character from them, or discard the leading surrogate,
|
||||
* if the next key is not a tailing surrogate.
|
||||
*/
|
||||
wchar_t leading_surrogate_keydown;
|
||||
wchar_t leading_surrogate_keyup;
|
||||
|
||||
/* Window size hints */
|
||||
gint hint_flags;
|
||||
GdkGeometry hints;
|
||||
|
||||
@@ -643,14 +643,14 @@ remove_device (GdkX11DeviceManagerXI2 *device_manager,
|
||||
if (device)
|
||||
{
|
||||
detach_from_seat (device);
|
||||
device_manager->devices = g_list_remove (device_manager->devices, device);
|
||||
|
||||
g_signal_emit_by_name (device_manager, "device-removed", device);
|
||||
|
||||
g_object_run_dispose (G_OBJECT (device));
|
||||
|
||||
g_hash_table_remove (device_manager->id_table,
|
||||
GINT_TO_POINTER (device_id));
|
||||
|
||||
device_manager->devices = g_list_remove (device_manager->devices, device);
|
||||
g_signal_emit_by_name (device_manager, "device-removed", device);
|
||||
g_object_run_dispose (G_OBJECT (device));
|
||||
g_object_unref (device);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ gdk_x11_window_invalidate_for_new_frame (GdkWindow *window,
|
||||
|
||||
|
||||
invalidate_all = FALSE;
|
||||
if (buffer_age == 0 || buffer_age >= 4)
|
||||
if (buffer_age >= 4)
|
||||
{
|
||||
cairo_rectangle_int_t whole_window = { 0, 0, gdk_window_get_width (window), gdk_window_get_height (window) };
|
||||
|
||||
@@ -163,6 +163,10 @@ gdk_x11_window_invalidate_for_new_frame (GdkWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (buffer_age == 0)
|
||||
{
|
||||
invalidate_all = TRUE;
|
||||
}
|
||||
if (buffer_age >= 2)
|
||||
{
|
||||
if (window->old_updated_area[0])
|
||||
|
||||
+18
-10
@@ -66,19 +66,27 @@ gdk_x11_monitor_get_workarea (GdkMonitor *monitor,
|
||||
|
||||
gdk_monitor_get_geometry (monitor, dest);
|
||||
|
||||
/* The EWMH constrains workarea to be a rectangle, so it
|
||||
* can't adequately deal with L-shaped monitor arrangements.
|
||||
* As a workaround, we ignore the workarea for anything
|
||||
* but the primary monitor. Since that is where the 'desktop
|
||||
* chrome' usually lives, this works ok in practice.
|
||||
*/
|
||||
if (gdk_monitor_is_primary (monitor) &&
|
||||
!gdk_monitor_has_fullscreen_window (monitor))
|
||||
if (_gdk_x11_screen_get_monitor_work_area (screen, monitor, &workarea))
|
||||
{
|
||||
gdk_x11_screen_get_work_area (screen, &workarea);
|
||||
if (gdk_rectangle_intersect (dest, &workarea, &workarea))
|
||||
if (!gdk_monitor_has_fullscreen_window (monitor))
|
||||
*dest = workarea;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The EWMH constrains workarea to be a rectangle, so it
|
||||
* can't adequately deal with L-shaped monitor arrangements.
|
||||
* As a workaround, we ignore the workarea for anything
|
||||
* but the primary monitor. Since that is where the 'desktop
|
||||
* chrome' usually lives, this works ok in practice.
|
||||
*/
|
||||
if (gdk_monitor_is_primary (monitor) &&
|
||||
!gdk_monitor_has_fullscreen_window (monitor))
|
||||
{
|
||||
gdk_x11_screen_get_work_area (screen, &workarea);
|
||||
if (gdk_rectangle_intersect (dest, &workarea, &workarea))
|
||||
*dest = workarea;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -234,6 +234,106 @@ get_current_desktop (GdkScreen *screen)
|
||||
return workspace;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_x11_screen_get_monitor_work_area (GdkScreen *screen,
|
||||
GdkMonitor *monitor,
|
||||
GdkRectangle *area)
|
||||
{
|
||||
GdkX11Screen *x11_screen;
|
||||
GdkAtom net_workareas;
|
||||
GdkDisplay *display;
|
||||
Display *xdisplay;
|
||||
int current_desktop;
|
||||
char *workareas_dn_name;
|
||||
Atom workareas_dn;
|
||||
int screen_number;
|
||||
Window xroot;
|
||||
int result;
|
||||
Atom type;
|
||||
int format;
|
||||
gulong num;
|
||||
gulong leftovers;
|
||||
guchar *ret_workarea;
|
||||
long *workareas;
|
||||
GdkRectangle geometry;
|
||||
int i;
|
||||
|
||||
x11_screen = GDK_X11_SCREEN (screen);
|
||||
|
||||
net_workareas = gdk_atom_intern_static_string ("_GTK_WORKAREAS");
|
||||
if (!gdk_x11_screen_supports_net_wm_hint (screen, net_workareas))
|
||||
return FALSE;
|
||||
|
||||
display = gdk_screen_get_display (screen);
|
||||
xdisplay = gdk_x11_display_get_xdisplay (display);
|
||||
|
||||
current_desktop = get_current_desktop (screen);
|
||||
workareas_dn_name = g_strdup_printf ("_GTK_WORKAREAS_D%d", current_desktop);
|
||||
workareas_dn = XInternAtom (xdisplay, workareas_dn_name, True);
|
||||
g_free (workareas_dn_name);
|
||||
|
||||
if (workareas_dn == None)
|
||||
return FALSE;
|
||||
|
||||
screen_number = gdk_x11_screen_get_screen_number (screen);
|
||||
xroot = XRootWindow (xdisplay, screen_number);
|
||||
|
||||
gdk_x11_display_error_trap_push (display);
|
||||
|
||||
ret_workarea = NULL;
|
||||
result = XGetWindowProperty (xdisplay,
|
||||
xroot,
|
||||
workareas_dn,
|
||||
0,
|
||||
G_MAXLONG,
|
||||
False,
|
||||
AnyPropertyType,
|
||||
&type,
|
||||
&format,
|
||||
&num,
|
||||
&leftovers,
|
||||
&ret_workarea);
|
||||
|
||||
gdk_x11_display_error_trap_pop_ignored (display);
|
||||
|
||||
if (result != Success ||
|
||||
type == None ||
|
||||
format == 0 ||
|
||||
leftovers ||
|
||||
num % 4 != 0)
|
||||
{
|
||||
XFree (ret_workarea);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
workareas = (long *) ret_workarea;
|
||||
|
||||
gdk_monitor_get_geometry (monitor, &geometry);
|
||||
*area = geometry;
|
||||
|
||||
for (i = 0; i < num / 4; i++)
|
||||
{
|
||||
GdkRectangle work_area;
|
||||
|
||||
work_area = (GdkRectangle) {
|
||||
.x = workareas[0] / x11_screen->window_scale,
|
||||
.y = workareas[1] / x11_screen->window_scale,
|
||||
.width = workareas[2] / x11_screen->window_scale,
|
||||
.height = workareas[3] / x11_screen->window_scale,
|
||||
};
|
||||
|
||||
if (gdk_rectangle_intersect (area, &work_area, &work_area))
|
||||
*area = work_area;
|
||||
|
||||
workareas += 4;
|
||||
}
|
||||
|
||||
XFree (ret_workarea);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_x11_screen_get_work_area (GdkScreen *screen,
|
||||
GdkRectangle *area)
|
||||
@@ -1007,6 +1107,10 @@ _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
|
||||
root = x11_screen->root_window;
|
||||
GDK_WINDOW_IMPL_X11 (root->impl)->window_scale = scale;
|
||||
|
||||
if (GDK_WINDOW_IMPL_X11 (root->impl)->cairo_surface)
|
||||
cairo_surface_set_device_scale (GDK_WINDOW_IMPL_X11 (root->impl)->cairo_surface,
|
||||
scale, scale);
|
||||
|
||||
toplevels = gdk_screen_get_toplevel_windows (GDK_SCREEN (x11_screen));
|
||||
|
||||
for (l = toplevels; l != NULL; l = l->next)
|
||||
|
||||
@@ -119,6 +119,9 @@ void _gdk_x11_screen_get_edge_monitors (GdkScreen *screen,
|
||||
gint *right);
|
||||
void _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
|
||||
int scale);
|
||||
gboolean _gdk_x11_screen_get_monitor_work_area (GdkScreen *screen,
|
||||
GdkMonitor *monitor,
|
||||
GdkRectangle *area);
|
||||
void gdk_x11_screen_get_work_area (GdkScreen *screen,
|
||||
GdkRectangle *area);
|
||||
gint gdk_x11_screen_get_width (GdkScreen *screen);
|
||||
|
||||
+20
-3
@@ -3025,12 +3025,29 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (pattern == parent_relative_pattern)
|
||||
{
|
||||
GdkWindow *parent;
|
||||
Window xroot, xparent, *xchildren;
|
||||
guint nxchildren, xparent_depth;
|
||||
XWindowAttributes xattrs;
|
||||
|
||||
if (!XQueryTree (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window),
|
||||
&xroot, &xparent, &xchildren, &nxchildren))
|
||||
{
|
||||
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window), None);
|
||||
return;
|
||||
}
|
||||
|
||||
if (xchildren)
|
||||
XFree (xchildren);
|
||||
|
||||
if (xparent) {
|
||||
XGetWindowAttributes (GDK_WINDOW_XDISPLAY (window), xparent, &xattrs);
|
||||
xparent_depth = xattrs.depth;
|
||||
}
|
||||
|
||||
/* X throws BadMatch if the parent has a different depth when
|
||||
* using ParentRelative */
|
||||
parent = gdk_window_get_parent (window);
|
||||
if (parent != NULL && window->depth == parent->depth &&
|
||||
if (xparent && window->depth == xparent_depth &&
|
||||
cairo_pattern_status (pattern) == CAIRO_STATUS_SUCCESS)
|
||||
{
|
||||
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
# Actual GTK things
|
||||
{
|
||||
GtkWidgetClass action GPtrArray
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:g_malloc
|
||||
fun:g_slice_alloc
|
||||
fun:g_ptr_array_sized_new
|
||||
fun:g_ptr_array_new
|
||||
fun:gtk_widget_class_add_action
|
||||
}
|
||||
|
||||
{
|
||||
GTK media extension gio modules
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:g_malloc
|
||||
fun:g_slice_alloc
|
||||
fun:g_slice_alloc0
|
||||
fun:g_type_create_instance
|
||||
fun:g_object_new_internal
|
||||
fun:g_object_new_with_properties
|
||||
fun:g_object_new
|
||||
fun:g_io_module_new
|
||||
fun:g_io_modules_scan_all_in_directory_with_scope
|
||||
fun:gtk_media_file_extension_init
|
||||
}
|
||||
|
||||
{
|
||||
gtk-style-context
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: possible
|
||||
fun:malloc
|
||||
fun:g_malloc
|
||||
...
|
||||
fun:gtk_css_node_declaration_make_writable
|
||||
...
|
||||
fun:gtk_style_constructed
|
||||
}
|
||||
|
||||
{
|
||||
gtk-style-context2
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: possible
|
||||
fun:malloc
|
||||
fun:g_malloc
|
||||
...
|
||||
fun:gtk_css_node_declaration_make_writable_resize
|
||||
...
|
||||
fun:gtk_style_constructed
|
||||
}
|
||||
|
||||
# AMD driver
|
||||
{
|
||||
radeonsi_dri general
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
...
|
||||
obj:/usr/lib*/dri/radeonsi_dri.so
|
||||
}
|
||||
|
||||
# mesa driver stuff
|
||||
{
|
||||
i965 addr4
|
||||
Memcheck:Addr4
|
||||
obj:/usr/lib*/dri/i965_dri.so*
|
||||
}
|
||||
|
||||
{
|
||||
i965 addr8
|
||||
Memcheck:Addr8
|
||||
obj:/usr/lib*/dri/i965_dri.so*
|
||||
}
|
||||
|
||||
{
|
||||
i965 memcpy
|
||||
Memcheck:Addr8
|
||||
fun:memcpy*
|
||||
obj:/usr/lib*/dri/i965_dri.so*
|
||||
}
|
||||
|
||||
{
|
||||
i965 memcpy
|
||||
Memcheck:Addr2
|
||||
fun:memcpy*
|
||||
obj:/usr/lib*/dri/i965_dri.so*
|
||||
}
|
||||
|
||||
{
|
||||
mesa memcmp 8
|
||||
Memcheck:Addr8
|
||||
fun:*memcmp*
|
||||
obj:/usr/lib*/dri/i965_dri.so*
|
||||
}
|
||||
|
||||
{
|
||||
mesa memcmp 1
|
||||
Memcheck:Addr1
|
||||
fun:*memcmp*
|
||||
obj:/usr/lib*/dri/i965_dri.so*
|
||||
}
|
||||
|
||||
{
|
||||
mesa memset 8
|
||||
Memcheck:Addr8
|
||||
fun:*memset*
|
||||
obj:/usr/lib*/dri/i965_dri.so
|
||||
}
|
||||
|
||||
{
|
||||
mesa realpath
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:realpath@@GLIBC_2.3
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
fun:epoxy_eglInitialize_global_rewrite_ptr
|
||||
}
|
||||
|
||||
{
|
||||
mesa calloc
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:calloc
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
fun:epoxy_eglInitialize_global_rewrite_ptr
|
||||
}
|
||||
|
||||
{
|
||||
mesa malloc
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
obj:/usr/lib*/dri/i965_dri.so*
|
||||
}
|
||||
|
||||
{
|
||||
mesa glReadPixels
|
||||
Memcheck:Addr16
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
fun:epoxy_glReadPixels_global_rewrite_ptr
|
||||
}
|
||||
|
||||
{
|
||||
epoxy glxQueryServerString 1
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:XextAddDisplay
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
fun:epoxy_glXQueryServerString_global_rewrite_ptr
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
epoxy glxQueryServerString 2
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:realpath*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
fun:epoxy_glXQueryServerString_global_rewrite_ptr
|
||||
}
|
||||
|
||||
{
|
||||
epoxy glGetTexImage
|
||||
Memcheck:Addr16
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
obj:*
|
||||
fun:epoxy_glGetTexImage_global_rewrite_ptr
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# Fontconfig
|
||||
{
|
||||
FcFontSetList
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
fun:FcFontSetList
|
||||
}
|
||||
|
||||
{
|
||||
FcFontRenderPrepare
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:realloc
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
fun:FcFontRenderPrepare
|
||||
}
|
||||
|
||||
{
|
||||
FcDefaultSubstitute
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:realloc
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
fun:FcDefaultSubstitute
|
||||
}
|
||||
|
||||
# Pixman
|
||||
{
|
||||
pixman_image_composite32
|
||||
Memcheck:Cond
|
||||
obj:/usr/lib*/libpixman-1.so*
|
||||
obj:/usr/lib*/libpixman-1.so*
|
||||
fun:pixman_image_composite32
|
||||
}
|
||||
|
||||
# Pango
|
||||
{
|
||||
pango 1
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:realloc
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
obj:/usr/lib*/libcairo.so*
|
||||
fun:pango_cairo_fc_font_map_fontset_key_substitute
|
||||
}
|
||||
|
||||
{
|
||||
pango 2
|
||||
Memcheck:Leak
|
||||
fun:realloc
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
obj:/usr/lib*/libfontconfig.so*
|
||||
fun:_cairo_ft_font_options_substitute
|
||||
}
|
||||
|
||||
# GLib
|
||||
{
|
||||
glib 1
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:g_malloc
|
||||
fun:g_quark_init
|
||||
}
|
||||
+36
-34
@@ -510,7 +510,6 @@ gtk_private_h_sources = \
|
||||
gtkiconviewprivate.h \
|
||||
gtkimagedefinitionprivate.h \
|
||||
gtkimageprivate.h \
|
||||
gtkimcontextsimpleprivate.h \
|
||||
gtkimmoduleprivate.h \
|
||||
gtkimcontextsimpleseqs.h \
|
||||
gtkintl.h \
|
||||
@@ -583,6 +582,7 @@ gtk_private_h_sources = \
|
||||
gtktextmarkprivate.h \
|
||||
gtktextsegment.h \
|
||||
gtktexttagprivate.h \
|
||||
gtktexttagtableprivate.h \
|
||||
gtktexttypes.h \
|
||||
gtktextutil.h \
|
||||
gtktrashmonitor.h \
|
||||
@@ -1029,6 +1029,13 @@ gtk_private_h_sources += \
|
||||
gtkprinteroptionwidget.h \
|
||||
gtksearchenginetracker.h
|
||||
|
||||
if HAVE_TRACKER3
|
||||
gtk_private_h_sources += \
|
||||
gtksearchenginetracker3.h
|
||||
gtk_os_unix_c_sources += \
|
||||
gtksearchenginetracker3.c
|
||||
endif
|
||||
|
||||
gtk_c_sources += $(gtk_os_unix_c_sources)
|
||||
endif
|
||||
|
||||
@@ -1370,9 +1377,7 @@ adwaita_theme_scss = \
|
||||
$()
|
||||
|
||||
highcontrast_theme_scss = \
|
||||
theme/HighContrast/_colors.scss \
|
||||
theme/HighContrast/_common.scss \
|
||||
theme/HighContrast/_drawing.scss \
|
||||
theme/HighContrast/_colors-hc.scss \
|
||||
theme/HighContrast/gtk-contained-inverse.scss \
|
||||
theme/HighContrast/gtk-contained.scss \
|
||||
$()
|
||||
@@ -1422,10 +1427,10 @@ resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --gener
|
||||
|
||||
gtkresources.h: gtk.gresource.xml
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
|
||||
--target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-header --manual-register
|
||||
--target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-header --manual-register --internal
|
||||
gtkresources.c: gtk.gresource.xml $(resource_files)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
|
||||
--target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-source --manual-register
|
||||
--target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-source --manual-register --internal
|
||||
|
||||
gtkprivatetypebuiltins.h: stamp-gtkprivatetypebuiltins.h
|
||||
@true
|
||||
@@ -1521,7 +1526,7 @@ gtk_3_HEADERS_INST = \
|
||||
|
||||
gtk_3_HEADERS_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
include $(top_srcdir)/win32/Makefile.msvcproj
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
# Introspection Items for MSVC
|
||||
@@ -1547,11 +1552,11 @@ GTK_MSVC_GIR_CFLAGS = \
|
||||
-DINCLUDE_IM_ti_et \
|
||||
-DINCLUDE_IM_viqr \
|
||||
-DGTK_TEXT_USE_INTERNAL_UNSUPPORTED_API \
|
||||
-I../.. -I../../gtk -I../../gdk
|
||||
-I.. -I../gtk -I../gdk
|
||||
|
||||
INTROSPECTION_INTERMEDIATE_ITEMS = \
|
||||
$(top_builddir)/build/win32/Gtk-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/build/win32/Gtk_3_0_gir_list
|
||||
$(top_builddir)/win32/Gtk-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/win32/Gtk_3_0_gir_list
|
||||
|
||||
Gtk_3_0_gir_MSVC_FILES = \
|
||||
$(introspected_pub_headers) \
|
||||
@@ -1566,7 +1571,7 @@ Gtk_3_0_gir_MSVC_LIBS = gtk-3.0 gdk-3.0
|
||||
Gtk_3_0_gir_MSVC_CFLAGS = $(GTK_MSVC_GIR_CFLAGS)
|
||||
Gtk_3_0_gir_MSVC_SCANNERFLAGS = --warn-all --include-uninstalled='./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin/Gdk-3.0.gir'
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvc-introspection
|
||||
include $(top_srcdir)/win32/Makefile.msvc-introspection
|
||||
|
||||
else
|
||||
INTROSPECTION_INTERMEDIATE_ITEMS =
|
||||
@@ -1574,8 +1579,8 @@ INTROSPECTION_INTERMEDIATE_ITEMS =
|
||||
endif
|
||||
|
||||
dist-hook: \
|
||||
$(top_builddir)/build/win32/vs9/gtk-3.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/gtk-3.headers \
|
||||
$(top_builddir)/win32/vs9/gtk-3.vcproj \
|
||||
$(top_builddir)/win32/vs9/gtk-3.headers \
|
||||
$(INTROSPECTION_INTERMEDIATE_ITEMS)
|
||||
|
||||
# Install a RC file for the default GTK+ theme, and key themes
|
||||
@@ -1704,27 +1709,10 @@ GTK_UPDATE_ICON_CACHE_MANIFEST = gtk-update-icon-cache.exe.manifest
|
||||
GTK_UPDATE_ICON_CACHE_RC = gtk-update-icon-cache.rc
|
||||
GTK_UPDATE_ICON_CACHE_MANIFEST_OBJECT = gtk-update-icon-cache_manifest.o
|
||||
|
||||
$(GTK_UPDATE_ICON_CACHE_MANIFEST):
|
||||
(echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' ; \
|
||||
echo '<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">' ; \
|
||||
echo ' <assemblyIdentity version="1.0.0.0"' ; \
|
||||
echo ' processorArchitecture="'$(EXE_MANIFEST_ARCHITECTURE)'"' ; \
|
||||
echo ' name="gtk-update-icon-cache.exe"' ; \
|
||||
echo ' type="win32"/>' ; \
|
||||
echo ' <!-- Identify the application security requirements. -->' ; \
|
||||
echo ' <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">' ; \
|
||||
echo ' <security>' ; \
|
||||
echo ' <requestedPrivileges>' ; \
|
||||
echo ' <requestedExecutionLevel' ; \
|
||||
echo ' level="asInvoker"' ; \
|
||||
echo ' uiAccess="false"/>' ; \
|
||||
echo ' </requestedPrivileges>' ; \
|
||||
echo ' </security>' ; \
|
||||
echo ' </trustInfo>' ; \
|
||||
echo '</assembly>' ) >$@
|
||||
$(GTK_UPDATE_ICON_CACHE_MANIFEST): Makefile generate-uac-manifest.py
|
||||
$(PYTHON) $(srcdir)/generate-uac-manifest.py -p=gtk3 -n=gtk-update-icon-cache --pkg-version=$(GTK_VERSION) --output-dir=$(builddir)
|
||||
|
||||
$(GTK_UPDATE_ICON_CACHE_RC):
|
||||
(echo -e '#include <winuser.h>\nCREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST '$(GTK_UPDATE_ICON_CACHE_MANIFEST)) >$@
|
||||
$(GTK_UPDATE_ICON_CACHE_RC): $(GTK_UPDATE_ICON_CACHE_MANIFEST)
|
||||
|
||||
$(GTK_UPDATE_ICON_CACHE_MANIFEST_OBJECT): $(GTK_UPDATE_ICON_CACHE_RC) $(GTK_UPDATE_ICON_CACHE_MANIFEST)
|
||||
$(WINDRES) --input $< --output $@ --output-format=coff
|
||||
@@ -1753,10 +1741,15 @@ EXTRA_DIST += \
|
||||
$(gesture_sources) \
|
||||
$(theme_sources) \
|
||||
$(gsettings_SCHEMAS) \
|
||||
compose-parse.py \
|
||||
emoji/convert-emoji.c \
|
||||
emoji/emoji.json \
|
||||
emoji/emoji1.json \
|
||||
a11y/Makefile.inc \
|
||||
deprecated/Makefile.inc \
|
||||
glade/README.glade \
|
||||
glade/gtk-private-widgets.xml \
|
||||
gtk-compose-lookaside.txt \
|
||||
inspector/Makefile.inc \
|
||||
libgtk3.manifest.in \
|
||||
gtk-win32.rc.body.in \
|
||||
@@ -1766,6 +1759,8 @@ EXTRA_DIST += \
|
||||
gtkwin32embedwidget.c \
|
||||
gtkprint-win32.h \
|
||||
gtkprint-win32.c \
|
||||
gtksearchenginetracker3.c \
|
||||
gtksearchenginetracker3.h \
|
||||
gtksearchenginequartz.h \
|
||||
gtkdbusinterfaces.xml \
|
||||
gtk-keys.css.default \
|
||||
@@ -1780,12 +1775,19 @@ EXTRA_DIST += \
|
||||
meson.build \
|
||||
gen-gtk-gresources-xml.py \
|
||||
gen-rc.py \
|
||||
generate-uac-manifest.py \
|
||||
gentypefuncs.py \
|
||||
a11y/meson.build \
|
||||
deprecated/meson.build \
|
||||
inspector/meson.build \
|
||||
theme/Adwaita/meson.build \
|
||||
theme/HighContrast/meson.build
|
||||
theme/Adwaita/parse-sass.sh \
|
||||
theme/Adwaita/render-assets.sh \
|
||||
theme/HighContrast/assets.svg \
|
||||
theme/HighContrast/assets.txt \
|
||||
theme/HighContrast/meson.build \
|
||||
theme/HighContrast/parse-sass.sh \
|
||||
theme/HighContrast/render-assets.sh
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -31,6 +31,7 @@ a11y_h_sources = \
|
||||
a11y/gtknotebookaccessible.h \
|
||||
a11y/gtknotebookpageaccessible.h \
|
||||
a11y/gtkpanedaccessible.h \
|
||||
a11y/gtkplugaccessible.h \
|
||||
a11y/gtkpopoveraccessible.h \
|
||||
a11y/gtkprogressbaraccessible.h \
|
||||
a11y/gtkradiobuttonaccessible.h \
|
||||
@@ -40,6 +41,7 @@ a11y_h_sources = \
|
||||
a11y/gtkscaleaccessible.h \
|
||||
a11y/gtkscalebuttonaccessible.h \
|
||||
a11y/gtkscrolledwindowaccessible.h \
|
||||
a11y/gtksocketaccessible.h \
|
||||
a11y/gtkspinbuttonaccessible.h \
|
||||
a11y/gtkspinneraccessible.h \
|
||||
a11y/gtkstatusbaraccessible.h \
|
||||
@@ -106,6 +108,7 @@ a11y_c_sources = \
|
||||
a11y/gtknotebookaccessible.c \
|
||||
a11y/gtknotebookpageaccessible.c \
|
||||
a11y/gtkpanedaccessible.c \
|
||||
a11y/gtkplugaccessible.c \
|
||||
a11y/gtkpopoveraccessible.c \
|
||||
a11y/gtkprogressbaraccessible.c \
|
||||
a11y/gtkradiobuttonaccessible.c \
|
||||
@@ -115,6 +118,7 @@ a11y_c_sources = \
|
||||
a11y/gtkscaleaccessible.c \
|
||||
a11y/gtkscalebuttonaccessible.c \
|
||||
a11y/gtkscrolledwindowaccessible.c \
|
||||
a11y/gtksocketaccessible.c \
|
||||
a11y/gtkspinbuttonaccessible.c \
|
||||
a11y/gtkspinneraccessible.c \
|
||||
a11y/gtkstatusbaraccessible.c \
|
||||
|
||||
@@ -311,18 +311,10 @@ gtk_notebook_page_accessible_get_extents (AtkComponent *component,
|
||||
label = get_label_from_notebook_page (GTK_NOTEBOOK_PAGE_ACCESSIBLE (component));
|
||||
if (!label)
|
||||
{
|
||||
AtkObject *child;
|
||||
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
|
||||
child = atk_object_ref_accessible_child (ATK_OBJECT (component), 0);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
atk_component_get_extents (ATK_COMPONENT (child), x, y, NULL, NULL,
|
||||
coord_type);
|
||||
g_object_unref (child);
|
||||
*x = -1;
|
||||
*y = -1;
|
||||
*width = -1;
|
||||
*height = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user