Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-12

Popup window

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Krzysztof

Hi,

In some mediaplyaers (like rhythmbox or banshee on linux) when you try to change volume then some small window appear with trackbar. This popup window doesn't deactivate main form. Which property is responsible for that? I'm trying with different values of FormStyle and Popupmode but my popup window always deactivate parent form (title bar of parent form change color).

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121217/c49dd76d/attachment.html>

Reply by email

Paul Ishenin
to Krzysztof
Krzysztof wrote 8 lines
Hi, In some mediaplyaers (like rhythmbox or banshee on linux) when you try to change volume then some small window appear with trackbar. This popup window doesn't deactivate main form. Which property is responsible for that? I'm trying with different values of FormStyle and Popupmode but my popup window always deactivate parent form (title bar of parent form change color).

This depends on widgetset you are using. Where do you see this behavior?

Best regards,
Paul Ishenin

Reply by email

zeljko
to Krzysztof
Krzysztof wrote
> This depends on widgetset you are using. Where do you see this behavior? Linux Mint 13, 64 bit, Mate (fork of GNOME 2.XX)

And widgetset is ? Under Qt you can set rule ShowWithoutActivation, but don't know how it goes on under Gtk2.

zeljko

Reply by email

Krzysztof
to Paul Ishenin

What I found that Banshee using GTK: VolumeButton which inherit from ScaleButton. ScaleButton has getpopup (GTKWidget type). So maybe it is using gtk window with GTK_WINDOW_POPUP type. I'm not familiar with C language and low level GTK, but documentation says:

"GtkWidget*  gtk_window_new (GtkWindowType type);

Creates a new GtkWindow, which is a toplevel window that can contain other widgets. Nearly always, the type of the window should be GTK_WINDOW_TOPLEVEL. If you're implementing something like a popup menu from scratch (which is a bad idea, just use GtkMenu), you might use GTK_WINDOW_POPUP. GTK_WINDOW_POPUP is not for dialogs, though in some other toolkits dialogs are called "popups". In GTK+, GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip. On X11, popup windows are not controlled by the window manager.

If you simply want an undecorated window (no window borders), use gtk_window_set_decorated(), don't use GTK_WINDOW_POPUP."

Anyway, TPopupWindow could be interesting feature, like in my case for volume button, but also for custom popup menus, tips etc. Especially when similar option exists for QT and windows widgetsets -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121217/f89098a8/attachment.html>

Reply by email

zeljko
to Krzysztof
Krzysztof wrote 22 lines
What I found that Banshee using GTK: VolumeButton which inherit from ScaleButton. ScaleButton has getpopup (GTKWidget type). So maybe it is using gtk window with GTK_WINDOW_POPUP type. I'm not familiar with C language and low level GTK, but documentation says: "GtkWidget* gtk_window_new (GtkWindowType type); Creates a new GtkWindow, which is a toplevel window that can contain other widgets. Nearly always, the type of the window should be GTK_WINDOW_TOPLEVEL. If you're implementing something like a popup menu from scratch (which is a bad idea, just use GtkMenu), you might use GTK_WINDOW_POPUP. GTK_WINDOW_POPUP is not for dialogs, though in some other toolkits dialogs are called "popups". In GTK+, GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip. On X11, popup windows are not controlled by the window manager. If you simply want an undecorated window (no window borders), use gtk_window_set_decorated(), don't use GTK_WINDOW_POPUP." Anyway, TPopupWindow could be interesting feature, like in my case for volume button, but also for custom popup menus, tips etc. Especially when similar option exists for QT and windows widgetsets

TPopupWindow could be simple TWSHintWindow based form , or TCustomForm with BorderStyle = bsNone. In that case it won't take keyboard focus, but can process mouse events.

zeljko

Reply by email