gdk_window_set_keep_above ()
gdk_window_set_keep_above ()
how to use, whether it is possible to raise them to the forefront of the gadget that is, (above)
Re: gdk_window_set_keep_above ()
Does this work? i have not tried it.
Code: Select all
ImportC ""
gtk_main_quit()
gtk_window_set_title(*win.GtkWidget, text.p-Utf8)
g_signal_connect(instance.i, detailed_signal.p-Utf8, c_handler.i, pdata.i) As "g_signal_connect_data"
g_object_set_data(object.i, key.p-Utf8, pdata.i)
EndImport
Define.GtkWidget *win
gtk_init_(#Null, #Null)
*win = gtk_window_new_(#GTK_WINDOW_TOPLEVEL)
gtk_window_set_title(*win, "foo")
gtk_widget_set_size_request_(*win, 250, 150)
gtk_window_set_position_(*win, #GTK_WIN_POS_CENTER)
g_signal_connect(*win, "destroy", @gtk_main_quit(), #Null)
gtk_widget_show_(*win)
gdk_window_set_keep_above_(*win, #True)
gtk_main_()
Re: gdk_window_set_keep_above ()
The successful working of gdk_window_set_keep_above( ) can't be guaranteed because the window manager of your distribution has to support the operation:
- Bodhi Linux 2.4.0 x86 with Enlightenment E17
- Elementary OS 0.2 x86 with Pantheon
- Fedora 20 x86 with Gnome 3
- Linux Mint 17 x86 with Cinnamon
- Kubuntu 14.04 x86 with KDE
- Lubuntu 14.04 x86 with LXDE
- Ubuntu 14.04 x86 with Unity
- Xubuntu 14.04 x86 with Xfce
Why don't you use PB's StickyWindow() command which I assume to simply wrap gdk_window_set_keep_above()?
The following code was successfully tested with PB 5.31 on these distributions:[color=#0040FF]GDK 2 Reference Manual[/color] wrote:On X11, asks the window manager to keep window below, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "keep below"; so you can't rely on the window being kept below. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.
- Bodhi Linux 2.4.0 x86 with Enlightenment E17
- Elementary OS 0.2 x86 with Pantheon
- Fedora 20 x86 with Gnome 3
- Linux Mint 17 x86 with Cinnamon
- Kubuntu 14.04 x86 with KDE
- Lubuntu 14.04 x86 with LXDE
- Ubuntu 14.04 x86 with Unity
- Xubuntu 14.04 x86 with Xfce
Code: Select all
*Window1.GtkWidget = OpenWindow(1, 100, 100, 200, 100, "Window 1")
OpenWindow(2, 200, 150, 200, 100, "Window 2")
gdk_window_set_keep_above_(*Window1\window, #True)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindowRe: gdk_window_set_keep_above ()
I needed it for gadget,Why don't you use PB's StickyWindow() command which I assume to simply wrap gdk_window_set_keep_above()?
Re: gdk_window_set_keep_above ()
i use this:ambrose wrote:is there a way to tell if the user running my program is an administrator or not?
Code: Select all
Procedure isRoot()
If getuid_() = 0
ProcedureReturn 1 ; true - is root
Else
ProcedureReturn 0 ; false - some other user
EndIf
EndProcedureRe: gdk_window_set_keep_above ()
No one is that it does not know how to do it?I needed it for gadget,can not find how raised gadget.
this is it possible to change the z-order?gtk_overlay_reorder_overlay ()
void
gtk_overlay_reorder_overlay (GtkOverlay *overlay,
GtkWidget *child,
gint position);
Moves child to a new index in the list of overlay children. The list contains overlays in the order that these were added to overlay .
A widget’s index in the overlay children list determines which order the children are drawn if they overlap. The first child is drawn at the bottom. It also affects the default focus chain order.
Re: gdk_window_set_keep_above ()
why not struct GtkOverlay?
Code: Select all
gdk_window_lower_
gdk_window_set_keep_below_
gtk_window_set_keep_below_
