Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection border not showing for scrolling in qlmanage PDF preview #10

Open
jannis-baum opened this issue Nov 25, 2022 · 11 comments
Open

Comments

@jannis-baum
Copy link

This might be a hardcore edge-case but who knows, maybe it'll uncover something else:

Running qlmanage -p <some PDF> and then using Scrolla to scroll the preview window works (it does scroll) but the selection border is missing. Interestingly enough, opening Quicklook from the Finder (i.e. pressing space on the same PDF) instead of running qlmanage directly does not have the issue.

@godbout
Copy link
Owner

godbout commented Nov 25, 2022

seems that qlmanage opens something that has no AX access. the reason why you can still scroll is because currently you start Scrolla, it can't find any window, but it's still on. so the scroll sends events to whatever window is below. unfortunately that's going to go away with the new "flash" thing and "no window available" detection. so currently it somehow works, but it's a bug 😂️

QuickLook here works half. the scroll works, but the border is half drawn. weird.

@jannis-baum
Copy link
Author

unfortunately that's going to go away with the new "flash" thing and "no window available" detection. so currently it somehow works, but it's a bug 😂️

Hahahha :( Have you found any other situations where this is the case? Maybe then it's good the way it is right now?

@godbout
Copy link
Owner

godbout commented Nov 25, 2022

Hahahha :( Have you found any other situations where this is the case? Maybe then it's good the way it is right now?

that'll happen every time a scrollable area (including the main window) is not found. i guess for most apps it'll be ok. but maybe some popovers kinda apps? not sure yet.

for leaving it as it is, well, when i started i had two choices, one harder than the other one, but with better UX. that's the one you're experiencing now. grabbing scrollable area, and positioning the cursor there, to send scroll events to macOS. the other, easier, way would be to just send scroll events wherever the mouse cursor is. in your case with qlmanage, you were just lucky that the mouse cursor was at the right position (window below the cursor), which is why it worked. but how to move the cursor around? Wooshy? as we talked about it i think earlier, it's better i believe to have Scrolla has its own separate app.

now one thing that could be possible i guess, would be that if no window is found, then i draw a border over the whole screen, AND i don't move the mouse. so that you can send scroll events where the mouse is currently. that would solve your current specific issue (with the mouse cursor being at the right place), but as far as i'm concerned, i think it pollutes the UX for a very unstable benefit. like that'll be the only case where Scrolla doesn't move the cursor in the middle of an Area, and you have to be lucky that the mouse cursor is exactly where you need it... so i don't think it's a good solution.

@jannis-baum
Copy link
Author

jannis-baum commented Nov 25, 2022

Yeah you're right! Good points. Better to have it explicitly not work at all than having something inconsistent.

Another situation that to me looks like it might be the same thing but will affect more people than not being able to scroll qlmanage is trying to scroll Spotlight results. Here I actually found something else as well: #11

@godbout
Copy link
Owner

godbout commented Nov 25, 2022

Another situation that to me looks like it might be the same thing but will affect more people than not being able to scroll qlmanage is trying to scroll Spotlight results.

hmm. Spotlight has AX. ok so to solve #9, i've switched from grabbing the AX frontmost app focused window to grabbing the Workspace AX frontmost app focused window. this is because the AX frontmost will grab non activating panels like Alfred etc. while the Workspace will not. BUT NOW we have Spotlight that doesn't activate any frontmost app, but also that doesn't automatically disappear when we bring up another non activating panel like Alfred, Wooshy, Scrolla, etc...

so if i switch back, it's gonna bring other issues...

ScreenFlow.mp4

i think the only way to take care of this is to check which app is the AX frontmost, and depending on the specific app (like Spotlight), returning different data...

@godbout
Copy link
Owner

godbout commented Nov 25, 2022

hmm maybe the UX in the video above is "good enough"? like if you activate Scrolla on a non activating panel that disappears by itself, then it's the user's problem? 🤔️

that would help taking care of Spotlight without having to check explicitly on which app Scrolla is. but at the same time i haven't seen much app working the same as Spotlight.

@godbout
Copy link
Owner

godbout commented Nov 25, 2022

actually, does it make any sense to scroll on Spotlight's results? no idea, i don't use it. but scrolling wouldn't allow you to pick a choice without the mouse later, no? isn't kV more useful here?

@godbout
Copy link
Owner

godbout commented Nov 25, 2022

(also you can't use Wooshy on Spotlight because it takes care of the Workspace frontmost app too, like Scrolla 😂️)

@jannis-baum
Copy link
Author

hmm maybe the UX in the video above is "good enough"? like if you activate Scrolla on a non activating panel that disappears by itself, then it's the user's problem?

I think this is reasonable!

BUT NOW we have Spotlight that doesn't activate any frontmost app, but also that doesn't automatically disappear when we bring up another non activating panel

Spotlight also used to work like that but it seems like they recently (probably Ventura) changed it to not disappear when focussing another non-activating panel. Actually I'm not entirely sure if that's intended from Apple's side because I feel like it creates bugs in other places as well😂

actually, does it make any sense to scroll on Spotlight's results? no idea, i don't use it. but scrolling wouldn't allow you to pick a choice without the mouse later, no? isn't kV more useful here?

I guess that's true. Unless someone wants to look at results without opening them. Which does sound like an odd scenario.

But the scroll with Scrolla and then click with Wooshy thing sounds like something that would actually be useful! Specifically when there are lots of results and you want the nice scrolling experience🙈

@godbout
Copy link
Owner

godbout commented Nov 28, 2022

I think this is reasonable!

actually i'm going to do this on a per app basis. there seems to be only a few apps that don't disappear when another non activating panel shows up. currently i only see Spotlight and Things 3. then we get the best of both worlds without too much extra work.

Spotlight also used to work like that but it seems like they recently (probably Ventura) changed it to not disappear when focussing another non-activating panel. Actually I'm not entirely sure if that's intended from Apple's side because I feel like it creates bugs in other places as well😂

yeah. it does seem to create issues with the active app not receiving key events. i'm finding a lot of crappy stuff in Ventura actually. some really bad UX where in those new Settings thing, half of your typing doesn't get registered. that's pretty bad.

I guess that's true. Unless someone wants to look at results without opening them. Which does sound like an odd scenario.

But the scroll with Scrolla and then click with Wooshy thing sounds like something that would actually be useful! Specifically when there are lots of results and you want the nice scrolling experience🙈

yeah, gonna try to do that. that requires updates in the DisplayEngine used by all apps, and each individual AXEngine. this is doable, but i need to find a proper way to separate apps that need the workspace frontmostapp from the ones that need the ax frontmost app. not a technical difficulty, more of an organizational one.

@godbout
Copy link
Owner

godbout commented Dec 22, 2024

tried again today and both Scrolla and Wooshy don't even register their global keyboard shortcut when qlmanage is running so it's even worse than before lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants