Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Window does not activate if you click inside it  (Read 13514 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Window does not activate if you click inside it
« Reply #15 on: February 11, 2014, 01:13:47 pm »
It is fixed in the source code. There will be a new release when Laurent decides to do so.

If you want it to have fixed, build from source. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hapax

  • Hero Member
  • *****
  • Posts: 3346
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Window does not activate if you click inside it
« Reply #16 on: February 11, 2014, 03:12:27 pm »
This is not fixed yet. Why isn't there a new release? Or some info/guide about this on the download site?

Quickest way to fix?
Look at my post above if you need a temporary workaround (assuming it's for Windows) to make it convenient for yourself during testing.
That said, you should probably build from the Github source if you want it to be fixed internally. I'd do it too if I didn't have enough problems building the released version last time. Me and my using stupid VS2013  >:(
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Window does not activate if you click inside it
« Reply #17 on: December 18, 2014, 09:45:22 am »
I was really excited to see 2.2 released today.  Now I'm really disappointed that this issue was not fixed in 2.2.  What gives?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
AW: Re: SFML 2.2 Released!
« Reply #18 on: December 18, 2014, 12:26:35 pm »
It is fixed, has been in source code for a long, long time. ;)

Make sure to remove old SFML libraries and make a clean rebuild.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: AW: Re: SFML 2.2 Released!
« Reply #19 on: December 18, 2014, 10:38:44 pm »
It is fixed, has been in source code for a long, long time. ;)

Make sure to remove old SFML libraries and make a clean rebuild.

I did. 

I'm using Code Blocks.  I downloaded the GCC 4.9.2 MinGW (DW2) - 32-bit version.  I changed the search directories for the compiler and linker to the new 2.2 folder.  I also deleted the folders containing older versions just to be sure.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Window does not activate if you click inside it
« Reply #20 on: December 18, 2014, 11:04:42 pm »
Works like a charm here.

Are you should you did a full & clean rebuild?

« Last Edit: December 18, 2014, 11:06:27 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Window does not activate if you click inside it
« Reply #21 on: December 19, 2014, 06:59:50 am »
Works like a charm here.

Are you should you did a full & clean rebuild?



Yes, I did a full rebuild, with the rebuild button.  Still no luck.

Should I mention that the other windows are GTK+?  They seem to behave correctly.  It's only the SFML window that's not working correctly.  When I click on the body of the SFML window, all windows lose focus, as though I had clicked empty space on the desktop.  I didn't have this problem back when I was using SFML 1.6. 

Edit: Just for fun, I tried using the "GCC 4.7.1 TDM (SJLJ) - 32-bit" instead of the "GCC 4.9.2 MinGW (DW2) - 32-bit" version of SFML.  Still didn't help.  I suppose I could try building SFML myself, I guess...
« Last Edit: December 19, 2014, 07:22:11 am by Vicker »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Window does not activate if you click inside it
« Reply #22 on: December 19, 2014, 09:28:52 am »
So you're mixing SFML with your own GTK+ windows?

What if you just used like the simplest example:

#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow window{{1024, 768}, "Test"};

        while(window.isOpen())
        {
                sf::Event event;
                while(window.pollEvent(event))
                {
                        if(event.type == sf::Event::Closed)
                                window.close();
                }

                window.clear();
                window.display();
        }
}
 
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Window does not activate if you click inside it
« Reply #23 on: December 19, 2014, 01:00:50 pm »
So you're mixing SFML with your own GTK+ windows?

What if you just used like the simplest example:

#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow window{{1024, 768}, "Test"};

        while(window.isOpen())
        {
                sf::Event event;
                while(window.pollEvent(event))
                {
                        if(event.type == sf::Event::Closed)
                                window.close();
                }

                window.clear();
                window.display();
        }
}
 

I just tried your simple example.  When I ran the code exactly as you have it, I got an error about extended initializer lists being only available with -std=c++11.  I modified the sf::RenderWindow line to instead read:

sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

as per the tutorial page on using the SFML graphics package.  This modification makes the simple example run correctly.  However, the window still suffers from the same problem as before.  The window does not regain focus by clicking in the body of the window.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Window does not activate if you click inside it
« Reply #24 on: December 19, 2014, 01:39:26 pm »
I know, I probably get rather annoying by now, but the fact that I know it got fixed and that I (and probably nobody else) can't reproduce it, still makes me question whether you're using the new libraries...
Can you download a SFML 2.2 package again and run some of the examples that come with it. Does it happen with them as well? If not you must still somehow be using the old libraries (make sure you've changed the settings for debug and release).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Window does not activate if you click inside it
« Reply #25 on: December 19, 2014, 11:57:02 pm »
I know, I probably get rather annoying by now, but the fact that I know it got fixed and that I (and probably nobody else) can't reproduce it, still makes me question whether you're using the new libraries...
Can you download a SFML 2.2 package again and run some of the examples that come with it. Does it happen with them as well? If not you must still somehow be using the old libraries (make sure you've changed the settings for debug and release).

I fixed it.  Now I feel like an idiot.  I had updated all the linking in the compiler but I still needed to update the .dll files. 

Thanks for putting up with my silliness and helping me to get this working!  I'm excited to have it working now!

 

anything