Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
* libstetic/HandleWindow.cs (HandleEvent): hack around bgo 316871
Browse files Browse the repository at this point in the history
	(shaped windows block update events in gtk+ 2.8.0 - 2.8.3).

svn path=/trunk/stetic/; revision=50863
  • Loading branch information
Dan Winship committed Sep 27, 2005
1 parent 87b22c7 commit cdd9920
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2005-09-27 Dan Winship <danw@novell.com>

* libstetic/HandleWindow.cs (HandleEvent): hack around bgo 316871
(shaped windows block update events in gtk+ 2.8.0 - 2.8.3).

2005-09-26 Dan Winship <danw@novell.com>

* libstetic/wrapper/objects.xml: bring back ThemedIcon images and
Expand Down
15 changes: 14 additions & 1 deletion libstetic/HandleWindow.cs
@@ -1,4 +1,5 @@
using System;
using System.Runtime.InteropServices;

namespace Stetic {

Expand Down Expand Up @@ -72,13 +73,14 @@ public void Dispose ()
}
}

Gdk.Rectangle handleAllocation;

const int handleSize = 6;

public void Shape ()
{
Gdk.GC gc;
Gdk.Pixmap pixmap;
Gdk.Rectangle handleAllocation;
int tlx, tly;

selection.TranslateCoordinates (selection.Toplevel, 0, 0, out tlx, out tly);
Expand Down Expand Up @@ -150,13 +152,24 @@ void HandleEvent (object obj, Gtk.WidgetEventArgs args)
Drag (evm);
return;

case Gdk.EventType.Expose:
// hack around bgo 316871 for gtk+ 2.8.0-2.8.3
gdk_synthesize_window_state (window.Handle, 0, 1);
selection.Toplevel.GdkWindow.InvalidateRect (handleAllocation, true);
gdk_synthesize_window_state (window.Handle, 1, 0);
return;

default:
return;
}
}

public delegate void DragDelegate (Gdk.EventMotion evt);
public event DragDelegate Drag;


[DllImport ("libgdk-win32-2.0-0.dll")]
static extern void gdk_synthesize_window_state (IntPtr window, uint unset_flags, uint set_flags);
}
}

1 change: 1 addition & 0 deletions libstetic/libstetic.dll.config
@@ -1,4 +1,5 @@
<configuration>
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/>
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so.0"/>
</configuration>

0 comments on commit cdd9920

Please sign in to comment.