Opened 2 years ago

Last modified 3 months ago

#14734 accepted defect

OS X Cocoa: help is displayed under modal dialogs

Reported by: fsenore Owned by: csomor
Priority: normal Milestone: 3.1.0
Component: wxOSX-Cocoa Version:
Keywords: help z-order Cc:
Blocked By: Blocking:
Patch: no

Description

Testing the Cocoa port I discovered that if a modal dialog shows help the help window is displayed under the dialog and there is no way to have it in the foreground. Of course this makes help pages almost useless.

I have added a patch to the html/help sample to reproduce the problem.
Run htmlhelp.app and select the "File/Show modal dialog" menu: it will show a small modal dialog (I have grafted it from another sample so it looks really bad).
Press any button to show an empty help window: the dialog remains in front of the help window.

Attachments (1)

cocoa_help_zorder.patch download (3.0 KB) - added by fsenore 2 years ago.

Download all attachments as: .zip

Change History (12)

Changed 2 years ago by fsenore

comment:1 Changed 23 months ago by vadz

  • Milestone set to 3.0

comment:2 follow-up: Changed 23 months ago by johnr

  • Status changed from new to confirmed

FWIW it is ok with ShowWindowModal() but is a problem with ShowModal().

comment:3 in reply to: ↑ 2 ; follow-up: Changed 23 months ago by johnr

Replying to johnr:
This now shows on top of a ShowModal() dialog thank you very much.
Only problem is that the close/min/max gadgets on the html help window are disabled so the window can't be closed.

comment:4 in reply to: ↑ 3 Changed 23 months ago by johnr

Replying to johnr:

Replying to johnr:
This now shows on top of a ShowModal() dialog thank you very much.

I rather sheepishly don't know what happened there but after a rebuild html help doesn't show on top anymore.

comment:5 Changed 11 months ago by vadz

Notice that this is not just about help, apparently there are other problems with dialogs (even native ones) shown from the modal dialogs in wxOSX, see this message for another example.

Stefan, I could try looking at this but I don't even know where to start... Would you have any hints? TIA!

comment:6 Changed 11 months ago by csomor

  • Owner set to csomor
  • Status changed from confirmed to accepted

comment:7 follow-up: Changed 11 months ago by csomor

What I don't understand is:

In this sample help is displayed in a frame, called from a modal dialog, and on mac the dialog layer is always above all frames, so how is this supposed to work ?

AddGrabIfNeeded is only implemented for GTK currently, I assume this somehow also deals with the layering issues ?

comment:8 in reply to: ↑ 7 Changed 11 months ago by fsenore

Replying to csomor:

What I don't understand is:

In this sample help is displayed in a frame, called from a modal dialog, and on mac the dialog layer is always above all frames, so how is this supposed to work ?

Help is displayed using the standard wxWidgets tool. I never checked, but it looks like a frame.
I don't know much about Macs so if dialogs are always above frames we are out of luck.
Anyway, this looks like a Cocoa-only problem: help is displayed above dialogs in the Carbon port.

comment:9 Changed 11 months ago by vadz

Also notice that this is not specific to help only, see the message linked from comment:5.

As to how it is supposed to work, I really have no idea but if we really can't show anything modeless from a modal dialog, then it would be better to show them modally rather than showing them in an unusable state...

comment:10 Changed 10 months ago by vadz

  • Milestone changed from 3.0.0 to 3.1.0

It's too late for 3.0 but it would be still great to do it for 3.2.

comment:11 Changed 3 months ago by scPer

Just adding a note that this issue is also the same (or atleast related to) this ticket: http://trac.wxwidgets.org/ticket/16204

As mentioned in that ticket, it works just fine in wxWidgets 2.9.4

Note: See TracTickets for help on using tickets.