Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
0a5d252c
Kaydet (Commit)
0a5d252c
authored
May 16, 2013
tarafından
Andre Fischer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
122321: Fix processing of scroll whell to not block other events.
üst
ca7264d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
43 deletions
+56
-43
Deck.cxx
sfx2/source/sidebar/Deck.cxx
+47
-39
Deck.hxx
sfx2/source/sidebar/Deck.hxx
+3
-2
FocusManager.cxx
sfx2/source/sidebar/FocusManager.cxx
+6
-2
No files found.
sfx2/source/sidebar/Deck.cxx
Dosyayı görüntüle @
0a5d252c
...
...
@@ -222,49 +222,57 @@ void Deck::DataChanged (const DataChangedEvent& rEvent)
long
Deck
::
Notify
(
NotifyEvent
&
rEvent
)
{
if
(
rEvent
.
GetType
()
!=
EVENT_COMMAND
)
return
sal_False
;
if
(
rEvent
.
GetType
()
==
EVENT_COMMAND
)
{
CommandEvent
*
pCommandEvent
=
reinterpret_cast
<
CommandEvent
*>
(
rEvent
.
GetData
());
if
(
pCommandEvent
!=
NULL
)
switch
(
pCommandEvent
->
GetCommand
())
{
case
COMMAND_WHEEL
:
return
ProcessWheelEvent
(
pCommandEvent
,
rEvent
)
?
sal_True
:
sal_False
;
default
:
break
;
}
}
CommandEvent
*
pCommandEvent
=
reinterpret_cast
<
CommandEvent
*>
(
rEvent
.
GetData
());
if
(
pCommandEvent
==
NULL
)
return
sal_False
;
return
Window
::
Notify
(
rEvent
);
}
switch
(
pCommandEvent
->
GetCommand
())
{
case
COMMAND_WHEEL
:
{
if
(
!
mpVerticalScrollBar
||
!
mpVerticalScrollBar
->
IsVisible
())
return
sal_False
;
// Ignore all wheel commands from outside the vertical
// scroll bar. Otherwise after a scroll we might land on
// a spin field and subsequent wheel events would change
// the value of that control.
if
(
rEvent
.
GetWindow
()
!=
mpVerticalScrollBar
.
get
())
return
sal_True
;
// Get the wheel data and check that it describes a valid
// vertical scroll.
const
CommandWheelData
*
pData
=
pCommandEvent
->
GetWheelData
();
if
(
pData
==
NULL
||
pData
->
GetModifier
()
||
pData
->
GetMode
()
!=
COMMAND_WHEEL_SCROLL
||
pData
->
IsHorz
())
return
sal_False
;
// Execute the actual scroll action.
long
nDelta
=
pData
->
GetDelta
();
mpVerticalScrollBar
->
DoScroll
(
mpVerticalScrollBar
->
GetThumbPos
()
-
nDelta
);
return
sal_True
;
}
default
:
break
;
}
return
sal_False
;
bool
Deck
::
ProcessWheelEvent
(
CommandEvent
*
pCommandEvent
,
NotifyEvent
&
rEvent
)
{
if
(
!
mpVerticalScrollBar
)
return
false
;
if
(
!
mpVerticalScrollBar
->
IsVisible
())
return
false
;
// Ignore all wheel commands from outside the vertical scroll bar.
// Otherwise after a scroll we might land on a spin field and
// subsequent wheel events would change the value of that control.
if
(
rEvent
.
GetWindow
()
!=
mpVerticalScrollBar
.
get
())
return
true
;
// Get the wheel data and check that it describes a valid vertical
// scroll.
const
CommandWheelData
*
pData
=
pCommandEvent
->
GetWheelData
();
if
(
pData
==
NULL
||
pData
->
GetModifier
()
||
pData
->
GetMode
()
!=
COMMAND_WHEEL_SCROLL
||
pData
->
IsHorz
())
return
false
;
// Execute the actual scroll action.
long
nDelta
=
pData
->
GetDelta
();
mpVerticalScrollBar
->
DoScroll
(
mpVerticalScrollBar
->
GetThumbPos
()
-
nDelta
);
return
true
;
}
...
...
sfx2/source/sidebar/Deck.hxx
Dosyayı görüntüle @
0a5d252c
...
...
@@ -104,8 +104,9 @@ private:
::
boost
::
scoped_ptr
<
ScrollBar
>
mpVerticalScrollBar
;
DECL_LINK
(
HandleVerticalScrollBarChange
,
void
*
);
bool
ProcessWheelEvent
(
CommandEvent
*
pCommandEvent
,
NotifyEvent
&
rEvent
);
};
...
...
sfx2/source/sidebar/FocusManager.cxx
Dosyayı görüntüle @
0a5d252c
...
...
@@ -559,6 +559,10 @@ IMPL_LINK(FocusManager, WindowEventListener, VclSimpleEvent*, pEvent)
case
VCLEVENT_WINDOW_GETFOCUS
:
case
VCLEVENT_WINDOW_LOSEFOCUS
:
pSource
->
Invalidate
();
return
1
;
default
:
break
;
}
return
0
;
...
...
@@ -613,14 +617,14 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
break
;
}
}
break
;
return
1
;
}
default
:
break
;
}
return
1
;
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment