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

Author Topic: Invisable title bar  (Read 7113 times)

0 Members and 1 Guest are viewing this topic.

Sirt

  • Newbie
  • *
  • Posts: 27
    • View Profile
Invisable title bar
« on: January 10, 2009, 06:31:28 am »
First Hi,I'm one of the many people flocking from SDL to SFML
and I'm loving it.

My question is this,
When I create a window with sf::Style::Titlebar the title bar area including the minimize and close buttons is invisable, but present.

I'm running sfml 1.4 on Ubuntu Hardy via the CLI (gnome interface).

Is this a known problem,I haven't seen it mentioned anywhere.

Everything else works fine,also the sample programs have the same problem except for the X11 sample program which does show the titlebar.

I can provide the code if you want to check my code is not the problem,
I'm guessing it's a Linux compat setting I am unaware of?

Thanks for this great library.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Invisable title bar
« Reply #1 on: January 10, 2009, 12:21:59 pm »
Please post a minimal example to reproduce your problem.

Sirt

  • Newbie
  • *
  • Posts: 27
    • View Profile
Invisable title bar
« Reply #2 on: January 10, 2009, 04:11:11 pm »
Okay thanks Tank,

this minimal code won't display the titlebar though it is there because I can hover the mouse over it and the bubble box's appear (minimize,maximize),also the screen is not cleared to black in that area ...


(on Ubuntu 8.04, using Gnome 2.22.3 interface if it helps!)

Code: [Select]

#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "test sfml", sf::Style::Titlebar | sf::Style::Resize | sf::Style::Close);

sf::Event Event;
sf::Font MyFont;

// Load from a font file on disk
if (!MyFont.LoadFromFile("Widelands.ttf"))
{
    if (App.IsOpened()){ App.Close();}
    return 1;
}

        App.SetFramerateLimit(12);

sf::String Text("test", MyFont, 50);
Text.SetPosition(100, 100);

    while (App.IsOpened())
    {
        while (App.GetEvent(Event))
    {
        // Window closed
    if (Event.Type == sf::Event::Closed)
        {App.Close();}

    // Escape key
    else if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
        {App.Close();}

        }

        App.Clear();
       
        App.Draw(Text);

        App.Display();
    }

    return 0;
}

[/code]

Sirt

  • Newbie
  • *
  • Posts: 27
    • View Profile
Invisable title bar
« Reply #3 on: January 11, 2009, 04:08:08 am »
Well I have just turned off all visual effects that I had running (main menu -> appearance -> visual effects),and now the titlebar shows.

Which is good.

Beaker

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://corvuscorone.net/
Invisable title bar
« Reply #4 on: April 09, 2009, 09:01:29 am »
Hi!

Did you ever find a fix for this other than turning the visual settings off? I've just encountered the same problem in Hardy 8.10. But I liked the rubber windows.

Cheers.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Invisable title bar
« Reply #5 on: April 12, 2009, 01:28:57 pm »
The problem is the OpenGL Rendering Context and Compiz Fusion in Ubuntu. Somehow, Compiz Fusion interferes with most OpenGL applications. Thus if you use SDL with OpenGL similar problems will appear while having effects enabled.

I don't think this is a SDL/SFML-library specific problem. It's either OpenGL/MESA, X11, or GNOME that has to do something about this.

Could also be that the error is Hardware specific.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

JSLemming

  • Newbie
  • *
  • Posts: 7
    • View Profile
Invisable title bar
« Reply #6 on: April 13, 2009, 04:49:52 am »
Quote from: "Groogy"
Thus if you use SDL with OpenGL similar problems will appear while having effects enabled.

This isn't correct. I'm in the same boat as everyone else. Yet SDL/OpenGL displays the titlebar just fine. It even renders everything in the window with the only artifacts being bleed-through from other openGl contexts updating.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Invisable title bar
« Reply #7 on: April 13, 2009, 02:01:51 pm »
I said similar effects, both problems is caused by OpenGL on Linux machines with Compiz Fusion Enabled. :P The similar effects I was talking about is the bleed-trough.

A guess is that, using XLib to open a window makes it incompatible to the Compiz engine? So maybe a better solution is to use GTK to open? Nah I don't know.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Invisable title bar
« Reply #8 on: April 13, 2009, 06:22:11 pm »
Quote
A guess is that, using XLib to open a window makes it incompatible to the Compiz engine? So maybe a better solution is to use GTK to open? Nah I don't know.

Yeah, you don't know :D
XLib is the low-level API for windowing on Linux, other APIs (including GTK) are built on top of XLib.
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Invisable title bar
« Reply #9 on: April 14, 2009, 01:06:36 pm »
Quote from: "Laurent"
Quote
A guess is that, using XLib to open a window makes it incompatible to the Compiz engine? So maybe a better solution is to use GTK to open? Nah I don't know.

Yeah, you don't know :D
XLib is the low-level API for windowing on Linux, other APIs (including GTK) are built on top of XLib.


Yea but the problem is Compiz, I think it uses GNOME's functions to do what it do. So maybe Xlib opened windows are not compatible with it.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Invisable title bar
« Reply #10 on: April 14, 2009, 02:20:05 pm »
Ah, ok I get it. You mean that Gnome may add something to windows to make them compatible with Compiz. But it would still not explain the problem, the window manager catches all X11 calls, so it can add any extra processing on top of any window, even those created directly through XLib.
Laurent Gomila - SFML developer

Avency

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Invisable title bar
« Reply #11 on: April 14, 2009, 02:39:30 pm »
It's more likely a bug in the graphics driver, since I don't experience any Compiz/OpenGL/SFML issues.

Sirt

  • Newbie
  • *
  • Posts: 27
    • View Profile
Invisable title bar
« Reply #12 on: April 28, 2009, 05:41:43 am »
Quote from: "Avency"
It's more likely a bug in the graphics driver, since I don't experience any Compiz/OpenGL/SFML issues.


Yeah,I wasn't even using openGL when I had this problem,
unless SFML is built on top of openGL that is!
Just SFML with a console window.

I couldn't be bothered looking for another solution and I miss my rubber windows.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Invisable title bar
« Reply #13 on: April 28, 2009, 07:50:16 am »
Quote
unless SFML is built on top of openGL

It is ;)
Laurent Gomila - SFML developer

 

anything