Bug 72118 - Snapping a region does not work with dual-head setup.
Summary: Snapping a region does not work with dual-head setup.
Status: RESOLVED FIXED
Alias: None
Product: ksnapshot
Classification: Applications
Component: general (show other bugs)
Version: 0.7
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Richard Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-08 09:49 UTC by Thomas Zander
Modified: 2007-11-17 11:26 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2004-01-08 09:49:02 UTC
Version:           0.7 (using KDE 3.1.94 (CVS >= 20031206), compiled sources)
Compiler:          gcc version 3.3.2 (Debian)
OS:          Linux (i686) release 2.6.0dell-optiplex

When I start KSnapshot I see an image of 2 screens, so it is aware of the 'full' desktop.
When I set capture mode to Region and press 'new' I see the content of my right monitor (which containted the cursor) being replaced with an 'image' of my left monitor. Makes me feel I still am dreaming :)

I expect _both_ monitors to be replaced with an image of their contents so I can snap either (or even both) monitors.
Comment 1 Malte S. Stretz 2004-01-12 08:25:38 UTC
With Xinerama I get another nice effect: If I start ksnapshot on my right screen and choose to snap a region, it shifts the whole screen right so that the right screen has the contents of the left one. It really shifts the screen and does not replace the right with the left which I can see because I have the weird overall resolution of 1824x768 :)
Comment 2 Jens 2004-01-15 22:53:54 UTC
Yes, I can second that bug. It is currently impossible to take a snapshot of the _second_ monitor contents in "region" mode.

Using CVS from 2-jan-2004.
Comment 3 Richard Moore 2004-01-16 19:10:52 UTC
 Malte S. Stretz : you've misiterpreted what happenned. You're seing a picture of one monitor on the other monitor.
Comment 4 Malte S. Stretz 2004-01-16 20:23:58 UTC
No, that's not right. I see the whole Xinerama screen on the right monitor. As I wrote before, do I ahve a  resolution of 1824x768. That means, I have a 800x768 screen (vertically virtually extended) on the left and 1024x768 on the right. So if I'd see the left screen on the right one, I'd have some "undefined" space between pixel 801-1024. What I actually see are the left 224 pixels of the right screen, so the while viewport is "shifted" to the right.

But actually, I don't care *what* is wrong as long as it gets fixed ;-)
Comment 5 Richard Moore 2004-01-16 22:04:11 UTC
Subject: Re:  Snapping a region does not work with dual-head setup.

On Friday 16 January 2004 19:23, you wrote:
> But actually, I don't care *what* is wrong as long as it gets fixed ;-)

The trouble is that I coded every grab mode /except/ this one. I fixed the 
most horrendous bug, but I think it really needs a rewrite (just that grab 
mode). This will have to wait for 3.2.1 I think unless I can figure out a 
band-aid fix.

Rich.

Comment 6 Malte S. Stretz 2004-01-16 22:35:41 UTC
To me this bug isn't really grave. I can still grab the whole screen and feed it to GIMP as I always did.
Comment 7 David Liontooth 2005-01-30 06:14:48 UTC
Just a reminder -- this is still baffling behavior in dual-head mode, though the previous comments fit the facts. Dual-head is of course very useful for screen captures, since you can see put the screen capture program itself out of the way of what you're capturing. So having region select work in dual head is important...

BTW, the three available modes are not mentioned in the documentation.

Cheers,
Dave
Comment 8 Justin T. Frisch 2005-04-07 11:26:51 UTC
I was just playing with this again to see if there were any changes made to it... appears that there weren't.

However in the process of playing I noticed something that allowed me to bypass this bug.  

When the KSnapshot dialog box is in the right window, then the left window will be copied to the right window (in other words... you will have two copies of the left window.)  When the KSnapshot dialog is in the left window to start then this bug does not occur and you are able to see both windows and take region snapshots from both of them.

There is still a bug there, but at least it isn't so crippling with this workaround.
Comment 9 Josef Spillner 2005-06-06 00:55:23 UTC
FYI I think this is related to the kwin xinerama issue I reported (#106864). But I'm not sure since it's not my computer I tested it on.
Comment 10 Tobias Koenig 2005-12-23 11:28:37 UTC
SVN commit 490817 by tokoe:

Fixed region grab with dual head setup

BUGS: 72118 106868 102648


 M  +8 -0      regiongrabber.cpp  


--- branches/KDE/3.5/kdegraphics/ksnapshot/regiongrabber.cpp #490816:490817
@@ -89,6 +89,14 @@
   pixmap = QPixmap::grabWindow( qt_xrootwin() );
   setPaletteBackgroundPixmap( pixmap );
 
+  QDesktopWidget desktopWidget;
+  QRect desktopSize;
+  if ( desktopWidget.isVirtualDesktop() )
+    desktopSize = desktopWidget.geometry();
+  else
+    desktopSize = desktopWidget.screenGeometry( qt_xrootwin() );
+
+  setGeometry( desktopSize );
   showFullScreen();
 
   QApplication::setOverrideCursor( crossCursor );
Comment 11 pierre 2006-04-29 00:29:57 UTC
Hi

I'm facing the issue using KDE 3.5.2 and X.org 7.0 on kUbuntu dapper. When trying to grab a zone, the first screen picture is copied to the second screen, making it impossible to grab a zone of the second screen...
Is this patch supposed to be in KDE 3.5.2, or is it going to be in KDE 3.5.3 only ?
Comment 12 p92 2006-05-11 08:48:36 UTC
I confirm and second this, this is extremely annoying and seemed to appear upon kde 3.5.2. 
Comment 13 pierre 2006-05-11 08:52:00 UTC
p92 : what's your distrib ? It first looked like a dapper-specific issue, but if you can confirm this on other distribs...
Comment 14 p92 2006-05-11 09:28:35 UTC
yes unfortunately i run dapper and opened this bug :  https://launchpad.net/distros/ubuntu/+source/xserver-xorg/+bug/37992
Comment 15 pierre 2006-05-11 09:35:13 UTC
Your report on launchpad is wrong. It doesn't switch to clone mode ! It shows a window fullscreen on the second screen, that's different... More likely a Qt, kdelibs or kwin issue.
Comment 16 Jens 2006-05-11 11:09:45 UTC
I confirm and second this bug (KDE 3.5.2, SuSE 10 RPMs).
Comment 17 p92 2006-05-11 16:29:59 UTC
pierre:  I changed my bug description in kubuntu dapper.
Comment 18 Elias Probst 2006-06-20 00:58:57 UTC
Why was this bug closed? The problem still exists on 3.5.3 (Gentoo).
If it was fixed in CVS, please inform about this before closing a bug.

Thank you.
Comment 19 Johan Ekenberg 2006-06-29 13:20:24 UTC
This bug still exists, using KDE 3.5.2 or 3.5.3 in Gentoo Linux. Please reopen the bug, or inform why it should remain marked as "resolved". Thank you!
Comment 20 Richard Moore 2006-06-29 15:04:00 UTC
The problem was closed because someone made patch they said fixed it
and the patch was applied. I don't have xinerama so I can't test
xinerama stuff myself - if someone wants to give me a graphics card
and a second monitor then i'll take a look.

Rich.

On 29 Jun 2006 11:20:25 -0000, Johan Ekenberg <johan@ekenberg.se> wrote:
[bugs.kde.org quoted mail]
Comment 21 bernhard 2006-06-29 15:47:06 UTC
Am Donnerstag, 29. Juni 2006 15:04 schrieb Richard Moore:
>
> ------- Additional Comments From rich kde org  2006-06-29 15:04 -------
> The problem was closed because someone made patch they said fixed it
> and the patch was applied. I don't have xinerama so I can't test
> xinerama stuff myself - if someone wants to give me a graphics card
> and a second monitor then i'll take a look.
>
> Rich.


Someone was me. I did some tests; Lubos gave me the hint WX11BypassWM and 
applied the patch.
Something in KWin may have changed since Dec. 2005 that
prevents "crazy" QWidgets to be shown anywhere.
This makes WX11BypassWM necessary in this special case.
This technique is used in SizeTip too.
(And of course the patch conflicts with SizeTip ...)

The next fix I'll send you directly.
Excause me please.

Bernhard

PS: I'am curios to know ho to combine two toplevel-widgets. Do you have any 
idea?
Comment 22 Richard Moore 2006-06-29 15:56:39 UTC
On 29 Jun 2006 13:47:08 -0000, bernhard@schiffner-limbach.de >
> ------- Additional Comments From bernhard schiffner-limbach de  2006-06-29 15:47 -------
> Am Donnerstag, 29. Juni 2006 15:04 schrieb Richard Moore:
> >
> > ------- Additional Comments From rich kde org  2006-06-29 15:04 -------
> > The problem was closed because someone made patch they said fixed it
> > and the patch was applied. I don't have xinerama so I can't test
> > xinerama stuff myself - if someone wants to give me a graphics card
> > and a second monitor then i'll take a look.
> >
> > Rich.
>
>
> Someone was me. I did some tests; Lubos gave me the hint WX11BypassWM and
> applied the patch.
> Something in KWin may have changed since Dec. 2005 that
> prevents "crazy" QWidgets to be shown anywhere.
> This makes WX11BypassWM necessary in this special case.
> This technique is used in SizeTip too.
> (And of course the patch conflicts with SizeTip ...)
>
> The next fix I'll send you directly.
> Excause me please.


No problem, I talked to Lubos and it looks like problem is the
combination of bypasswm with showfullScreen() etc. In order to get it
to work we'll need to manaually implement showFullScreen().

>
> Bernhard
>
> PS: I'am curios to know ho to combine two toplevel-widgets. Do you have any
> idea?
>


I'm not sure what you mean.

Cheers

Rich.
Comment 23 p92 2006-08-18 00:02:48 UTC
In kde 3.5.4 it seems to work now, but just after the snapshot is done, kwin crashes. Relaunching kwin shows ksnapshot is still present and ready to record the snapshot.
Comment 24 Pascal Cavy 2006-09-06 18:32:23 UTC
and this is the kwin crash. Maybe I have to open a bug on kwin... 
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1229252928 (LWP 18222)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0xb7ecbbdf in KWinInternal::Client::screen ()
   from /usr/lib/libkdeinit_kwin.so
#7  0xb7f06dce in KWinInternal::Workspace::activateNextClient ()
   from /usr/lib/libkdeinit_kwin.so
#8  0xb7f150be in KWinInternal::Workspace::workspaceEvent ()
   from /usr/lib/libkdeinit_kwin.so
#9  0xb7f15114 in KWinInternal::Application::x11EventFilter ()
   from /usr/lib/libkdeinit_kwin.so
#10 0xb708f457 in qt_set_x11_event_filter () from /usr/lib/libqt-mt.so.3
#11 0xb709c74c in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#12 0xb70b64db in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#13 0xb712a947 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#14 0xb712a86a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#15 0xb7110965 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#16 0xb7f16a63 in kdemain () from /usr/lib/libkdeinit_kwin.so
#17 0xb7c74ea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#18 0x080483b1 in ?? ()
Comment 25 Pierre Ducroquet 2007-11-17 11:26:31 UTC
Fix in trunk as of revision 737899.