Bug 152788 - Print dialog - PPD properties dialog box goes to background
Summary: Print dialog - PPD properties dialog box goes to background
Status: CLOSED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 155849 159985 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-23 16:20 UTC by Alexander Berger
Modified: 2008-12-14 15:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the two dialog boxes (273.22 KB, image/png)
2007-11-23 16:26 UTC, Alexander Berger
Details
Simple QT4 only testcase for QPrintDialog (245 bytes, text/plain)
2007-11-23 23:22 UTC, Alexander Berger
Details
KDE4 based test case for QPrintDialog (1.23 KB, text/plain)
2007-11-24 06:55 UTC, Alexander Berger
Details
Different titlebars for PrintDialog (126.50 KB, image/png)
2007-11-24 06:59 UTC, Alexander Berger
Details
Test case to reproduce the problem within a KDE4 session (1.39 KB, text/plain)
2007-11-26 19:01 UTC, Alexander Berger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Berger 2007-11-23 16:20:46 UTC
Version:           unknown (using KDE 3.96.1 (KDE 4.0 >= 20071120), compiled sources)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.22-14-generic

In the KDE print dialog (e.g. Kwrite: CTRL-P) the "PPD properties" dialog box window opened when pressing the "Properties" button (left to the printer dropdown), goes to the background as soon as I click on its border or titlebar. If I do not touch the border nor the titlebar then everything is alright and the dialog box is displayed in the foreground.

Once I have touched the border or the titlebar of the PPD properties window it immediately goes to the background and cannot be brought to the foreground (in front of the print dialog) again.
Comment 1 Alexander Berger 2007-11-23 16:26:00 UTC
Created attachment 22169 [details]
Screenshot of the two dialog boxes

The PPD properties dialog box (the one in the background) looks like an
ordinary window and not like a dialog box.
Comment 2 John Layt 2007-11-23 19:53:54 UTC
I have not struck this particular problem anywhere, but I am still running everything from within a qt3 session.  The print dialog is now pure qt (QPrintDialog to be precise) so this could be an upstream issue, or an interaction problem between Qt/KDE4.

So this happen with all apps on your install, or just some?

The PPD properties is a dialog:

    class PPDPropertiesDialog : public QDialog , Ui::QPrintPropertiesDialog

I have seen a similar issue in kmag where it always appears behind, but I could find no obvious reason for this.
Comment 3 Alexander Berger 2007-11-23 23:22:15 UTC
Created attachment 22174 [details]
Simple QT4 only testcase for QPrintDialog

This test case using QT4 only works correctly. So it seems to be a KDE4
problem.
Comment 4 Alexander Berger 2007-11-23 23:22:34 UTC
I can reproduce this problem with several differen applications (e.g. Konqueror, Kwrite, KolourPaint, Kword, Okular, ...). I am running a "pure" QT4/KDE4 session with qt-copy. I have not yet found an application (with printing capabilities) which does not suffer from this bug.

A simple QT4 application like the one in my second attachment works correctly, so it seems to be a KDE4 problem. 
Comment 5 Alexander Berger 2007-11-24 06:54:08 UTC
Ok a simple KDE4 based test case (see attachement 3) also works correctly. But please have a look at the image in attachement 4, where you can see that the PrintDialog of Konqueror ("Print dialog <2>") has a different titlebar than the PrintDialog of my simple KDE4 test case ("Print dialog").

So I guess there is something wrong with the combination of the dialog box types of "PrintDialog" and "PPD Properties" in KDE4 applications.
Comment 6 Alexander Berger 2007-11-24 06:55:17 UTC
Created attachment 22175 [details]
KDE4 based test case for QPrintDialog
Comment 7 Alexander Berger 2007-11-24 06:59:08 UTC
Created attachment 22176 [details]
Different titlebars for PrintDialog

The titlebars on the top belong to my simple KDE4 test case while the two on
the bottom are from a KDE4 application (Konqueror). Please note the different
buttons available in the titlebar of PrintDialog and PrintDialog<2>.
Comment 8 John Layt 2007-11-24 18:06:32 UTC
Can you try a simple test case using the KdePrint static method for creating the dialog?

    #include <kdeprintdialog.h>
    QPrintDialog pd = KdePrint::createPrintDialog( &printer, this );

And the alternative method which adds a any widget to the dialog:

    QPrintDialog pd = KdePrint::createPrintDialog( &printer,
                               QList<QWidget*>() << aWidget, this );

As separate cases would be great.

Thanks!
Comment 9 Alexander Berger 2007-11-26 19:01:34 UTC
Created attachment 22206 [details]
Test case to reproduce the problem within a KDE4 session

Using this test case I can reproduce the problem from within my KDE4 session.
But if I call the same binary from my KDE3 session (by changing environment
variables) the problem does not occur at all. Calling "ldd" on the library
results in the exactly same list of shared libraries for both kind of sessions.


	libQtCore.so.4 => /usr/lib/libQtCore.so.4
	libQtGui.so.4 => /usr/lib/libQtGui.so.4
	libkdecore.so.5 => /home/ab/kde/lib/libkdecore.so.5
	libkdeui.so.5 => /home/ab/kde/lib/libkdeui.so.5
	libstdc++.so.6 => /usr/lib/libstdc++.so.6
	libm.so.6 => /lib/libm.so.6
	libgcc_s.so.1 => /lib/libgcc_s.so.1
	libc.so.6 => /lib/libc.so.6
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1
	libz.so.1 => /usr/lib/libz.so.1
	libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0
	librt.so.1 => /lib/librt.so.1
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0
	libpthread.so.0 => /lib/libpthread.so.0
	libdl.so.2 => /lib/libdl.so.2
	libaudio.so.2 => /usr/lib/libaudio.so.2
	libXt.so.6 => /usr/lib/libXt.so.6
	libpng12.so.0 => /usr/lib/libpng12.so.0
	libSM.so.6 => /usr/lib/libSM.so.6
	libICE.so.6 => /usr/lib/libICE.so.6
	libXi.so.6 => /usr/lib/libXi.so.6
	libXrender.so.1 => /usr/lib/libXrender.so.1
	libXrandr.so.2 => /usr/lib/libXrandr.so.2
	libXfixes.so.3 => /usr/lib/libXfixes.so.3
	libXcursor.so.1 => /usr/lib/libXcursor.so.1
	libXinerama.so.1 => /usr/lib/libXinerama.so.1
	libfreetype.so.6 => /usr/lib/libfreetype.so.6
	libXext.so.6 => /usr/lib/libXext.so.6
	libX11.so.6 => /usr/lib/libX11.so.6
	libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4
	libQtDBus.so.4 => /usr/lib/libQtDBus.so.4
	libQtXml.so.4 => /usr/lib/libQtXml.so.4
	libbz2.so.1.0 => /lib/libbz2.so.1.0
	libresolv.so.2 => /lib/libresolv.so.2
	libQtSvg.so.4 => /usr/lib/libQtSvg.so.4
	libXft.so.2 => /usr/lib/libXft.so.2
	libXau.so.6 => /usr/lib/libXau.so.6
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6
	libXtst.so.6 => /usr/lib/libXtst.so.6
	/lib64/ld-linux-x86-64.so.2
	libexpat.so.1 => /usr/lib/libexpat.so.1
	libdbus-1.so.3 => /usr/lib/libdbus-1.so.3
Comment 10 Alexander Berger 2007-11-26 19:11:34 UTC
I think the origin of this problem is not the PrintDialog but the KDE4 window manager (kwin). When I replace the window mangager in my KDE4 session with the window manager from KDE3 then everything works alright. As soon as I switch back using the default KDE4 window manager the problem reappears.
Comment 11 Pino Toscano 2008-01-15 19:36:23 UTC
*** Bug 155849 has been marked as a duplicate of this bug. ***
Comment 12 Pino Toscano 2008-03-28 00:29:02 UTC
*** Bug 159985 has been marked as a duplicate of this bug. ***
Comment 13 Ivo Anjo 2008-03-28 22:59:46 UTC
The problem is definitely with kwin (see the description I gave on #159985).

I also see this bug when I use eSvn, and ask for a diff in the log window, the window that shows the diff behaves strangely (when you click on it it goes behind the log window, when you click on the log window it comes to front again).
Again this behavior is not present with kwin 3.
Comment 14 John Layt 2008-12-14 14:48:35 UTC
I haven't seen or heard any further problems with this one, so I'm assuming whatever went astray in KWin is now sorted.