gtk_widget_shape_combine_mask does not work correctly

Bug #582276 reported by Pietro Pilolli
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gtk+2.0 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

This problem affects the package libkgtk2.0-2.20.0ubuntu4

The routine gtk_widget_input_shape_combine_mask does not work
the problem is introduced since the patch in the commit 1f3a57691fbc8eba417fab7056bdb748bc4b6ab1 at line 4809
http://git.gnome.org/browse/gtk+/commit/?id=1f3a57691fbc8eba417fab7056bdb748bc4b6ab1

and the has been introduced and solved by <email address hidden>
that have confirmed this fact

For the solution see
http://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkwindow-x11.c

Can you see that at line 4613 is returned a new region
instead the old NULL that caused the bug

if (xrl == NULL || rn == 0)
    return gdk_region_new (); /* Empty */

In any case I'm a coder and I have written a program that used the gtk_widget_input_shape_combine_mask
and then I have written a patch that I suggest to fix the problem to run fine my program on Ubuntu Lucid

You can download the xshape.patch from:

http://code.google.com/p/ardesia/downloads/list

I have also written a short howto to rebuild the package on
http://code.google.com/p/ardesia/wiki/InstallOnUbuntuLucid

I hope that you can patch the package as soon as possible

Cheers bye

Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :
Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :

I have attached the patch too

Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :

I want underlie that this bug cause apparently the freeze of the
window when in a program a coders call these function:
gtk_widget_input_shape_combine_mask
gtk_widget_shape_combine_mask
gdk_window_input_shape_combine_mask
gdk_window_shape_combine_mask

And then it is possible that other bugs in other applications
are depending on this one

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report and clear description. Is there an upstream bug about the issue? Has it been fixed in git upstream too?
Do you have a reference to the upstream commit?

Changed in gtk+2.0 (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :

I don't think that this is marked as a bug in the Gtk git
but I have contacted the committer and he confirms that this problem
in introduced with the commit 1f3a57691fbc8eba417fab7056bdb748bc4b6ab1
marked with the title "Don't crash in DND when the X server doesn't support SHAPE"

http://git.gnome.org/browse/gtk+/commit/?id=1f3a57691fbc8eba417fab7056bdb748bc4b6ab1

and it has been fixed with the commit 0efb24f589a74c4a4e78a1803d6e7205be9c1984
marked with the title "Yet another fix for shape handling"

This commit has made the same day of the previous one to patch the previous commit

http://git.gnome.org/browse/gtk+/commit/?id=0efb24f589a74c4a4e78a1803d6e7205be9c1984

The patch that I have proposed and that I have tested to solve the shape problem
is the minimal one to align the code to the commit 0efb24f589a74c4a4e78a1803d6e7205be9c1984
marked with the title "Yet another fix for shape handling"

Exactly this one
http://git.gnome.org/browse/gtk+/commit/?id=0efb24f589a74c4a4e78a1803d6e7205be9c1984

I use the gtk code patched in this way and I have not detected new bad behave in the gtk application

If you see the patch consist simply to return an empty region instead a NULL pointer in the case in witch
the system does not support xshape or in witch we want apply a NULL shape to the window
(it is used to remove the previous shape)

I hope that you can solve the problem.

Cheers bye

Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :

The packege
gtk+2.0 2.20.1-0ubuntu1
fix this bug

Revision history for this message
Sebastien Bacher (seb128) wrote :

closing since the bug is fixed in lucid now

Changed in gtk+2.0 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :

I do not know the ubuntu policy about close the bug, but
the bug exists in lucid now
infact the gtk+2.0 2.20.1-0ubuntu1
that fix the bug is in the proposed lucid-updates but not
in the lucid packages

Revision history for this message
Sebastien Bacher (seb128) wrote :

lucid can't be changed now, if it's fixed in the current update version it's fixed for Ubuntu

Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug should also be fixed in the new 2.21 serie

Revision history for this message
Sebastien Bacher (seb128) wrote :

to be clear stable versions don't change only -updates get changes

Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :

The bug is closed

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.