News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

wxScintilla and wx2.8

Started by Commaster, May 21, 2018, 09:32:51 AM

Previous topic - Next topic

Commaster

Looks like one of the recent wxScintilla merge broke wx2.8 compatibility:


src/PlatWX.cpp: In member function 'void Window::SetPositionRelative(PRectangle, Window)':
src/PlatWX.cpp:1908:32: error: 'wxDisplay' has not been declared
     const int currentDisplay = wxDisplay::GetFromWindow(relativeWin);
                                ^
src/PlatWX.cpp:1909:56: error: 'wxDisplay' was not declared in this scope
     const wxRect displayRect = wxDisplay(currentDisplay).GetClientArea();
                                                        ^


Are we officially moving to wx3.0 and above?

oBFusCATed

Quote from: Commaster on May 21, 2018, 09:32:51 AM
Looks like one of the recent wxScintilla merge broke wx2.8 compatibility:

It builds fine for me with wx2.8.12 on gentoo and centos.
It seems the wxDisplay subsystem in your wx build is disabled.

Quote from: Commaster on May 21, 2018, 09:32:51 AM
Are we officially moving to wx3.0 and above?
It will be good if we drop wx2.8, but we've not done so yet.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Commaster

#2
Quote from: oBFusCATed on May 21, 2018, 09:48:03 AM
It seems the wxDisplay subsystem in your wx build is disabled.

Interesting... I haven't touched the build script in ages...

../../configure --disable-compat26 --enable-unicode --disable-sys-libs --enable-monolithic --with-gtk=2 --with-jpeg=builtin --with-libpng=builtin --with-regex=builtin --with-tiff=builtin --with-zlib=builtin --with-expat=builtin


Does it need an extra toggle?

(I do have the display.h in the install directory... weird)

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Commaster

I've added that flag, but the setup.h still says #define wxUSE_DISPLAY 0

I'll have to dig into the wx src to figure out why this is happening.

Thanks for the suggestion!  :)

oBFusCATed

You can use the patch attached here: http://trac.wxwidgets.org/ticket/18115 (after modifying it to match the source locations in cb's repo).
But generally you want to have wxdisplay working. It will make you're user experience a lot better.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

From wxWidgets configure.in
AC_MSG_WARN([Xinerama not found; disabling wxDisplay])


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

Quote from: oBFusCATed on May 22, 2018, 09:37:53 PM
But generally you want to have wxdisplay working. It will make you're user experience a lot better.

I am guessing this is mostly only true if you have multiple monitors; is this correct?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Nope, it improves experience in single monitor settings.
The the bug from the link happens on a single monitor machine.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Commaster

Feels like a bug in the wxWidgets 2.8 branch:

I have Xinerama installed, but the default install path for the .so on *Ubuntu is /usr/lib/x86_64-linux-gnu/.

Debugging the configure script showed, that the search paths for libs are:

/usr/local/lib
/usr/local/X11/lib
/usr/local/lib/X11
/usr/local/X11R6/lib
/usr/local/lib/X11R6
/usr/Motif-2.1/lib
/usr/Motif-1.2/lib
/usr/lib/Motif1.2
/usr/dt/lib
/usr/openwin/lib
/usr/lib/Xm
/usr/X11R6/lib
/usr/X11R6.4/lib
/usr/lib/X11R6
/usr/X11/lib
/usr/lib/X11
/usr/XFree86/lib/X11
/usr/pkg/lib
/usr/local/X1R5/lib
/usr/local/lib/X11R5
/usr/X11R5/lib
/usr/lib/X11R5
/usr/local/X11R4/lib
/usr/local/lib/X11R4
/usr/X11R4/lib
/usr/lib/X11R4
/usr/openwin/share/lib
/usr/lib


Basically everywhere BUT the right location. I don't think my shell-script-fu is strong enough to untangle the mess of $SEARCH_LIB.

Also looking at wx3.0+ configure shows that it no longer checks for Xinerama  :-\

Commaster

#10
nvm, got it working after this patch for the wx2.8 source:

diff --git a/configure b/configure
index f2ba453158..86ede0018a 100755
--- a/configure
+++ b/configure
@@ -24947,9 +24947,9 @@ SEARCH_INCLUDE="\
                               \
     /usr/dt/include           \
     /usr/openwin/include      \
-                              \
+    /usr/include              \
     /usr/include/Xm           \
-                              \
+    /usr/include/x86_64-linux-gnu \
     /usr/X11R6/include        \
     /usr/X11R6.4/include      \
                               \
diff --git a/configure.in b/configure.in
index b73abca3c5..4c9492e7ed 100644
--- a/configure.in
+++ b/configure.in
@@ -2652,9 +2652,9 @@ SEARCH_INCLUDE="\
                               \
     /usr/dt/include           \
     /usr/openwin/include      \
-                              \
+    /usr/include              \
     /usr/include/Xm           \
-                              \
+    /usr/include/x86_64-linux-gnu \
     /usr/X11R6/include        \
     /usr/X11R6.4/include      \
                               \


@oBFusCATed: while you are at it, please add "_T" in the last StartsWith-s in the rev 11411. Cheers.