08 February 2023, 00:48 | #1 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
Prevent user from moving my Screen
I open it with a new screen struct, but I haven't seen any pertinent flags.
I can think of a few creative alternatives:
I realize they all read like an excellent prank application but it's for a utility. |
08 February 2023, 06:25 | #2 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,307
|
There is none. You can place a window on top of the drag bar, but you can still drag the screen then with the right Amiga key and the left mouse button.
|
08 February 2023, 10:15 | #3 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
Maximized window could work. For my purposes, only left-click+drag needs be stopped. I'd have to clear it immediately to draw my stuff, and not waste memory.
Speaking of moving the pointer, can I do so programmatically? If not, then can I send keyboard events to move the pointer? Just thought of another prank, SetPointer() with an offset hotspot. Won't help much, maybe a little. |
08 February 2023, 10:42 | #4 |
Registered User
Join Date: Sep 2019
Location: Finland
Posts: 371
|
You could set up an input handler (with input.device) with a very high priority, then intercept all events and remove the ones that are related to dragging your specific screen
|
08 February 2023, 11:32 | #5 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,638
|
|
08 February 2023, 18:53 | #6 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
Thx guys, will experiment.
Probably the best option would be to cancel mouse movement. The clicks themselves would then do nothing. Maybe save and restore mouse X/Y counters before/after Forbid/Permit. |
08 February 2023, 19:12 | #7 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,349
|
On Kickstart 3.0+ you could use the SA_Draggable and SA_Exclusive tags?
|
08 February 2023, 19:14 | #8 |
Registered User
Join Date: Sep 2022
Location: Switzerland
Posts: 120
|
for what OS version? As with OS 3+
Code:
SA_Draggable: ti_Data is a boolean. Set to FALSE if you wish your screen to be non-draggable. This tag should be used very sparingly!. Defaults to TRUE. For child screens (see SA_Parent, SA_FrontChild, and SA_BackChild) this tag has a slightly different meaning: non-draggable child screens are non-draggable with respect to their parent, meaning they always drag exactly with the parent, as opposed to having relative freedom. Also see ScreenPosition(). (V39) |
08 February 2023, 20:28 | #9 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
I support KS1.2-3.1+ with the utility. If something is impossible or difficult I will make exceptions for all but 1.3 and 3.1. So then my goal wouldn't be achieved on 1.3. But great that they added it.
|
08 February 2023, 20:44 | #10 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,307
|
SA_Draggable is probaby what you want, or maybe not quite what you want. The problem is that it also stops autoscroll screens from scrolling (if I recall correctly). If autoscroll is not an option for you, then go for it.
|
08 February 2023, 20:46 | #11 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,307
|
Note that there are roughly two positions where an input handler could sit: Upfront the intuition handler, and below the intuition input handler. Above the intuition input handler, all a custom input handler sees are raw mouse moves bare any position information with only relative movements, and bare any scaling to screen coordinates. Below the intuition input handler, you do receive coordinates, but it is too late there to intercept intuition.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Prevent input from reaching CLI/WB | paraj | Coders. System | 2 | 06 February 2022 18:39 |
how to prevent windows audio cd playpack during emulation? | honx | support.WinUAE | 24 | 11 December 2018 10:48 |
How to prevent 100% CPU usage ? | mahen | support.FS-UAE | 3 | 01 November 2017 20:19 |
will a NTSC A520 prevent me... | NfernalNfluence | support.Hardware | 0 | 08 September 2007 12:07 |
It's moving..it's alive, it's moving.. IT'S ALLIIIIIIIIIIVE!!!!!!!!!1 | alkis21 | Retrogaming General Discussion | 23 | 22 August 2002 10:51 |
|
|