Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37882078
en ru br
Репозитории ALT
S:3.3.8d-alt16.1
5.1: 3.3.8b-alt7
4.1: 3.3.8b-alt2.qa1
4.0: 3.3.8b-alt0.M40.1
3.0: 3.3.4-alt6
+updates:3.3.4-alt6.3.M30
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: qt3

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0060-qpopup_ignore_mousepos.patch
Скачать


qt-bugs@ issue : 49417
bugs.kde.org number : 74778
applied: no
author: Lubos Lunak <l.lunak@kde.org>
 Hello,
 
  please consider applying the two attached QPopupMenu patches fixing KDE bugs 
  #58719 and #74778 (http://bugs.kde.org/show_bug.cgi?id=58719, 
  http://bugs.kde.org/show_bug.cgi?id=74778), which complain about keyboard 
  navigation in popup menus being very uncomfortable because of being affected 
  by mouse position despite mouse not being used at all.
  [... #58719 ... ]
  
  - ignoremousepos.patch - (#74778) - use keyboard to open some popup which 
  doesn't show up at mouse position (e.g. Alt+F3 with KWin or the context menu 
  key with some file selected in Konqueror). If the mouse is positioned in the 
  area where the popup shows, the random entry happening to be at the cursor 
  position becomes highlighted.
  The patch fixes this by ignoring mouse events that happen at mouse position 
  which was current when the popup was shown, i.e. all mouse move events that 
  actually aren't triggered by mouse move are ignored. I first wanted to ignore 
  only the very first mouse move event (which should be caused by EnterNotify 
  for the popup) but I realized that Qt's event handling causes the popup to 
  possibly get more than just one initial move event, caused by LeaveNotify 
  events for normal widgets being transformed to mouse move events for the 
  popup, so I have no better idea how to solve this problem.
   
--- src/widgets/qpopupmenu.cpp.sav	2004-05-25 17:48:21.000000000 +0200
+++ src/widgets/qpopupmenu.cpp	2004-05-25 17:57:28.981809096 +0200
@@ -254,6 +254,7 @@ public:
     QSize calcSize;
     QRegion mouseMoveBuffer;
     uint hasmouse : 1;
+    QPoint ignoremousepos;
 };
 
 static QPopupMenu* active_popup_menu = 0;
@@ -1354,6 +1355,7 @@ void QPopupMenu::show()
     popupActive = -1;
     if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this))
 	d->mouseMoveBuffer = QRegion();
+    d->ignoremousepos = QCursor::pos();
 }
 
 /*!
@@ -1701,6 +1703,11 @@ void QPopupMenu::mouseReleaseEvent( QMou
 
 void QPopupMenu::mouseMoveEvent( QMouseEvent *e )
 {
+    if( e->globalPos() == d->ignoremousepos ) {
+        return;
+    }
+    d->ignoremousepos = QPoint();
+
     motion++;
 
     if ( parentMenu && parentMenu->isPopupMenu ) {
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin