From: Robert Roebling Date: Sun, 10 Feb 2002 13:54:59 +0000 (+0000) Subject: wxX11 might compile now. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/178572bba583f5bd0096a3203acfe8128af0de6b?hp=68e422780fbb3b6fcb14e9de1409ffe0a571ec68 wxX11 might compile now. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index 5b1884f49f..f69390496a 100755 --- a/configure +++ b/configure @@ -19468,15 +19468,22 @@ EOF fi if test "$wxUSE_CLIPBOARD" = "yes"; then - cat >> confdefs.h <<\EOF + if test "$wxUSE_X11" = 1; then + echo "configure: warning: Clipboard not yet supported under X11... disabled" 1>&2 + wxUSE_CLIPBOARD=no + fi + + if test "$wxUSE_CLIPBOARD" = "yes"; then + cat >> confdefs.h <<\EOF #define wxUSE_CLIPBOARD 1 EOF - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define wxUSE_DATAOBJ 1 EOF + fi fi if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then @@ -19856,10 +19863,14 @@ if test "$wxUSE_TOOLTIPS" = "yes"; then if test "$wxUSE_UNIVERSAL" = "yes"; then echo "configure: warning: wxTooltip not supported yet in wxUNIVERSAL... disabled" 1>&2 else - cat >> confdefs.h <<\EOF + if test "$wxUSE_X11" = "1"; then + echo "configure: warning: wxTooltip not supported yet under X11... disabled" 1>&2 + else + cat >> confdefs.h <<\EOF #define wxUSE_TOOLTIPS 1 EOF + fi fi fi fi @@ -20358,7 +20369,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:20362: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:20373: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/configure.in b/configure.in index cea0d9ecfb..fa1ee8a609 100644 --- a/configure.in +++ b/configure.in @@ -4059,10 +4059,17 @@ if test "$wxUSE_IPC" = "yes"; then fi if test "$wxUSE_CLIPBOARD" = "yes"; then - AC_DEFINE(wxUSE_CLIPBOARD) + if test "$wxUSE_X11" = 1; then + AC_MSG_WARN([Clipboard not yet supported under X11... disabled]) + wxUSE_CLIPBOARD=no + fi + + if test "$wxUSE_CLIPBOARD" = "yes"; then + AC_DEFINE(wxUSE_CLIPBOARD) - dnl required by clipboard code in configuration check - AC_DEFINE(wxUSE_DATAOBJ) + dnl required by clipboard code in configuration check + AC_DEFINE(wxUSE_DATAOBJ) + fi fi if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then @@ -4332,7 +4339,11 @@ if test "$wxUSE_TOOLTIPS" = "yes"; then if test "$wxUSE_UNIVERSAL" = "yes"; then AC_MSG_WARN([wxTooltip not supported yet in wxUNIVERSAL... disabled]) else - AC_DEFINE(wxUSE_TOOLTIPS) + if test "$wxUSE_X11" = "1"; then + AC_MSG_WARN([wxTooltip not supported yet under X11... disabled]) + else + AC_DEFINE(wxUSE_TOOLTIPS) + fi fi fi fi diff --git a/src/x11/timer.cpp b/src/x11/timer.cpp index ec9eaedb10..8de4e9a9a6 100644 --- a/src/x11/timer.cpp +++ b/src/x11/timer.cpp @@ -62,9 +62,12 @@ void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, unsigned long when) { if ( desc->running ) return; // already scheduled - + +#pragma +#if 0 if ( when == 0 ) when = wxGetLocalTimeMillis() + desc->timer->GetInterval(); +#endif desc->shotTime = when; desc->running = TRUE; @@ -106,7 +109,11 @@ void wxTimerScheduler::NotifyTimers() { bool oneShot; volatile bool timerDeleted; - unsigned long now = wxGetLocalTimeMillis(); +#pragma + unsigned long now; +#if 0 + now = wxGetLocalTimeMillis(); +#endif wxTimerDesc *desc; while ( m_timers && m_timers->shotTime <= now ) diff --git a/src/x11/window.cpp b/src/x11/window.cpp index e1c2154809..6745c51afc 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -172,15 +172,11 @@ bool wxWindowX11::Create(wxWindow *parent, wxWindowID id, int h = size.GetHeight(); int x = size.GetX(); int y = size.GetY(); - int h = size.GetHeight(); - if (w == -1) w = 10; - if (h == -1) h = 10; + if (w == -1) w = 20; + if (h == -1) h = 20; if (x == -1) x = 0; if (y == -1) y = 0; - int innerWidth = w - 2*m_borderSize; - int innerHeight = h - 2*m_borderSize; - int screen = DefaultScreen(wxGlobalDisplay()); Window parentWindow; @@ -189,8 +185,8 @@ bool wxWindowX11::Create(wxWindow *parent, wxWindowID id, else parentWindow = RootWindow(wxGlobalDisplay(), screen); - Widget window = XCreateSimpleWindow(wxGlobalDisplay(), - x, y, innerWidth, innerHeight, borderWidth, + Window window = XCreateSimpleWindow(wxGlobalDisplay(), parentWindow, + x, y, w, h, m_borderSize, m_backgroundColour.AllocColour(wxGlobalDisplay()), m_foregroundColour.AllocColour(wxGlobalDisplay())); @@ -201,12 +197,10 @@ bool wxWindowX11::Create(wxWindow *parent, wxWindowID id, KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask | PropertyChangeMask); - m_mainWindow = (WXWindow) window; - wxAddWindowToTable(window, (wxWindow*) this); // If a subwindow, show. - if (parent && !parent->IsKindOf(CLASSINFO(wxTopLevelWindowX11)) && parent->IsShown()) +// if (parent && !parent->IsKindOf(CLASSINFO(wxTopLevelWindowX11)) && parent->IsShown()) { m_isShown = TRUE; XMapWindow(wxGlobalDisplay(), window); @@ -305,7 +299,7 @@ wxWindowX11::~wxWindowX11() XSelectInput(wxGlobalDisplay(), (Window) GetMainWindow(), NoEventMask); wxDeleteWindowFromTable((Window) GetMainWindow()); - XDestroyWindow((Window) GetMainWindow()); + XDestroyWindow(wxGlobalDisplay(), (Window) GetMainWindow()); SetMainWindow((WXWindow) NULL); } } @@ -448,6 +442,7 @@ void wxWindowX11::DestroyScrollbar(wxOrientation orientation) void wxWindowX11::SetFocus() { +#if 0 Window wMain = (Window) GetMainWidget(); if (wMain) { @@ -458,6 +453,7 @@ void wxWindowX11::SetFocus() wmhints.input = True; XSetWMHints(wxGlobalDisplay(), wMain, &wmhints) } +#endif } // Get the window with the focus @@ -558,7 +554,7 @@ void wxWindowX11::DoReleaseMouse() if ( !m_winCaptured ) return; - Widget wMain = (Widget)GetMainWidget(); + Window wMain = (Window)GetMainWindow(); // TODO: should we also call XUngrabButton, XUngrabKeyboard? if ( wMain ) @@ -1075,7 +1071,7 @@ void wxWindowX11::DoSetSize(int x, int y, int width, int height, int sizeFlags) windowChanges.height = height - m_borderSize*2; valueMask |= CWHeight; } - AdjustForParentClientOrigin(valueMask.x, valueMask.y, sizeFlags); + AdjustForParentClientOrigin( x, y, sizeFlags); XConfigureWindow(wxGlobalDisplay(), (Window) GetMainWindow(), valueMask, & windowChanges); @@ -1150,7 +1146,7 @@ void wxWindowX11::SetSizeHints(int minW, int minH, int maxW, int maxH, int incW, sizeHints.height_inc = incH; } - XSetWMNormalHints(wxGlobalDisplay(), (Window) GetMainWindow(), & sizeHints) + XSetWMNormalHints(wxGlobalDisplay(), (Window) GetMainWindow(), & sizeHints); } void wxWindowX11::DoMoveWindow(int x, int y, int width, int height)