Hi I am getting and odd behavior using Gtk::Window::move. I will explain it
using the next piece of code as base:

class MainWindow: public Gtk::Window{
    protected:
        void on_signal_resize(GdkEventConfigure*);
    public:
        MainWindow();
        ~MainWindow();
};

MainWindow::MainWindow():
{
        bool is_maximized = false;
        set_title("Test");
        set_border_width(1);
        ...
        show_all_children();
        ...

        if (is_maximized){
            maximize();
        }
        set_position(Gtk::WIN_POS_NONE);
        resize(300, 400);
        move(0, 50);

        signal_configure_event().connect_notify( sigc::mem_fun(*this,
&MainWindow::on_signal_resize) );
}

void MainWindow::on_signal_resize(GdkEventConfigure *ec){
    std::cout << "Position: (" << ec->x << ", " << ec->y << ")" <<
std::endl;
    std::cout << "Size: (" << ec->width << ", " << ec->height << ")" <<
std::endl;
}

The thing is that the window is never moved to the y value that I specify at
move.
Using the signal event I can get the real number, ec->y always return the
value that I specify at move plus 25, 75 in this case.
I have tried different window managers (metacity & compiz).

Any ideas?

Thanks in advance.
Fernando
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to