experimenting with an odd error on gnome49 -- seems to either be in electron or in gnome, can't fix simply by ignoring keystrokes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2025-11-05 13:54:09 +03:00
parent ee57bba4af
commit 7073c3d9c5
4 changed files with 79 additions and 25 deletions

View File

@ -4,6 +4,7 @@ name: Viewer build
on:
workflow_dispatch:
# XXX this gets any push -- the pattern does not work???...
#push:
# branches: [ "master" ]
# tags: v**

View File

@ -509,6 +509,10 @@ var KeyboardActions = actions.Actions({
// The amount of keyboard "quiet" time to wait for when
// .pauseKeyboardRepeat(..) is called...
'keyboard-repeat-pause-check': 100,
// Keyboard handling timeout after focus...
// XXX FOCUS_EVENT see: features.ui for more details...
//'keyboard-pause-post-focus': 100,
},
get keybindings(){
@ -948,6 +952,20 @@ module.Keyboard = core.ImageGridFeatures.Feature({
function(){
this.toggleKeyboardHandling('off') }],
// XXX FOCUS_EVENT see: features.ui for more details...
//['windowBlur',
// function(){
// this.config['keyboard-pause-post-focus'] > 0
// && this.toggleKeyboardHandling('off') }],
//['windowFocus',
// function(){
// var that = this
// this.config['keyboard-pause-post-focus'] > 0
// && setTimeout(
// function(){
// that.toggleKeyboardHandling('on') },
// this.config['keyboard-pause-post-focus']) }],
// pause keyboard repeat...
['shiftImageUp.pre shiftImageDown.pre',
function(){

View File

@ -23,6 +23,10 @@
* - auto-single-image
* - auto-ribbon
*
* XXX FOCUS_EVENT BUG: for some reason focus/blur events both on window
* and on ig.dom trigger only if anything in the ui is physically
* focused (e.g. clicked)
*
*
**********************************************************************/
((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)
@ -499,6 +503,21 @@ module.ViewerActions = actions.Actions({
//}, 0)
}],
// XXX FOCUS_EVENT these for some reason work only if the ui is clicked...
//windowFocus: ['- Interface/',
// core.doc``,
// core.Event(function(){
// // This is the window focus event...
// //
// // Not for direct use.
// })],
//windowBlur: ['- Interface/',
// core.doc``,
// core.Event(function(){
// // This is the window blur event...
// //
// // Not for direct use.
// })],
// Viewer/window resize event...
resizingWindow: ['- Interface/',
@ -762,7 +781,7 @@ module.Viewer = core.ImageGridFeatures.Feature({
}
}],
// workspaces and resizing...
// workspaces, resizing and other events...
['start',
function(){
var that = this
@ -777,6 +796,19 @@ module.Viewer = core.ImageGridFeatures.Feature({
this.config['ribbon-theme']
&& this.toggleImageRendering(this.config['image-rendering'])
// XXX FOCUS_EVENT
//// focus handling...
//// XXX focus/blur events do not seem to trigger unless we
//// actually focus something in the window...
//this.__window_focus_handler ??=
// function(){
// that.windowFocus() }
//this.dom[0].addEventListener('focus', this.__window_focus_handler)
//this.__window_blur_handler ??=
// function(){
// that.windowBlur() }
//this.dom.on('blur', this.__window_blur_handler)
// center viewer on resize events...
if(!this.__viewer_resize){
this.__viewer_resize = function(){
@ -802,6 +834,9 @@ module.Viewer = core.ImageGridFeatures.Feature({
['stop',
function(){
if(this.__viewer_resize){
// XXX FOCUS_EVENT
//$(window).off('focus', this.__window_focus_handler)
//$(window).off('blur', this.__window_blur_handler)
$(window).off('resize', this.__viewer_resize)
delete this.__viewer_resize
}

View File

@ -180,9 +180,9 @@
}
},
"node_modules/@emnapi/runtime": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz",
"integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.0.tgz",
"integrity": "sha512-oAYoQnCYaQZKVS53Fq23ceWMRxq5EhQsE0x0RdQ55jT7wagMu5k+fS39v1fiSLrtrLQlXwVINenqhLMtTrV/1Q==",
"license": "MIT",
"optional": true,
"dependencies": {
@ -806,9 +806,9 @@
}
},
"node_modules/@types/node": {
"version": "22.18.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.10.tgz",
"integrity": "sha512-anNG/V/Efn/YZY4pRzbACnKxNKoBng2VTFydVu8RRs5hQjikP8CQfaeAV59VFSCzKNp90mXiVXW2QzV56rwMrg==",
"version": "22.19.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.0.tgz",
"integrity": "sha512-xpr/lmLPQEj+TUnHmR+Ab91/glhJvsqcjB+yY0Ix9GO70H6Lb4FHH5GeqdOE5btAx7eIMwuHkp4H2MSkLcqWbA==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
@ -1116,11 +1116,11 @@
}
},
"node_modules/cacache/node_modules/tar": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz",
"integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz",
"integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==",
"dev": true,
"license": "ISC",
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/fs-minipass": "^4.0.0",
"chownr": "^3.0.0",
@ -1548,9 +1548,9 @@
"license": "MIT"
},
"node_modules/electron": {
"version": "37.7.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-37.7.0.tgz",
"integrity": "sha512-LBzvfrS0aalynOsnC11AD7zeoU8eOois090mzLpQM3K8yZ2N04i2ZW9qmHOTFLrXlKvrwRc7EbyQf1u8XHMl6Q==",
"version": "37.8.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-37.8.0.tgz",
"integrity": "sha512-R7fCCfp/foGvJjxReBpb01Fk0bEKAvUdbwXK4c2c2ttuHpPEV/k65GRkz5yYYVhE8EGIa/j5uh0uToOpsocsZw==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@ -1852,10 +1852,10 @@
"license": "BSD"
},
"node_modules/glob/node_modules/minimatch": {
"version": "10.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz",
"integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==",
"license": "ISC",
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",
"integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/brace-expansion": "^5.0.0"
},
@ -2603,9 +2603,9 @@
}
},
"node_modules/node-abi": {
"version": "4.14.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-4.14.0.tgz",
"integrity": "sha512-E4n91K4Nk1Rch2KzD+edU2bfZTP4W42GypAUDXU4vu1A+4u9PvUNDkGI0dXbsy8ZeF3WGj0SD/uHxnXD/sW+3w==",
"version": "4.17.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-4.17.0.tgz",
"integrity": "sha512-ljZ7PiChMA2O3sGPX5/bpBhW0O9rXn+orb2xo3Z0vleSlil7G65WZjSFjmIeAtHZHa2GXiTOMdFCsiyImMEIMg==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -2671,11 +2671,11 @@
}
},
"node_modules/node-gyp/node_modules/tar": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz",
"integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz",
"integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==",
"dev": true,
"license": "ISC",
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/fs-minipass": "^4.0.0",
"chownr": "^3.0.0",