git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35536
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-static const int SCROLL_MARGIN = 4;
-
// ----------------------------------------------------------------------------
// global variables for this module
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// global variables for this module
// ----------------------------------------------------------------------------
bool wxAddWindowToTable(Widget w, wxWindow *win)
{
bool wxAddWindowToTable(Widget w, wxWindow *win)
{
- wxWindow *oldItem = NULL;
- if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w)))
+ const long key = (long)w;
+ if ( wxWidgetHashTable->Get(key))
{
wxLogDebug("Widget table clash: new widget is %ld, %s",
{
wxLogDebug("Widget table clash: new widget is %ld, %s",
- (long)w, win->GetClassInfo()->GetClassName());
+ key, win->GetClassInfo()->GetClassName());
- wxWidgetHashTable->Put((long) w, win);
+ wxWidgetHashTable->Put(key, win);
wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)",
wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)",
- (WXWidget)w, win, win->GetClassInfo()->GetClassName());
+ w, win, win->GetClassInfo()->GetClassName());
// For repainting arbitrary windows
void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data), XEvent *event, char *)
{
// For repainting arbitrary windows
void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data), XEvent *event, char *)
{
- Window window;
- Display *display;
-
wxWindow* win = wxGetWindowFromTable(w);
if (!win)
return;
wxWindow* win = wxGetWindowFromTable(w);
if (!win)
return;
- window = (Window) win -> GetXWindow();
- display = (Display *) win -> GetXDisplay();
+ Display *display = (Display *) win -> GetXDisplay();
win->AddUpdateRect(event->xexpose.x, event->xexpose.y,
event->xexpose.width, event->xexpose.height);
win->AddUpdateRect(event->xexpose.x, event->xexpose.y,
event->xexpose.width, event->xexpose.height);