Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 48650
Status: rejected
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: jquelin [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: toplevel should be transient
take the attached simple app $ chmod +x kwin-focus.pl $ ./kwin-focus.pl ==> a window with a button appears click on the button ==> a dialog box appears, and is raised propery click on the button again ==> the dialog box is iconified click on the button again ==> the dialog box re-appears, but not above the main window ==> bug this program works fine under gnome (ie, the last button click makes the dialog re-appear above the main window), but not in kde with focus stealing prevention set to low. i reported a bug in kde (https://bugs.kde.org/show_bug.cgi?id=203447) where they say that those windows should be made transient. since toplevels are children of a mainwindow, i propose to make them transient by default. or propose a way in Tk::Wm to change their transient property.
Subject: kwin-focus.pl
#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = new Tk::MainWindow; $mw->Button(-text=>'click', -command=>\&toggle)->pack; $mw->geometry("300x200"); MainLoop; my $dialog; sub toggle { if ( not defined $dialog ) { $dialog = $mw->Toplevel; $dialog->withdraw; $dialog->Popup(-popover=>$mw); return; } if ( $dialog->state eq 'normal' ) { $dialog->withdraw; } else { $dialog->Popup(-popover=>$mw); $dialog->raise; } }
On Wed Aug 12 09:41:27 2009, JQUELIN wrote: Show quoted text
> take the attached simple app > $ chmod +x kwin-focus.pl > $ ./kwin-focus.pl > ==> a window with a button appears > click on the button > ==> a dialog box appears, and is raised propery > click on the button again > ==> the dialog box is iconified > click on the button again > ==> the dialog box re-appears, but not above the main window > ==> bug > > this program works fine under gnome (ie, the last button click makes the > dialog re-appear above the main window), but not in kde with focus > stealing prevention set to low. > > i reported a bug in kde (https://bugs.kde.org/show_bug.cgi?id=203447) > where they say that those windows should be made transient. > > since toplevels are children of a mainwindow, i propose to make them > transient by default. > > or propose a way in Tk::Wm to change their transient property.
No, general toplevels should not be made automatically transient, only dialogs. The various dialog widgets are already transient, I think. TO do it yourself, you can use the transient method: $dialog->transient($mw); already documented in Tk::Wm Regards, Slaven