User forums > Nightly builds

The 12 January 2019 build (11552) is out.

<< < (7/10) > >>

oBFusCATed:
4. Find out why flashing happens and eradicate it.  8) :o  ;D

New Pagodi:

--- Quote from: Miguel Gimenez on February 22, 2019, 11:34:40 am ---
--- Quote ---Plugins or wxAUI windows?
--- End quote ---

Will check.

The problem with wxSplashScreen is that it uses wxFRAME_TOOL_WINDOW and wxFRAME_NO_TASKBAR; both imply that no taskbar icon will be shown.

There are three possible solutions:
  1.- restore previous behaviour of the splash screen (icon in taskbar with flashing icons behind it)
  2.- no icon with splash screen and try to remove flashing icons for plugins/AUI windows
  3.- Icon with splash screen, try to remove flashing icons.

Option 1 is easy. Option 2 means no icon will be shown until the main window is opened, and may be less easy. 3 may be easy or not.

Which is the preferred way?

--- End quote ---

You can override wxWidgets' choices for window styles by calling winapi functions in the splash screen constructor.  Two things that look like they might be promising to me are to remove the WS_EX_APPWINDOW flag and add the WS_EX_NOACTIVATE flag.


--- Code: ---#ifdef __WXMSW__
    WXHWND hWnd = reinterpret_cast<WXHWND>(GetHandle());
    wxIntPtr winExStyle = ::GetWindowLongPtr(hWnd, GWL_EXSTYLE);
    winExStyle &= ~WS_EX_APPWINDOW;  // remove WS_EX_APPWINDOW flag
    winExStyle |= WS_EX_NOACTIVATE;  // add WS_EX_NOACTIVATE flag
    ::SetWindowLongPtr(hWnd, GWL_EXSTYLE, winExStyle);
#endif
--- End code ---

The documentation for SetWindowLongPtr says


--- Quote ---Certain window data is cached, so changes you make using SetWindowLongPtr will not take effect until you call the SetWindowPos function.
--- End quote ---

so you may have to add a line like this at the end


--- Code: ---    ::SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOREPOSITION|SWP_NOACTIVATE);
--- End code ---

The only problem is you'll have to add user32.lib to the link libraries. I don't know how the codeblocks build system works, so that may or may not be a big problem.

relevant references:
GetWindowLongPtr
SetWindowLongPtr

Window Styles
Extended Window Styles

SetWindowPos

Miguel Gimenez:
The icon appears and disappears when calling cbPlugin::OnAttach() within cbPlugin::Attach() (in cbplugin.cpp:73). The OnAttach() method is overriden by every plugin, so I think the problem is inside some of the plugins, probably when creating the log window.

I will explore further this weekend.

Miguel Gimenez:
The creator of the flashing icons is the compiler plugin; all the icons appears inside


--- Code: ---void CompilerGCC::DoRegisterCompilers()
--- End code ---

with one icon for every call to


--- Code: ---CompilerFactory::RegisterCompiler(new Compiler....);
--- End code ---

The RegisterCompiler method only inserts the new compiler in a list, so the problem must be inside the Compiler constructor.

EDIT: the icon appears while executing void Compiler::LoadDefaultOptions(const wxString& name, int recursion)

Miguel Gimenez:
OK, the problem is in compiler.cpp:1242. The call to wxExecute() makes the icon appear while the command is executing.
Adding the wxEXEC_HIDE_CONSOLE flag does not change anything.

EDIT: there is another call in complierMINGW.cpp:234

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version