Hi,

It still does not seem to work. I tried with VLC and totem in fullscreen mode.

Here is what I did:

[code]
class KbdWindowBase:
     """Very messy class holds the keyboard widget.  The mess is the docked 
window support which is disable because of numerous metacity bugs."""
     def __init__(self):
         gtk.Window.__init__(self)
         _logger.debug("Entered in __init__")
         self.keyboard = None
         self.set_accept_focus(False)
         self.grab_remove()
         self.set_keep_above(True)
         self.connect('realize', self._realize_cb)


         self.set_icon_name("onboard")

         config.geometry_notify_add(self.resize)
         self.set_default_size(config.keyboard_width, config.keyboard_height)
         config.position_notify_add(self.move)
         self.move(config.x_position, config.y_position)

         self.connect("window-state-event", self.cb_state_change)

         self.icp = IconPalette()
         self.icp.connect_object("activated", gtk.Window.deiconify, self)

         self.show_all()
         if config.start_minimized: self.iconify()
         _logger.debug("Leaving __init__")


     def _realize_cb(self, widget):
         self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK)
[/code]

By the way, you can see the source code online at:
https://code.launchpad.net/~onboard/onboard/pointer-users

KbdWindow.py is the file where the window for the onscreen keyboard gets 
created.

Cheers

Francesco


On 06/30/2010 02:53 PM, Tomeu Vizoso wrote:
> On Wed, Jun 30, 2010 at 14:41, Francesco Fumanti
> <[email protected]>  wrote:
>> Hi,
>>
>> What do you mean by "In the realize callback"; the __init__ in the window
>> class (derived from gtk.window) used for the onscreen keyboard? I tred to
>> put the flag that you suggested there, but it did not help. (Moreover, the
>> window was without decoration. )
>
> In __init__ you add:
>
>          self.connect('realize', self._realize_cb)
>
> and then add this method:
>
>      def _realize_cb(self, widget):
>          self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK)
>
> Taken from 
> http://git.sugarlabs.org/projects/sugar/repos/mainline/blobs/master/src/jarabe/frame/framewindow.py
>
> Regards,
>
> Tomeu
>
>> Thanks nevertheless for telling me your idea.
>>
>> Francesco.
>>
>> On 06/30/2010 02:02 PM, Tomeu Vizoso wrote:
>>>
>>> On Wed, Jun 30, 2010 at 12:03, Francesco Fumanti
>>> <[email protected]>    wrote:
>>>>
>>>> Hi,
>>>>
>>>> Thanks for your reply.
>>>>
>>>> Onboard already users that flag but unfortunately it does not keep it
>>>> above other applications. However, onscreen keyboard users usually don't
>>>> have access to a hardware keyboard, it is important for the onscreen
>>>> keyboard to remain available also when a nother application goes 
>>>> fullscreen.
>>>>
>>>> Does anybody have any idea about how to achieve it?
>>>
>>> Maybe you this?
>>>
>>>          self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK)
>>>
>>> (In the realize callback)
>>>
>>> Regards,
>>>
>>> Tomeu
>>>
>>>> Best regards,
>>>>
>>>> Francesco.
>>>>
>>>> On 06/29/2010 11:01 AM, Cornelius Kölbel wrote:
>>>>>
>>>>> Hi Francesco,
>>>>>
>>>>> the gtk widget got a "set_keep_above".
>>>>>
>>>>> splash.set_keep_above(True)
>>>>>
>>>>> I am not sure at the moment, if it will also keep it above other
>>>>> applications...
>>>>>
>>>>> Kind regards Cornelius
>>>>>
>>>>>
>>>>> Am 29.06.2010 10:48, schrieb Francesco Fumanti:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Onboard is an onscreen keyboard that is written in python and that
>>>>>> uses gtk. I would like it to remain visible also when there is
>>>>>> another application that goes fullscreen. Could anybody please tell
>>>>>> me whether this is possible and how to do it; or point me to some
>>>>>> documentation about how to achieve it?
>>>>>>
>>>>>> Many thanks in advance,
>>>>>>
>>>>>> Francesco. _______________________________________________ pygtk
>>>>>> mailing list   [email protected]
>>>>>> http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ:
>>>>>> http://faq.pygtk.org/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________ pygtk mailing list
>>>>> [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read
>>>>> the PyGTK FAQ: http://faq.pygtk.org/
>>>>
>>>> _______________________________________________
>>>> pygtk mailing list   [email protected]
>>>> http://www.daa.com.au/mailman/listinfo/pygtk
>>>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>>
>>
>>
>

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to