Forgot to move update and clear regions when scrolling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -227,7 +227,7 @@ void wxWindowX11::SetFocus()
|
|||||||
|
|
||||||
if (wxWindowIsVisible(xwindow))
|
if (wxWindowIsVisible(xwindow))
|
||||||
{
|
{
|
||||||
XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToParent, CurrentTime );
|
// XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToParent, CurrentTime );
|
||||||
m_needsInputFocus = FALSE;
|
m_needsInputFocus = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -253,6 +253,19 @@ wxWindow *wxWindowBase::FindFocus()
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxWindow *wxWindowX11::GetFocusWidget()
|
||||||
|
{
|
||||||
|
wxWindow *win = (wxWindow*) this;
|
||||||
|
while (!win->IsTopLevel())
|
||||||
|
{
|
||||||
|
win = win->GetParent();
|
||||||
|
if (!win)
|
||||||
|
return (wxWindow*) NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return win;
|
||||||
|
}
|
||||||
|
|
||||||
// Enabling/disabling handled by event loop, and not sending events
|
// Enabling/disabling handled by event loop, and not sending events
|
||||||
// if disabled.
|
// if disabled.
|
||||||
bool wxWindowX11::Enable(bool enable)
|
bool wxWindowX11::Enable(bool enable)
|
||||||
@@ -460,6 +473,29 @@ void wxWindowX11::WarpPointer (int x, int y)
|
|||||||
// Does a physical scroll
|
// Does a physical scroll
|
||||||
void wxWindowX11::ScrollWindow(int dx, int dy, const wxRect *rect)
|
void wxWindowX11::ScrollWindow(int dx, int dy, const wxRect *rect)
|
||||||
{
|
{
|
||||||
|
// No scrolling requested.
|
||||||
|
if ((dx == 0) && (dy == 0)) return;
|
||||||
|
|
||||||
|
if (!m_updateRegion.IsEmpty())
|
||||||
|
{
|
||||||
|
m_updateRegion.Offset( dx, dy );
|
||||||
|
|
||||||
|
int cw = 0;
|
||||||
|
int ch = 0;
|
||||||
|
GetSize( &cw, &ch ); // GetClientSize() ??
|
||||||
|
m_updateRegion.Intersect( 0, 0, cw, ch );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_clearRegion.IsEmpty())
|
||||||
|
{
|
||||||
|
m_clearRegion.Offset( dx, dy );
|
||||||
|
|
||||||
|
int cw = 0;
|
||||||
|
int ch = 0;
|
||||||
|
GetSize( &cw, &ch ); // GetClientSize() ??
|
||||||
|
m_clearRegion.Intersect( 0, 0, cw, ch );
|
||||||
|
}
|
||||||
|
|
||||||
Window xwindow = (Window) GetMainWindow();
|
Window xwindow = (Window) GetMainWindow();
|
||||||
|
|
||||||
wxCHECK_RET( xwindow, wxT("invalid window") );
|
wxCHECK_RET( xwindow, wxT("invalid window") );
|
||||||
|
Reference in New Issue
Block a user