[haiku-webkit-commits] r441 - webkit/trunk/WebKit/haiku/WebPositive

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Tue, 20 Apr 2010 15:44:10 +0000

Author: stippi
Date: Tue Apr 20 15:44:10 2010
New Revision: 441
URL: http://mmlr.dyndns.org/changeset/441

Log:
Return early in BrowserWindow::DispatchMessage(), if the message was already
handled. This would also fix return keys ending up in the URLTextView.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Tue Apr 20 
15:43:23 2010        (r440)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Tue Apr 20 
15:44:10 2010        (r441)
@@ -397,11 +397,13 @@
                && message->FindInt32("modifiers", (int32*)&modifiers) == B_OK) 
{
 
                modifiers = modifiers & 0x000000ff;
-               if (bytes[0] == B_LEFT_ARROW && modifiers == B_COMMAND_KEY)
+               if (bytes[0] == B_LEFT_ARROW && modifiers == B_COMMAND_KEY) {
                        PostMessage(GO_BACK);
-               else if (bytes[0] == B_RIGHT_ARROW && modifiers == 
B_COMMAND_KEY)
+                       return;
+               } else if (bytes[0] == B_RIGHT_ARROW && modifiers == 
B_COMMAND_KEY) {
                        PostMessage(GO_FORWARD);
-               else if (target == fURLInputGroup->TextView()) {
+                       return;
+               } else if (target == fURLInputGroup->TextView()) {
                        // Handle B_RETURN in the URL text control. This is the 
easiest
                        // way to react *only* when the user presses the return 
key in the
                        // address bar, as opposed to trying to load whatever 
is in there
@@ -413,6 +415,7 @@
                                fURLInputGroup->GoButton()->Invoke();
                                snooze(1000);
                                
fURLInputGroup->GoButton()->SetValue(B_CONTROL_OFF);
+                               return;
                        }
                }
        }

Other related posts:

  • » [haiku-webkit-commits] r441 - webkit/trunk/WebKit/haiku/WebPositive - webkit