зеркало из https://github.com/mozilla/pjs.git
fix bug #41998. reset mouse motion variables whenever a drag is started. this should fix the lack of UI events after a drag. r=bryner, a=brendan
This commit is contained in:
Родитель
2d5a3f94f9
Коммит
1608621bb1
|
@ -28,6 +28,7 @@
|
|||
#include "nsVoidArray.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsPrimitiveHelpers.h"
|
||||
#include "nsWidget.h"
|
||||
#include <gtk/gtkinvisible.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
|
@ -144,6 +145,9 @@ nsDragService::InvokeDragSession (nsIDOMNode *aDOMNode,
|
|||
gdk_event.button.x_root = 0;
|
||||
gdk_event.button.y_root = 0;
|
||||
|
||||
// before we start our drag, give the widget code a chance to
|
||||
// clean up any state.
|
||||
nsWidget::DragStarted();
|
||||
// start our drag.
|
||||
GdkDragContext *context = gtk_drag_begin(mHiddenWidget,
|
||||
sourceList,
|
||||
|
|
|
@ -117,6 +117,18 @@ void nsWidget::GetLastEventTime(guint32 *aTime)
|
|||
*aTime = sLastEventTime;
|
||||
}
|
||||
|
||||
void nsWidget::DragStarted(void)
|
||||
{
|
||||
if (sButtonMotionTarget)
|
||||
{
|
||||
sButtonMotionTarget = nsnull;
|
||||
sButtonMotionRootX = -1;
|
||||
sButtonMotionRootY = -1;
|
||||
sButtonMotionWidgetX = -1;
|
||||
sButtonMotionWidgetY = -1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_XIM
|
||||
nsresult nsWidget::KillICSpotTimer ()
|
||||
{
|
||||
|
|
|
@ -206,6 +206,11 @@ public:
|
|||
// the event handling code needs to let us know the time of the last event
|
||||
static void SetLastEventTime(guint32 aTime);
|
||||
static void GetLastEventTime(guint32 *aTime);
|
||||
|
||||
// inform the widget code that we are about to do a drag - it must
|
||||
// release the sButtonMotionTarget if it is set.
|
||||
static void DragStarted(void);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitCallbacks(char * aName = nsnull);
|
||||
|
|
Загрузка…
Ссылка в новой задаче