Suppress click to front

This forum is for general developer support questions.
Post Reply
softwarefailure
Posts: 112
Joined: Fri Feb 14, 2014 10:29 pm

Suppress click to front

Post by softwarefailure »

Is there any way to programmatically suppress front clicking on a window? (WFLG_BACKDROP is not a solution)
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Suppress click to front

Post by broadblues »

You mean depth arrangement in general?

Dont include a depth gadget. Though ofcourse other window might be moved relative to yours.

Or to get your window ignored by the click to front commoddity?

Tricky, first thought was to suggest a higher priorty commodity and intercept the double click but you need to pas the mouse event on so might not make any difference.

What is the desired effect? Do you wish to ensure that wndow A always remains behind some child window B ? In which case as we don't have such construct in intuition as yet, you would have to listen for a window changed IDCMP and then fix the depth relation ship of the windows manually.

Depending on your desired effect there are also stay top windows / toobar windows etc Though stay top windows can be depth arranged withing the "top layer" .
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Suppress click to front

Post by nbache »

broadblues wrote:Or to get your window ignored by the click to front commoddity?
Don't forget that there's also a DepthToFront commodity. And that anybody can write similar tools to change the relative depths of windows.

I think it would be necessary to patch a number of intuition functions to achieve this.
What is the desired effect?
Yeah, I'd like to know that too. Hard to imagine what this could be useful for.

Best regards,

Niels
softwarefailure
Posts: 112
Joined: Fri Feb 14, 2014 10:29 pm

Re: Suppress click to front

Post by softwarefailure »

broadblues wrote:What is the desired effect? Do you wish to ensure that wndow A always remains behind some child window B ?
Yes, I have a borderless window that covers pretty much of the screen and this should always stay behind some child windows but I don't want to use WA_Backdrop for this borderless window. Restoring depth order manually on double click does the trick but it's of course a hackish solution.
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: Suppress click to front

Post by chris »

softwarefailure wrote:Yes, I have a borderless window that covers pretty much of the screen and this should always stay behind some child windows but I don't want to use WA_Backdrop for this borderless window. Restoring depth order manually on double click does the trick but it's of course a hackish solution.
That's exactly the sort of thing WA_Backdrop is designed for, although it only really works on your own screen. As it's a borderless window I guess you're on your own screen anyway, so I'm curious as to why you don't want to use it?

The other option is to make all the child windows StayOnTop (is it WA_StayOnTop?), which will stop them from disappearing behind the other window and still allow them to be depth-arrranged between themselves.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Suppress click to front

Post by broadblues »

Note: if the reason for not using backdrop is wanting complete full screen, it is possible to turn of the screen title.

Blender does have thsi issue to some extent when running on the workbench, (though most of it's sub windows aren't true windows, but rendred inside the main window, a few like the render preview and animation preview are) and it simply moves the windows arround to suit.

Ultimatly if the user has problems using your app due to them using ClickToFront, they can just disable it for the session, I frequently do so when using my own app SketchBlock as rapid double clicking whilst painting rearranges windows when I don't want to. This is what exchange is for :-)
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Suppress click to front

Post by nbache »

broadblues wrote:Ultimatly if the user has problems using your app due to them using ClickToFront, they can just disable it for the session
Or they can activate a QUALIFIER tooltype in the ClickToFront icon, so e.g. an Alt key has to be held in addition to double-clicking.

Best regards,

Niels
Post Reply