mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
MouseGestures: Restore force context on mouse release value on plugin unload
This commit is contained in:
parent
e4d7445c77
commit
0dd682d317
|
@ -1,6 +1,6 @@
|
|||
/* ============================================================
|
||||
* Mouse Gestures plugin for QupZilla
|
||||
* Copyright (C) 2013-2016 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2013-2017 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -306,6 +306,7 @@ void MouseGestures::init()
|
|||
initFilter();
|
||||
|
||||
// We need to override right mouse button events
|
||||
m_oldWebViewForceContextMenuOnRelease = WebView::forceContextMenuOnMouseRelease();
|
||||
WebView::setForceContextMenuOnMouseRelease(m_button == Qt::RightButton || m_enableRockerNavigation);
|
||||
}
|
||||
|
||||
|
@ -389,4 +390,7 @@ MouseGestures::~MouseGestures()
|
|||
{
|
||||
m_filter->clearGestures(true);
|
||||
delete m_filter;
|
||||
|
||||
// Restore original value
|
||||
WebView::setForceContextMenuOnMouseRelease(m_oldWebViewForceContextMenuOnRelease);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ============================================================
|
||||
* Mouse Gestures plugin for QupZilla
|
||||
* Copyright (C) 2012-2014 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2012-2017 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -80,6 +80,8 @@ private:
|
|||
|
||||
bool m_blockNextRightMouseRelease;
|
||||
bool m_blockNextLeftMouseRelease;
|
||||
|
||||
bool m_oldWebViewForceContextMenuOnRelease = false;
|
||||
};
|
||||
|
||||
#endif // MOUSEGESTURES_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user