Bug 223314 - Document zooms in/out constantly when Okular is "snapped" using the Kwin effect
Summary: Document zooms in/out constantly when Okular is "snapped" using the Kwin effect
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-18 18:10 UTC by Justin Brown
Modified: 2010-01-28 02:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Brown 2010-01-18 18:10:55 UTC
Version:           0.9.80 (using Devel)
OS:                Linux
Installed from:    Compiled sources

Using Kubuntu 9.10 (amd64) with the Beta PPA to get KDE SC 4.4.90.

Okular works perfectly fine, except when this bug occurs. 

Here's what happens:
1) Open a PDF with Okular.
2) Drag it to the right side of the screen, so that it "snaps" and resizes to take up half the screen. (This is a new Kwin effect that Mimics Windows 7's Aero Snap.)
3) The document becomes very unstable. The zoom is automatically set to "Fit Width." It doesn't seem like Okular can figure out the window size because it will slightly zoom in (probably 5% or so), then immediately zoom out to "fit width." This repeats very quickly (probably 4 times per second).

The problem does not occur when:
1) The zoom level is set to any specific %.
2) The zoom level is set to "page fit."

Opening a document from the terminal results in this output:
:~$ okular Download/syllabus.pdf 
okular(23703)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from  "/var/tmp/kdecache-justin/ksycoca4"                                                                                                                          
okular(23703)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:                                                   
okular(23703)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:                                                   
okular(23703)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:                                                   
okular(23703)/kdecore (trader) KMimeTypeTrader::query: query for mimeType  "application/pdf" ,  "okular/Generator"  : returning  1  offers                                                                                                              
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=4 50x64@0                                           
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=4 50x64@0 async == true        
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true      
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0                                         
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 695x885@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=3 678x863@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3 678x863@0


It appears as though Okular can't decide its window size, so it changes the sub-window where the document is shown.
Comment 1 Albert Astals Cid 2010-01-21 23:48:40 UTC
With "The zoom is automatically set to 'Fit Width.'" You mean that snapping the window changes the zoom value in Okular?
Comment 2 Justin Brown 2010-01-22 17:18:41 UTC
Thanks Albert. Okular is automatically set to "Fit Width." It opens in "fit width" and stays in "fit width" after "snapping."

Here's my understanding of how Okular works. Okular is in a "main window" that contains the entire application. Inside that there is a sub-window (some type of qt widget probably) that shows the document. When Okular is set to "fit width" the sub-window sets its scale (zoom) based on the size of the main window. Either Okular or Kwin is sending/receiving a strange window size. If you look at the output that I posted, you can see that Okular repeats messages like:

okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest:
sending request id=3 695x885@0 async == true
okular(23703)/okular (app) Okular::Document::requestPixmaps: request id=3
678x863@0
okular(23703)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest:
sending request id=3 678x863@0 async == true

It thinks that the window size is changing between two values. Because "fit width" is dependent on the main window size, Okular is constantly re-scaling the document based on those two window sizes. 

The interesting thing is that the main window is not changing in size. It just thinks that it is. The Okular window is not moving/resizing.
Comment 3 Justin Brown 2010-01-28 02:47:38 UTC
Must have been an RC1 bug (or more likely, related to the Kubuntu packages).

No problems with RC2. Closing this bug.