GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

menubar appearance and z-order

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
clinisbut
Familiar Face


Joined: 10 Apr 2008
Posts: 19

PostPosted: Wed Apr 30, 2008 7:59 am    Post subject: menubar appearance and z-order Reply with quote

I'm developing under windows xp and have a menubar on top of my window.

With default xp theme, I don't see any border around menubar, but, with classical theme there is a border around menubar and I don't know how to hide it.



I have another "problem" too and regards to gtk_message_dialog_new.
When I run a message dialog and minimize my app (to hidden all windows' app), when I restore my app again the message dialog stays behind main window! And 'cause I created it as modal, main windows doesn't responds and seems like application is broken, but it is not but waiting to close message dialog.
Back to top
cofcof
Familiar Face


Joined: 02 Apr 2008
Posts: 16

PostPosted: Tue May 06, 2008 3:57 am    Post subject: Reply with quote

Hi Clinisbut

I don't know about your menubar problem
(where did you get the winxp theme?)


For your second problem:
I did that on linux and it worked well:

Code: (C)
1
gtk_window_set_transient_for((GtkWindow*) window_dialog, (GtkWindow*)window_main);


Let me know if it solves your problem

Cofcof
Back to top
clinisbut
Familiar Face


Joined: 10 Apr 2008
Posts: 19

PostPosted: Wed May 07, 2008 1:29 pm    Post subject: Reply with quote

Quote:

I don't know about your menubar problem
(where did you get the winxp theme?)


The winxp theme comes bundled with winxp itself.

gtk_window_set_transient_for() seems to not solve my problem.
This is how I used:
Code: (C)
1
2
3
4
5
6
7
8
9

GtkWidget* advise;
    advise = gtk_message_dialog_new( GTK_WINDOW(this->window), flags, type, button, string );
        gtk_window_set_transient_for( (GtkWindow*)advise, (GtkWindow*)this->window );


gtk_window_set_title( GTK_WINDOW(advise), "Information");
gtk_dialog_run( GTK_DIALOG(advise) );


But after minimize all and restore app window, main windows is showing upon dialog.[/quote]
Back to top
cofcof
Familiar Face


Joined: 02 Apr 2008
Posts: 16

PostPosted: Thu May 08, 2008 4:16 am    Post subject: Reply with quote

Hi again

Try to modify the type hint of your dialog:

Quote:
Code: (C)
1
2
3

void                gtk_window_set_type_hint            (GtkWindow *window,
                                                         GdkWindowTypeHint hint);


By setting the type hint for the window, you allow the window manager to decorate and handle the window in a way which is suitable to the function of the window in your application.

This function should be called before the window becomes visible.

gtk_dialog_new_with_buttons() and other convenience functions in GTK+ will sometimes call gtk_window_set_type_hint() on your behalf.

I use as hint:
GDK_WINDOW_TYPE_HINT_NOTIFICATION
but I beleive that's a mistake and I (you) should use
GDK_WINDOW_TYPE_HINT_DIALOG


Also did you put your main windows as modal? or your dialog as modal
If your main windows is modal, I guess it migth be the problem and you should remove the modal (at least during the life time of your dialog window)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP