Author Topic: [10.05-Linux]-GUI Application Does Not Exit?  (Read 5180 times)

Offline JeZ-l-Lee

  • Single posting newcomer
  • *
  • Posts: 9
[10.05-Linux]-GUI Application Does Not Exit?
« on: February 20, 2012, 02:44:12 pm »
[10.05-Linux]-"GUI Application" Does Not Exit?

Hi,

Been using Code::Blocks for years and love it!

I recently switched from Windows(R) to Linux.
I installed Code::Blocks for Linux and am starting to use it.

I have a problem with Code::Blocks in Linux.
When I set project to "GUI Application" and run the application
and try to close the application, it does not close and freezes?
(have to go into "System Monitor" and kill it?)

The workaround is to set it to "Console Application".
Anyone know why this is happening?
Thanks!

Running Code::Blocks 10.05 on LinuxMint 12 KDE 64Bit.

Jesse

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: [10.05-Linux]-GUI Application Does Not Exit?
« Reply #1 on: February 20, 2012, 03:00:16 pm »
You have to handle the onclose/onexit event. But please inspect the documentation for the gui toolkit you're using.
(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 JeZ-l-Lee

  • Single posting newcomer
  • *
  • Posts: 9
Re: [10.05-Linux]-GUI Application Does Not Exit?
« Reply #2 on: February 20, 2012, 03:04:27 pm »
You have to handle the onclose/onexit event. But please inspect the documentation for the gui toolkit you're using.
Hi,

I don't understand.

I develop video games using Code::Blocks.
On Windows(R), I can set the game to "GUI Application"
and it does close properly in Code::Blocks.
But on Linux, when I set game to "GUI Application"
it does not close in Code::Blocks and freezes?

This is not a bug in Code::Blocks?

Thanks!

Jesse

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: [10.05-Linux]-GUI Application Does Not Exit?
« Reply #3 on: February 20, 2012, 03:13:55 pm »
What happens if you run your application from a console or from .desktop file?

p.s. on linux there is no distinction between console and gui applications as is done on windows.
(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 JeZ-l-Lee

  • Single posting newcomer
  • *
  • Posts: 9
Re: [10.05-Linux]-GUI Application Does Not Exit?
« Reply #4 on: February 20, 2012, 03:17:24 pm »
What happens if you run your application from a console or from .desktop file?

p.s. on linux there is no distinction between console and gui applications as is done on windows.
Hi,

When I run the executable built with Code::Blocks in console, it does close properly.
Only when I run it in Code::Blocks using "GUI Application" it does not close?

Thanks!

Jesse

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: [10.05-Linux]-GUI Application Does Not Exit?
« Reply #5 on: February 20, 2012, 04:37:19 pm »
Code::Blocks is an IDE, not a compiler.
If your program does not close correctly, it is most likely a problem with your code.

How to exit your program correctly, depends very much on the toolkit you use, as oBFusCATed has posted.

So with this less information, it's not possible to give you meaningful help.