Is there a way to detect if the resize gesture in the bottom right corner (on Apple Silicon, iPadOS 16) is active? - ipados

On iPadOS 16, running on Apple Silicon, windows can be resized by dragging at the bottom right corner. This interferes with any long press gesture you might have yourself on something in this area.
I am looking for a way to know if this gesture is active to avoid putting something into this area.

Related

Horizontal Drag Gesture on Vertical ScrollView

I have an app similar to most with a main view that scrolls vertically. On top of that, I have a horizontal drag gesture to pull out a side menu.
The issue I am running into when trying to drag the menu open is any vertical movement at all stops the horizontal gesture from working until the vertical movement has ended. So it is very difficult to get the horizontal gesture to activate.
I have tried using .highPriorityGesture and .simultaneousGesture but neither seem to help.
Adding a minimumDistance on the Vertical gesture should fix it
DragGesture(minimumDistance: 10)

SwiftUI fullscreen on Apple Watch

Is it possible to use full screen on Apple Watch (except the time display) using SwiftUI?
I have set .edgesIgnoringSafeArea(.all) on various view and the result is the same. Top left corner is not usable.

Python tk scrollbar behavior (Windows to blame?)

I'm coding a GUI in Python/Tkinter that includes a listbox with a scrollbar. I've gotten the scrollbar operating as expected (i.e. you can click and it scrolls up/down through the listbox contents), but something's off with the way scrollbar itself behaves. The image below should help clarify.
The listbox is sized for 8 lines and contains only 12, so first off the slider should be a lot larger (2/3 of the scrollbar length). Second, whenever I scroll down (regardless of how I do it), the slider stays 'glued' to the top of the bar. This prevents me from ever using the upward fast-scroll method where you click above the slider but below the arrow -- so upward scrolling is limited to using the arrow and going one line at a time. A downward fast-scroll works fine, although as noted the slider still stays 'glued' to the top. I can click and drag the slider down, but then it pops right back up to the top. Clicking the arrows (either up or down) works normally.
I've tried using the alternative scrollbar in ttk, but it's not really any better:
In this case the slider fills the entire bar and you can't fast-scroll either direction, up or down. Grab-and-drag works (somehow), the listbox scrolls but you get no visual cue as to how close you are to the top or bottom. The arrows (again) work normally.
In short it's usable, but just very glitchy and weird. Is all this just a known limitation with using Python/Tkinter on Windows OS? (My machine has Windows XP (32-bit) with SP 3. It's Python version 2.7.3.)
It sounds like you aren't configuring your scrollbars correctly. You have to make a two way connection. You need to configure the listbox to know about the scrollbar (so that it updates the thumb) and you need to configure the scrollbar to know about the listbox (so that it scrolls the contents of tne listbox).
The behaviour you describe makes it sound like you forgot to do the former. Perhaps if you show us your cod we can confirm that. Are you doing something like the following?
my_listbox.configure(yscrollcommand=my_scrollbar.set)
my_scrollbar.configure(command=my_listbox.yview)

Weird cursor behavioir in Qt

In Qt (C++, MinGW, Windows 7), QCursor::setPos(...) seems to change the position of the cursor at the application level but not at the system level. For example, if you intercept the mouseMoveEvent and cancel out the movement of the cursor (with setMouseTracking(false) such that you do this cancellation only when a mouse button is pressed), then you'll see no cursor move as long as you maintain the mouse button pressed. But then, when you release the button and move a little, the cursor will go to the place it would have been if you haven't blocked its movement. Is this behavior normal? How to get around it such that the mouse cursor is changed at the system level?
If it is not clear enough, I can give code snippet.
Moving the cursor of a QWidget always uses the widget's coordinates. For global mouse positioning, you should use the desktop widget (QDesktopWidget) instead. You can get it through the QApplication::desktop() static function. Example:
QApplication::desktop()->cursor().setPos(0,0);
This should move the mouse cursor to the top-left corner of the desktop.

Draw moving icon that is top most all the time like mouse cursor and work for full screen apps

I need to draw an icon that moves approximately in sync with mouse cursor and is always on top of all windows.
OS: Windows 7
I have a solutions that work to some extend by drawing my icon in a top most transparent window. There are some major drawbacks in this solution since that top most window interferes with other top most windows and some full screen apps do not work correctly. Examples are start menu and task bar that will overlay my window if I do not regulary set it to be top most. For some full screen applications performance of updating position of window with icon hugely drops and it does not follow mouse smoothly.
There is another method that I came across where an icon is drawn directly to the device context of desktop Draw mouse pointer icon?. This solution has a drawback that there seems to be no good way of how to remove "trail", especially if desktop content changes quickly.
So my question: is there an ultimate solution that does not have the above mentioned problems?
Is it possible to draw above all windows in the "layer" of mouse cursor? Or make a second mouse cursor with my custom icon that I will control (I know that widows can display two independently controlled mouse cursors like CPNMouse)?
Can someone point me to the right direction?
Thanks!
Use a top-most window with transparency set via WS_EX_LAYERED / UpdateLayeredWindow.
If you set the WS_EX_TRANSPARENT style as well then the window won't intercept mouse input.