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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
31 deletions
+44
-31
Deck.cxx
sfx2/source/sidebar/Deck.cxx
+35
-27
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)
...
@@ -222,49 +222,57 @@ void Deck::DataChanged (const DataChangedEvent& rEvent)
long
Deck
::
Notify
(
NotifyEvent
&
rEvent
)
long
Deck
::
Notify
(
NotifyEvent
&
rEvent
)
{
{
if
(
rEvent
.
GetType
()
!=
EVENT_COMMAND
)
if
(
rEvent
.
GetType
()
==
EVENT_COMMAND
)
return
sal_False
;
{
CommandEvent
*
pCommandEvent
=
reinterpret_cast
<
CommandEvent
*>
(
rEvent
.
GetData
());
CommandEvent
*
pCommandEvent
=
reinterpret_cast
<
CommandEvent
*>
(
rEvent
.
GetData
());
if
(
pCommandEvent
==
NULL
)
if
(
pCommandEvent
!=
NULL
)
return
sal_False
;
switch
(
pCommandEvent
->
GetCommand
())
switch
(
pCommandEvent
->
GetCommand
())
{
{
case
COMMAND_WHEEL
:
case
COMMAND_WHEEL
:
{
return
ProcessWheelEvent
(
pCommandEvent
,
rEvent
)
if
(
!
mpVerticalScrollBar
?
sal_True
||
!
mpVerticalScrollBar
->
IsVisible
())
:
sal_False
;
return
sal_False
;
default
:
// Ignore all wheel commands from outside the vertical
break
;
// scroll bar. Otherwise after a scroll we might land on
}
// a spin field and subsequent wheel events would change
}
// the value of that control.
return
Window
::
Notify
(
rEvent
);
}
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
())
if
(
rEvent
.
GetWindow
()
!=
mpVerticalScrollBar
.
get
())
return
sal_T
rue
;
return
t
rue
;
// Get the wheel data and check that it describes a valid
// Get the wheel data and check that it describes a valid vertical
// vertical
scroll.
//
scroll.
const
CommandWheelData
*
pData
=
pCommandEvent
->
GetWheelData
();
const
CommandWheelData
*
pData
=
pCommandEvent
->
GetWheelData
();
if
(
pData
==
NULL
if
(
pData
==
NULL
||
pData
->
GetModifier
()
||
pData
->
GetModifier
()
||
pData
->
GetMode
()
!=
COMMAND_WHEEL_SCROLL
||
pData
->
GetMode
()
!=
COMMAND_WHEEL_SCROLL
||
pData
->
IsHorz
())
||
pData
->
IsHorz
())
return
sal_F
alse
;
return
f
alse
;
// Execute the actual scroll action.
// Execute the actual scroll action.
long
nDelta
=
pData
->
GetDelta
();
long
nDelta
=
pData
->
GetDelta
();
mpVerticalScrollBar
->
DoScroll
(
mpVerticalScrollBar
->
DoScroll
(
mpVerticalScrollBar
->
GetThumbPos
()
-
nDelta
);
mpVerticalScrollBar
->
GetThumbPos
()
-
nDelta
);
return
sal_True
;
return
true
;
}
default
:
break
;
}
return
sal_False
;
}
}
...
...
sfx2/source/sidebar/Deck.hxx
Dosyayı görüntüle @
0a5d252c
...
@@ -104,8 +104,9 @@ private:
...
@@ -104,8 +104,9 @@ private:
::
boost
::
scoped_ptr
<
ScrollBar
>
mpVerticalScrollBar
;
::
boost
::
scoped_ptr
<
ScrollBar
>
mpVerticalScrollBar
;
DECL_LINK
(
HandleVerticalScrollBarChange
,
void
*
);
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)
...
@@ -559,6 +559,10 @@ IMPL_LINK(FocusManager, WindowEventListener, VclSimpleEvent*, pEvent)
case
VCLEVENT_WINDOW_GETFOCUS
:
case
VCLEVENT_WINDOW_GETFOCUS
:
case
VCLEVENT_WINDOW_LOSEFOCUS
:
case
VCLEVENT_WINDOW_LOSEFOCUS
:
pSource
->
Invalidate
();
pSource
->
Invalidate
();
return
1
;
default
:
break
;
}
}
return
0
;
return
0
;
...
@@ -613,14 +617,14 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
...
@@ -613,14 +617,14 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
break
;
break
;
}
}
}
}
break
;
return
1
;
}
}
default
:
default
:
break
;
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