projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prevent explicitly set client size from being changed when frame extents become known
[wxWidgets.git]
/
src
/
x11
/
window.cpp
diff --git
a/src/x11/window.cpp
b/src/x11/window.cpp
index a2ea6261c2beb33013ba5f7ee57a1e0fc2553312..0c69ed36f656c36a3e6cc5ebdd16bb61ef270a36 100644
(file)
--- a/
src/x11/window.cpp
+++ b/
src/x11/window.cpp
@@
-122,6
+122,11
@@
bool wxWindowX11::Create(wxWindow *parent, wxWindowID id,
{
wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") );
{
wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") );
+ // Get default border
+ wxBorder border = GetBorder(style);
+ style &= ~wxBORDER_MASK;
+ style |= border;
+
CreateBase(parent, id, pos, size, style, wxDefaultValidator, name);
parent->AddChild(this);
CreateBase(parent, id, pos, size, style, wxDefaultValidator, name);
parent->AddChild(this);
@@
-160,9
+165,11
@@
bool wxWindowX11::Create(wxWindow *parent, wxWindowID id,
if (pos2.y == wxDefaultCoord)
pos2.y = 0;
if (pos2.y == wxDefaultCoord)
pos2.y = 0;
+ AdjustForParentClientOrigin(pos2.x, pos2.y);
+
#if wxUSE_TWO_WINDOWS
bool need_two_windows =
#if wxUSE_TWO_WINDOWS
bool need_two_windows =
- ((( wxSUNKEN_BORDER | wxRAISED_BORDER | wxSIMPLE_BORDER | wxHSCROLL | wxVSCROLL ) & m_windowStyle) != 0);
+ ((( wxSUNKEN_BORDER | wx
BORDER_THEME | wx
RAISED_BORDER | wxSIMPLE_BORDER | wxHSCROLL | wxVSCROLL ) & m_windowStyle) != 0);
#else
bool need_two_windows = false;
#endif
#else
bool need_two_windows = false;
#endif
@@
-228,7
+235,7
@@
bool wxWindowX11::Create(wxWindow *parent, wxWindowID id,
}
#endif
}
#endif
- if (HasFlag(
wxSUNKEN_BORDER) || HasFlag( wxRAISED_BORDER
))
+ if (HasFlag(
wxSUNKEN_BORDER) || HasFlag(wxRAISED_BORDER) || HasFlag(wxBORDER_THEME
))
{
pos2.x = 2;
pos2.y = 2;
{
pos2.x = 2;
pos2.y = 2;
@@
-674,8
+681,8
@@
void wxWindowX11::ScrollWindow(int dx, int dy, const wxRect *rect)
if (dx < 0) s_x += -dx;
if (dy < 0) s_y += -dy;
if (dx < 0) s_x += -dx;
if (dy < 0) s_y += -dy;
- if (dx > 0) d_x = dx + offset.x;
- if (dy > 0) d_y = dy + offset.y;
+ if (dx > 0) d_x
+
= dx + offset.x;
+ if (dy > 0) d_y
+
= dy + offset.y;
XCopyArea( xdisplay, xwindow, xwindow, xgc, s_x, s_y, w, h, d_x, d_y );
XCopyArea( xdisplay, xwindow, xwindow, xgc, s_x, s_y, w, h, d_x, d_y );
@@
-1204,7
+1211,7
@@
void wxWindowX11::SendEraseEvents()
wxEraseEvent erase_event( GetId(), &dc );
erase_event.SetEventObject( this );
wxEraseEvent erase_event( GetId(), &dc );
erase_event.SetEventObject( this );
- if (!
GetEventHandler()->Process
Event(erase_event) )
+ if (!
HandleWindow
Event(erase_event) )
{
Display *xdisplay = wxGlobalDisplay();
Window xwindow = (Window) GetClientAreaWindow();
{
Display *xdisplay = wxGlobalDisplay();
Window xwindow = (Window) GetClientAreaWindow();
@@
-1230,7
+1237,7
@@
void wxWindowX11::SendPaintEvents()
wxPaintEvent paint_event( GetId() );
paint_event.SetEventObject( this );
wxPaintEvent paint_event( GetId() );
paint_event.SetEventObject( this );
-
GetEventHandler()->Process
Event( paint_event );
+
HandleWindow
Event( paint_event );
m_updateRegion.Clear();
m_updateRegion.Clear();
@@
-1272,7
+1279,7
@@
void wxWindowX11::SendNcPaintEvents()
wxNcPaintEvent nc_paint_event( GetId() );
nc_paint_event.SetEventObject( this );
wxNcPaintEvent nc_paint_event( GetId() );
nc_paint_event.SetEventObject( this );
-
GetEventHandler()->Process
Event( nc_paint_event );
+
HandleWindow
Event( nc_paint_event );
m_updateNcArea = false;
}
m_updateNcArea = false;
}
@@
-1293,7
+1300,7
@@
void wxWindowX11::OnSysColourChanged(wxSysColourChangedEvent& event)
{
wxSysColourChangedEvent event2;
event.SetEventObject(win);
{
wxSysColourChangedEvent event2;
event.SetEventObject(win);
- win->
GetEventHandler()->Process
Event(event2);
+ win->
HandleWindow
Event(event2);
}
node = node->GetNext();
}
node = node->GetNext();
@@
-1310,7
+1317,7
@@
void wxWindowX11::OnInternalIdle()
// This calls the UI-update mechanism (querying windows for
// menu/toolbar/control state information)
// This calls the UI-update mechanism (querying windows for
// menu/toolbar/control state information)
- if (wxUpdateUIEvent::CanUpdate((wxWindow*) this))
+ if (wxUpdateUIEvent::CanUpdate((wxWindow*) this)
&& IsShown()
)
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
// Set the input focus if couldn't do it before
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
// Set the input focus if couldn't do it before
@@
-1414,7
+1421,10
@@
WXWindow wxWindowX11::GetClientAreaWindow() const
// TranslateXXXEvent() functions
// ----------------------------------------------------------------------------
// TranslateXXXEvent() functions
// ----------------------------------------------------------------------------
-bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent)
+bool wxTranslateMouseEvent(wxMouseEvent& wxevent,
+ wxWindow *win,
+ Window WXUNUSED(window),
+ XEvent *xevent)
{
switch (XEventGetType(xevent))
{
{
switch (XEventGetType(xevent))
{
@@
-1646,7
+1656,8
@@
wxWindow *wxWindowBase::GetCapture()
// position.
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
{
// position.
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
{
- return wxFindWindowAtPoint(wxGetMousePosition());
+ pt = wxGetMousePosition();
+ return wxFindWindowAtPoint(pt);
}
void wxGetMouseState(int& rootX, int& rootY, unsigned& maskReturn)
}
void wxGetMouseState(int& rootX, int& rootY, unsigned& maskReturn)