Bugzilla – Attachment 181272 Details for
Bug 304184
kde-window-decorator crashes quite often
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
Reparent fix
kwd-reparent.diff (text/plain), 3.31 KB, created by
David Reveman
on 2007-10-30 16:34:39 UTC
(
hide
)
Description:
Reparent fix
Filename:
MIME Type:
Creator:
David Reveman
Created:
2007-10-30 16:34:39 UTC
Size:
3.31 KB
patch
obsolete
>commit cc3ce78a03c11d3b0fcc90d1f19866308536688b >Author: David Reveman <davidr@novell.com> >Date: Tue Oct 30 11:57:44 2007 -0400 > > Reparent window instead of flipping the WType_TopLevel bit. > >diff --git a/kde/window-decorator/decorator.cpp b/kde/window-decorator/decorator.cpp >index 19e10d6..9342084 100644 >--- a/kde/window-decorator/decorator.cpp >+++ b/kde/window-decorator/decorator.cpp >@@ -299,9 +299,9 @@ KWD::Decorator::enableDecorations (Time timestamp, > > updateShadow (); > >- mDecorNormal = new KWD::Window (mCompositeWindow, qt_xrootwin (), >+ mDecorNormal = new KWD::Window (mCompositeWindow->winId (), qt_xrootwin (), > 0, Window::Default); >- mDecorActive = new KWD::Window (mCompositeWindow, qt_xrootwin (), >+ mDecorActive = new KWD::Window (mCompositeWindow->winId (), qt_xrootwin (), > 0, Window::DefaultActive); > > connect (mKWinModule, SIGNAL (windowAdded (WId)), >@@ -918,7 +918,8 @@ KWD::Decorator::handleWindowAdded (WId id) > { > if (!mClients.contains (id)) > { >- client = new KWD::Window (mCompositeWindow, id, frame, type, >+ client = new KWD::Window (mCompositeWindow->winId (), >+ id, frame, type, > x, y, > width + border * 2, > height + border * 2); >@@ -940,7 +941,7 @@ KWD::Decorator::handleWindowAdded (WId id) > { > if (!mClients.contains (id)) > { >- client = new KWD::Window (mCompositeWindow, id, 0, type, >+ client = new KWD::Window (mCompositeWindow->winId (), id, 0, type, > x, y, > width + border * 2, > height + border * 2); >diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp >index e64dbe9..568dbe6 100644 >--- a/kde/window-decorator/window.cpp >+++ b/kde/window-decorator/window.cpp >@@ -54,14 +54,14 @@ > #include <qcursor.h> > #include <qpopupmenu.h> > >-KWD::Window::Window (QWidget *parent, >- WId clientId, >- WId frame, >- Type type, >- int x, >- int y, >- int w, >- int h): QWidget (parent, 0), >+KWD::Window::Window (WId parentId, >+ WId clientId, >+ WId frame, >+ Type type, >+ int x, >+ int y, >+ int w, >+ int h): QWidget (0, 0), > mType (type), > mFrame (0), > mClientId (clientId), >@@ -122,6 +122,8 @@ KWD::Window::Window (QWidget *parent, > mGeometry = QRect (50, 50, 30, 1); > } > >+ XReparentWindow (qt_xdisplay (), winId (), parentId, 0, 0); >+ > setGeometry (QRect (mGeometry.x () + ROOT_OFF_X, > mGeometry.y () + ROOT_OFF_Y, > mGeometry.width (), mGeometry.height ())); >@@ -1159,11 +1161,6 @@ KWD::Window::resizeDecoration (bool force) > > mMapped = true; > >- /* XXX: is there a more appropriate way to achieve this? >- add WType_TopLevel flag so that visualRect isn't clipped >- to parent. */ >- setWFlags (getWFlags () | WType_TopLevel); >- > if (mDamageId != winId ()) > { > mDamageId = winId (); >diff --git a/kde/window-decorator/window.h b/kde/window-decorator/window.h >index 8472677..e9d6496 100644 >--- a/kde/window-decorator/window.h >+++ b/kde/window-decorator/window.h >@@ -54,7 +54,7 @@ class Window:public QWidget, public KDecorationBridge { > }; > > public: >- Window (QWidget *parent, WId clientId, WId frame, Type type, >+ Window (WId parentId, WId clientId, WId frame, Type type, > int x = 0, int y = 0, int w = 1, int h = 1); > ~Window (void); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 304184
:
159628
|
162064
|
162075
|
172684
|
172703
|
173569
|
174067
|
175135
|
175555
|
175990
|
179679
|
180036
| 181272