[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:18:53 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit a28c4728ce41f877aeac13003ec977fb6312942b
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Dec 14 00:43:13 2003 +0000

            Reviewed by Maciej.
    
            - fixed 3506204: homepage.mac slide show window is wrong size on 2nd monitor
    
            * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry): Add code to flip the Y coordinate.
            This has no effect on the main screen, but a big effect on others. I used the same code to
            flip Y screen coordinates that is used KWQWindowWidget.mm and KWQKHTMLPartBrowserExtension.mm.
            * kwq/KWQKWinModule.mm: (KWinModule::workArea): Replaced the incorrect code to flip the Y
            coordinate here with correct code. The code flipped based on the frame of the main screen,
            but it needs to flip based on the frame of screen 0.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5792 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c6c3a31..db9a46d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-12-13  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed 3506204: homepage.mac slide show window is wrong size on 2nd monitor
+
+        * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry): Add code to flip the Y coordinate.
+        This has no effect on the main screen, but a big effect on others. I used the same code to
+        flip Y screen coordinates that is used KWQWindowWidget.mm and KWQKHTMLPartBrowserExtension.mm.
+        * kwq/KWQKWinModule.mm: (KWinModule::workArea): Replaced the incorrect code to flip the Y
+        coordinate here with correct code. The code flipped based on the frame of the main screen,
+        but it needs to flip based on the frame of screen 0.
+
 2003-12-12  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3505208>: keys added to keychain from KEYGEN need better UI names
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index d12ff22..e70c0e7 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -45,17 +45,24 @@ int QDesktopWidget::height()
     return (int)[[NSScreen mainScreen] frame].size.height;
 }
 
-// FIXME: Do we need to handle multiple screens?
+// FIXME: Some day we may want to handle the case where the widget is in a window that's on
+// a different screen from the key window at the time the script is run. If so, keep in mind
+// that the result of screenGeometry is intersected with the result of KWinModule::workArea.
 
 int QDesktopWidget::screenNumber(QWidget *)
 {
+    // Always returns 0, which is fine since this is only passed to screenGeometry,
+    // which ignores the screen number parameter.
     return 0;
 }
 
 QRect QDesktopWidget::screenGeometry(int screenNumber)
 {
+    // Ignores the screen number, and always returns the geometry of the main screen,
+    // which is the screen that the key window is on.
     NSRect rect = [[NSScreen mainScreen] frame];
-    return QRect((int)rect.origin.x, (int)rect.origin.y, (int)rect.size.width, (int)rect.size.height);
+    rect.origin.y = NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]) - NSMaxY(rect);
+    return QRect(rect);
 }
 
 QSize QApplication::globalStrut()
diff --git a/WebCore/kwq/KWQKWinModule.mm b/WebCore/kwq/KWQKWinModule.mm
index 878dc8c..49c8225 100644
--- a/WebCore/kwq/KWQKWinModule.mm
+++ b/WebCore/kwq/KWQKWinModule.mm
@@ -27,12 +27,9 @@
 
 QRect KWinModule::workArea() const
 {
-    // No need to block exceptions because these simple NSScreen calls can't throw.
-
-    NSRect visibleRect = [[NSScreen mainScreen] visibleFrame];
-    NSRect rect = [[NSScreen mainScreen] frame];
-    return QRect((int)visibleRect.origin.x,
-                 (int)(rect.size.height - visibleRect.size.height - visibleRect.origin.y),
-                 (int)visibleRect.size.width,
-                 (int)visibleRect.size.height);
+    // Returns the visibleFrame of the main screen, which is the screen that the key window is on.
+    // No need to block exceptions because these simple NSScreen calls never throw.
+    NSRect rect = [[NSScreen mainScreen] visibleFrame];
+    rect.origin.y = NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]) - NSMaxY(rect);
+    return QRect(rect);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list