[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] embedding gnash into superkaramba
From: |
Luke Kenneth Casson Leighton |
Subject: |
Re: [Gnash-dev] embedding gnash into superkaramba |
Date: |
Fri, 18 Jul 2008 21:54:21 +0000 |
On Fri, Jul 18, 2008 at 9:24 PM, strk <address@hidden> wrote:
> On Mon, Jun 30, 2008 at 04:51:32PM +0000, Luke Kenneth Casson Leighton wrote:
>> please don't laugh - i'm serious.
>> temporarily, i've added options to set the xpos, ypos and also to set
>> "borderless" mode. the combination is designed to place flash scripts
>> on a screen where they cannot be tampered with. primary focus: klash
>> (nothing else). TODO: set "on top".
>
> Shouldn't all the above be possible to set using the generic X
> interace ? Like -geometry WxH+X+Y and the XResources file for borderless ?
mmm.... i believe i tried -geometry or at least found it to be
missing from the --help so didn't try it. i didn't try "borderless"
so thank you for that...
... however... those having been said, you're still left with KDE
integration into the panel bars to contend with, and for this reason
alone i _have_ to do it the hard way, using KWin::NetWinInfo and
friends. there were a few other requirements, such as adding in a
"move" function, as this snippet shows. "playing nice" with KDE isn't
entirely trivial if you need to make it impossible for applications to
overlay the area displayed by gnash / klash.
l.
@@ -82,12 +92,36 @@
{
// GNASH_REPORT_FUNCTION;
- _qwidget->setGeometry(0, 0, width, height);
+ int y = 0;
+ if (no_border)
+ {
+ int dh = QApplication::desktop()->height();
+ y = dh - height;
+ }
+
+ _qwidget->setGeometry(0, y, width, height);
_qwidget->setCaption(windowtitle);
+ _qwidget->setFixedSize(width, height);
_qapp->setMainWidget(_qwidget.get());
- _qwidget->show();
+ if (no_border)
+ {
+ KWin::setState( _qwidget->winId(), NET::StaysOnTop );
+
+ _qwidget->info->setState( NETWinInfo::SkipTaskbar
+ | NETWinInfo::SkipPager,NETWinInfo::SkipTaskbar
+ | NETWinInfo::SkipPager );
+ KWin::setState( _qwidget->winId(), NET::StaysOnTop );
+ KWin::setState( _qwidget->winId(), NET::KeepBelow );
+ KWin::setType( _qwidget->winId(), NET::Dock);
+
+ /*KWin::setType(_qwidget->winId(), NET::Normal);
+ KWin::setState(_qwidget->winId(), NET::Modal);*/
+
+ /*_qwidget->move( 0, dh - height);*/
+ KWin::setStrut( _qwidget->winId(), 0, 0, 0, height);
+ }
_glue.prepDrawingArea(_qwidget.get());
_renderer = _glue.createRenderHandler();
if ( ! _renderer )
@@ -101,10 +135,27 @@
_height = height;
set_render_handler(_renderer);
+ _qwidget->show();
+
return true;
}
void
+KdeGui::moveWindow(int x, int y)
+{
+ if (!no_border)
+ {
+ _qwidget->move(x, y);
+ }
+ else
+ {