summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@smspillaz-desktop.(none)>2010-04-02 20:49:28 +0800
committerSam Spilsbury <smspillaz@smspillaz-desktop.(none)>2010-04-02 20:49:28 +0800
commit6305cc8919345fa4fd1e70d9a9bacae40bd6b0a1 (patch)
tree1e18105116652bd6492e13d22fcbb419e3e2e40c /gtk
parent96b29f03aa817d78412413e97227fa3873644840 (diff)
downloadzcomp-6305cc8919345fa4fd1e70d9a9bacae40bd6b0a1.tar.gz
zcomp-6305cc8919345fa4fd1e70d9a9bacae40bd6b0a1.tar.bz2
Fix offset event window positions in cairo 2D mode bug
Diffstat (limited to 'gtk')
-rw-r--r--gtk/window-decorator/gtk-window-decorator.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
index 4a45f7c..3e597be 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -2945,9 +2945,23 @@ get_event_window_position (decor_t *d,
gint *w,
gint *h)
{
- *x = pos[i][j].x + pos[i][j].xw * width;
- *y = pos[i][j].y + pos[i][j].yh * height + pos[i][j].yth *
+ if (d->frame_window)
+ {
+ *x = pos[i][j].x + pos[i][j].xw * width + _win_extents.left;
+ *y = pos[i][j].y + pos[i][j].yh * height + pos[i][j].yth *
+ (titlebar_height - 17) + _win_extents.top;
+
+ if (i == 0 && (j == 0 || j == 2))
+ {
+ *y -= titlebar_height;
+ }
+ }
+ else
+ {
+ *x = pos[i][j].x + pos[i][j].xw * width;
+ *y = pos[i][j].y + pos[i][j].yh * height + pos[i][j].yth *
(titlebar_height - 17);
+ }
if ((d->state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) &&
(j == 0 || j == 2))