Author Topic: Strange behavior of C::B over xming.  (Read 956 times)

Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Strange behavior of C::B over xming.
« on: April 20, 2017, 05:24:38 pm »
Hello everyone,

Hopefully someone has encountered this and can direct me how to fix this annoying issue.  I'm using xming to connect to a centos 7 server and run the linux version of 64 bit codeblocks: 16.01 rev 10695 over X11.  Everything works great on the windows side with one very annoying problem.

The issue is that when using CTRL-space to try to code complete anything, the results popup seems to be pushed behind the main window.  The second popup that appears describing the selection in the first popup stays above.  Took me a while to realize what was occurring.  For about half a day i tried every single setting in code completion in the end thinking it was broken.  Then by accident i find this weird behavior and i'm attaching some screen shots that should illustrate the situation.  To put it in words: once i hit ctrl-space i can then move the main codeblocks window to uncover the missing popup.  I thought this was an xming problem but i also tried cygwin/x and it has the same problem. I tried updating my video card drivers and also a multitude of settings of Xserver and have not been able to resolve this issue.  I have a quad monitor setup with dual Nvidia GeForce 8600 GT cards.

Please let me know if there is anything i can post to help the issue along.

Thanks!

EDIT 1:
I installed netbeans 8.2 and tried running that through xming, it seems they use a very similar looking popup but theirs works fine.  I would much rather use C::B.  This may be some kind of bug but i have no idea what to even write in a bug report.

EDIT 2: I am also going to try to go through xming "support" if the creator has any suggestions or possibly has encountered this before.  I will post that information if i get any help there.
« Last Edit: April 20, 2017, 06:45:51 pm by shredluc »

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1415
Re: Strange behavior of C::B over xming.
« Reply #1 on: April 21, 2017, 10:58:45 am »
this is probably a wx / xming problem. Can you try some other wxWIdgets application with xming? At the moment i have no idea in what wxWidgets application they use the same control as in codeblocks....

Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange behavior of C::B over xming.
« Reply #2 on: April 21, 2017, 05:59:31 pm »
That is a great idea, didn't think of it.

Tried installing codelite (looks like a C::B rip-off) but couldn't get it running on centos7 from the rpm, which is a bummer because that would have been an apples to apples comparison.  Instead built it from source code and lo and behold it works. 

This got me thinking: my C::B install is from rpm, based on the previous sentence, i am going to build CB from source....Ok built against gtk2 and wxwidgets 2.8.12.  It fails in the same exact way as the rpm release of CB.  I wonder if i can possibly rebuild using gtk3?

tried audacity which is based on wx but i couldn't find any similar pop-up functionality there, otherwise it ran perfect.
tried writerscafe which is also based on wx, also couldn't find a pop-up anywhere, otherwise it also ran perfect.
tried wxHexEditor, wx based, single pop-up's work fine, custom "tags" in hex pop up just fine, couldn't get two tags to pop up at the same time to see if one disappears or gets pushed behind, otherwise ran perfect.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10118
Re: Strange behavior of C::B over xming.
« Reply #3 on: April 21, 2017, 06:31:49 pm »
What version of wxgtk do you use for all experiments? Is it the same?
<debugger plugin maintainer>
(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!]

Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange behavior of C::B over xming.
« Reply #4 on: April 21, 2017, 06:40:53 pm »
Yes i only use one version of gtk:

[root@bt2mgmt ~]# yum info wxGTK
Loaded plugins: auto-update-debuginfo, fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.constant.com
 * epel: mirror.steadfast.net
 * epel-debuginfo: mirror.steadfast.net
 * extras: mirrors.gigenet.com
 * rpmforge: mirror.team-cymru.org
 * rpmforge-extras: mirror.team-cymru.org
 * updates: mirror.steadfast.net
Installed Packages
Name        : wxGTK
Arch        : x86_64
Version     : 2.8.12
Release     : 20.el7
Size        : 12 M
Repo        : installed
From repo   : epel
Summary     : GTK2 port of the wxWidgets GUI library
URL         : http://www.wxwidgets.org/
License     : wxWidgets
Description : wxWidgets/GTK2 is the GTK2 port of the C++ cross-platform wxWidgets
            : GUI library, offering classes for all common GUI controls as well as a
            : comprehensive set of helper classes for most common application tasks,
            : ranging from networking to HTML display and image manipulation.

This has been the only version of wxGTK installed during the tests described in the previous post.

I do have a wxGTK 3 version available to me:

[root@bt2mgmt ~]# yum info wxGTK3
Loaded plugins: auto-update-debuginfo, fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.constant.com
 * epel: mirror.steadfast.net
 * epel-debuginfo: mirror.steadfast.net
 * extras: mirrors.gigenet.com
 * rpmforge: mirror.team-cymru.org
 * rpmforge-extras: mirror.team-cymru.org
 * updates: mirror.steadfast.net
Available Packages
Name        : wxGTK3
Arch        : x86_64
Version     : 3.0.2
Release     : 15.el7
Size        : 4.8 M
Repo        : epel/x86_64
Summary     : GTK port of the wxWidgets GUI library
URL         : http://www.wxwidgets.org/
License     : wxWidgets
Description : wxWidgets is the GTK port of the C++ cross-platform wxWidgets
            : GUI library, offering classes for all common GUI controls as well as a
            : comprehensive set of helper classes for most common application tasks,
            : ranging from networking to HTML display and image manipulation.




Thank you for interest in my problem.  Please let me know if there is anything i can do to help troubleshoot this.  I really appreciate the time anyone may take to think about this problem.

Thanks again!
« Last Edit: April 21, 2017, 06:42:46 pm by shredluc »

Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange behavior of C::B over xming.
« Reply #5 on: April 28, 2017, 04:08:03 pm »
Well i've discovered another piece of the puzzle, hopefully.

I've temporarily moved on to Netbeans, which sucks in my opinion, but i digress.  Have to move forward with development.

On the other hand when i get 10 minutes i try to figure it out and i've noticed this:

When only a single code complete window pops up it's fine. So trying to do a #include and hitting ctrl-space pops up the code complete popup and it stays there.  Only when a "documentation" window tries to pop up does the first list go to the background.  Is there a way to force the documentation window to be docked and not pop up?  This might be a temporary solution.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1415
Re: Strange behavior of C::B over xming.
« Reply #6 on: April 28, 2017, 09:46:06 pm »
What if you deactivate the documentation window?
Settings->Editor->Code completion ..... don't remember the exact path...

Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange behavior of C::B over xming.
« Reply #7 on: April 29, 2017, 03:10:18 am »
I have not been able to find the setting to turn that off anywhere in Settings->Editor->Code Completion

believe me i have toggled every setting there and none of them turn off the documentation window.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5870
    • My Best Post
Re: Strange behavior of C::B over xming.
« Reply #8 on: April 29, 2017, 04:28:16 am »
Settings->Editor->Code Completion

Did you try un-checking "Parse Documentation" under "Documentation" Tab.

Edit: I never use Code Completion; so, the above is just a guess.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange behavior of C::B over xming.
« Reply #9 on: April 29, 2017, 10:03:49 pm »
Hi,

Thanks for the location, i found it last night also, just have not had time to post an update.  Well turning off the documentation window did the trick.  Now the primary window with all the completions stays put and is not forced into the background.  I have no idea if this helps anyone fix this issue, or even if there is an issue to be fixed.  Now i wish there was a way to dock a documentation window to the side of code blocks.  This beggar can't be a chooser.   ;D

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1415
Re: Strange behavior of C::B over xming.
« Reply #10 on: April 30, 2017, 12:04:33 pm »
Are you able to build codeblocks, and test patches?
I have not the possibility to set up a environment like yours, and it is difficult/impossible  to fix this by guessing...


Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange behavior of C::B over xming.
« Reply #11 on: May 01, 2017, 03:57:55 pm »
Yes, absolutely, i am able and willing to build and test patches.

In fact i thought that maybe the pre-built version has some issue so i actually built a version from source and that also had this behavior.

I know my setup is a completely borderline use case, but i am totally up for helping make codeblocks better.

EDIT:
 I just wanted to clarify, un-checking the "parse-documentation" under Settings->Editor->Code completion->Documentation (tab) -> Parse Documentation (checkbox)  did not change the behavior.

What did change the behavior was this:
Settings->Editor->General settings->Documentation popup (checkbox in code completion block) 

Once that is not checked then obviously the documentation popup does not happen and so the code completion list stays put.
« Last Edit: May 01, 2017, 04:16:34 pm by shredluc »

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1415
Re: Strange behavior of C::B over xming.
« Reply #12 on: May 06, 2017, 10:19:27 am »
After a quick search in the code completion code i think you have problems with the class UnfocusablePopupWindow. There is a conditional compiling in there. Can you check what class  you use?
The related file is src\sdk\ccmanager.h:149
Can you check if the behavior is different if you swap the conditional compiling: Use wxFrame if wxPopupWindow is used.

Offline shredluc

  • Single posting newcomer
  • *
  • Posts: 8
Re: Strange behavior of C::B over xming.
« Reply #13 on: May 09, 2017, 08:58:59 pm »
so there was no ccmanager.h in src\sdk\, but there was a .cpp file which i take is what you meant.  Taking what you wrote about the conditional compiling literally i commented out the sections that would be used if wxUSE_POPUPWIN was defined:

Code: [Select]
// imported with small changes from PlatWX.cpp
class UnfocusablePopupWindow :
//#if wxUSE_POPUPWIN
//    public wxPopupWindow
//#else
     public wxFrame
//#endif // wxUSE_POPUPWIN
{
public:
//#if wxUSE_POPUPWIN
//    typedef wxPopupWindow BaseClass;

  //  UnfocusablePopupWindow(wxWindow* parent, int style = wxBORDER_NONE) :
    //    wxPopupWindow(parent, style)
//#else
    typedef wxFrame BaseClass;

    UnfocusablePopupWindow(wxWindow* parent, int style = 0) :
        wxFrame(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                style | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxNO_BORDER | wxFRAME_SHAPED
#ifdef __WXMAC__
                | wxPOPUP_WINDOW
#endif // __WXMAC__
                )
//#endif // wxUSE_POPUPWIN


Then i ran make, it compiled just fine.  Ran codeblocks and this time the popup windows appear for a split second and then completely disappear.  They do not get pushed to the background.

As an aside if i disable the Documentation popup at Settings->Editor..->General settings->Documentation popup
the single popup window stays on top just fine in either compiled version (with and without the edit i did)

If i did not do what you wanted me to do ill try again.