After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 554407 - directfb backend does not implement GdkWindowImpl
directfb backend does not implement GdkWindowImpl
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: [obsolete] Backend: directfb
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Michael Emmel
: 557311 564075 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-30 10:11 UTC by chimera
Modified: 2009-02-19 21:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
implement GdkWindowImplIface in directfb backend (22.65 KB, patch)
2008-11-06 22:48 UTC, Masse Nicolas
none Details | Review
implement GdkWindowImplIface in directfb backend (30.25 KB, patch)
2009-01-11 21:30 UTC, Masse Nicolas
needs-work Details | Review
implement GdkWindowImplIface in directfb backend (28.43 KB, patch)
2009-01-16 21:21 UTC, Masse Nicolas
none Details | Review
alternative approach based on the patch from Ubuntu (21.85 KB, patch)
2009-02-16 22:55 UTC, Sven Neumann
none Details | Review
updated patch, needs more work (23.38 KB, patch)
2009-02-17 23:20 UTC, Sven Neumann
needs-work Details | Review
another updates, incorporates move_resize changes from the patch by Masse Nicolas (26.25 KB, patch)
2009-02-18 00:09 UTC, Sven Neumann
committed Details | Review

Description chimera 2008-09-30 10:11:29 UTC
Please describe the problem:
When trying to crosscompile Gtk+ with gdk-target=directfb with following configure string:
./configure --enable-static --prefix=/usr/lib/gtkdfb --host=powerpc-unknown-linux-gnu --with-gdktarget=directfb

make fails with error message:
gdkwindow-directfb.c: In function `gdk_window_directfb_process_all_updates':
gdkwindow-directfb.c:102: warning: unused variable `wimpl'
gdkwindow-directfb.c: In function `IA__gdk_window_hide':
gdkwindow-directfb.c:1279: warning: implicit declaration of function `_gdk_windowing_window                                _clear_area'
gdkwindow-directfb.c: At top level:
gdkwindow-directfb.c:1620: error: conflicting types for '_gdk_windowing_window_clear_area'
gdkwindow-directfb.c:1279: error: previous implicit declaration of '_gdk_windowing_window_c                                lear_area' was here
make[4]: *** [gdkwindow-directfb.lo] Error 1

I tried to put to function header of _gdk_windowing_window_clear_area on the top of the file but then linking fails later on with duplicate symbols of IA__gdk_window_hide and other functions with similar name.

Steps to reproduce:
1. extract gtk+-2.14.3
2. ./configure --enable-static --prefix=/usr/lib/gtkdfb --host=powerpc-unknown-linux-gnu --with-gdktarget=directfb
3. make


Actual results:
make fails with:

gdkwindow-directfb.c: In function `gdk_window_directfb_process_all_updates':
gdkwindow-directfb.c:102: warning: unused variable `wimpl'
gdkwindow-directfb.c: In function `IA__gdk_window_hide':
gdkwindow-directfb.c:1279: warning: implicit declaration of function `_gdk_windowing_window                                _clear_area'
gdkwindow-directfb.c: At top level:
gdkwindow-directfb.c:1620: error: conflicting types for '_gdk_windowing_window_clear_area'
gdkwindow-directfb.c:1279: error: previous implicit declaration of '_gdk_windowing_window_c                                lear_area' was here
make[4]: *** [gdkwindow-directfb.lo] Error 1


Expected results:
make should succeed

Does this happen every time?
yes

Other information:
Comment 1 Emmanuele Bassi (:ebassi) 2008-09-30 10:18:59 UTC
the directfb backend has not been updated both in 2.14 and in trunk to the new internal GdkWindowImpl interface, see:

  http://mail.gnome.org/archives/gtk-devel-list/2008-February/msg00099.html

for more informations.

retitling for clarity.
Comment 2 Emmanuele Bassi (:ebassi) 2008-11-02 08:59:31 UTC
*** Bug 557311 has been marked as a duplicate of this bug. ***
Comment 3 Masse Nicolas 2008-11-06 22:48:50 UTC
Created attachment 122159 [details] [review]
implement GdkWindowImplIface in directfb backend

Here is a patch for this bug.
I haven't test yet if the backend works correctly anyway (because of lack of time and a little problem with directfb on my system right now), but at least it compiles.
I'll test later it if I found time for that.
Comment 4 David Hemmo 2008-12-03 10:13:15 UTC
I cannot confirm for sure, but I think this patch is not working like intended.
When using it in gtk 2.14.5, gtk-demo crashes.
Everything else being equal, I tried with gtk+2.13.0 that didn't not need this patch and gtk-demo works ok
Unfortunately I don't know DirectFB and GTK+ well enough to help :-(
Comment 5 Emmanuele Bassi (:ebassi) 2008-12-18 13:05:49 UTC
*** Bug 564075 has been marked as a duplicate of this bug. ***
Comment 6 Masse Nicolas 2008-12-21 00:35:34 UTC
Same things here.
it crash on line 230 in directfb/gdkcolor-directfb.c:

surface=GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (_gdk_parent_root)->impl)->drawable.surface;

From what I've seen, there is a problem with _gdk_parent_root,wich seems to be uninitialized.
What's quite strange is that I have't touch this with my patch. 

Comment 7 Masse Nicolas 2009-01-11 21:30:22 UTC
Created attachment 126234 [details] [review]
implement GdkWindowImplIface in directfb backend

This time, I have been able to make gtk-demo working on my system.
So, please at least review this.
Comment 8 Matthias Clasen 2009-01-11 21:49:46 UTC
 
+/**
+ * gdk_window_scroll:
+ * @window: a #GdkWindow
+ * @dx: Amount to scroll in the X direction
+ * @dy: Amount to scroll in the Y direction
+ *
+ * Scroll the contents of its window, both pixels and children, by
+ * the given amount. Portions of the window that the scroll operation
+ * brings in from offscreen areas are invalidated.
+ **/

Please don't add doc comments for such functions in gdk/direct-fb/.They are documented in gdk/ (or, depending on where they are implemented, in gdk/x11/).
Having the documentation in multiple places leads to redundancy and problems with gtk-doc.


 void
-_gdk_window_directfb_show_raised (GdkWindow *window)
+gdk_window_show (GdkWindow *window)
 

This can not be right. gdk_window_show is already implemented in gdk/gdkwindow.c. 
The same goes for all the other functions that you renamed.
Comment 9 Masse Nicolas 2009-01-16 21:21:06 UTC
Created attachment 126611 [details] [review]
implement GdkWindowImplIface in directfb backend

Sorry, but it seems I inverted the filenames when creating my patch.
This one is OK.
Comment 10 Sven Neumann 2009-02-16 22:55:15 UTC
Created attachment 128872 [details] [review]
alternative approach based on the patch from Ubuntu

Masse, I've made a similar attempt based on this patch: http://patch-tracking.debian.net/patch/series/view/gtk+2.0/2.14.7-1/071_correct_directfb_declarations.patch

In my opinion my attempt looks somewhat cleaner than your patch, but I haven't been able to test it yet. It would help a lot if you could test and review this patch for me. I can then help to get it committed.
Comment 11 Sven Neumann 2009-02-17 23:20:53 UTC
Created attachment 128932 [details] [review]
updated patch, needs more work
Comment 12 Sven Neumann 2009-02-18 00:09:01 UTC
Created attachment 128934 [details] [review]
another updates, incorporates move_resize changes from the patch by Masse Nicolas

 gdkgeometry-directfb.c |   20 +-
 gdkprivate-directfb.h  |   11 +
 gdkwindow-directfb.c   |  468 +++++++++++++++++++++++--------------------------
 3 files changed, 242 insertions(+), 257 deletions(-)

This seems to restore basic functionality of the DirectFB backend. Scrolling doesn't work and popups seem broken as well. But I guess this is still better than having a tree that doesn't even compile. Unless someone objects I will commit this to trunk and merge the changes to the gtk-2-14 branch.
Comment 13 Sven Neumann 2009-02-18 17:21:02 UTC
I've committed this to both branches now:

2009-02-18  Sven Neumann  <sven@gimp.org>

	Bug 554407 – directfb backend does not implement GdkWindowImpl

	* gdk/directfb/gdkgeometry-directfb.c
	* gdk/directfb/gdkprivate-directfb.h
	* gdk/directfb/gdkwindow-directfb.c: fix the build of the DirectFB
	backend and resurrect basic functionality. Based on a patch from
	the Ubuntu bug-tracker and work by Masse Nicolas.

If there are problems with these changes, please let me know. Patches to fix the remaining issues are much appreciated.
Comment 14 Masse Nicolas 2009-02-18 22:23:17 UTC
Some remarks:
*in gdkwindow-directfb.c
I think that
private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
need to be added on line 2656 and 2733

*in gdkdisplay-directfb.c
The reason why I put _gdk_windowing_window_init (); before
gdk_screen_set_default_colormap (_gdk_screen,
                                  gdk_screen_get_system_colormap (_gdk_screen));
is because this way _gdk_parent_root is initialised before the call to gdk_screen_get_system_colormap. This fixed a bug on my system.

"Scrolling doesn't work and popups seem broken as well."
I had the same. 

"But I guess this is still better than having a tree that doesn't even compile."
I completely agree with you here.
Comment 15 Sven Neumann 2009-02-19 21:48:48 UTC
Thanks for the patch review. I have done the changes you suggested in both branches.

Now it would be nice if we would figure out the scrolling issue...