--- src/frames_orig.c	Sat Jan 11 12:09:12 2003
+++ src/frames.c	Wed Jun 25 17:01:38 2003
@@ -57,6 +57,8 @@
                                                    GdkEventCrossing    *event);
 static gboolean meta_frames_leave_notify_event    (GtkWidget           *widget,
                                                    GdkEventCrossing    *event);
+static gboolean meta_frames_scroll_event          (GtkWidget           *widget,
+                                                   GdkEventScroll      *event);
 
 static void meta_frames_paint_to_drawable (MetaFrames   *frames,
                                            MetaUIFrame  *frame,
@@ -140,6 +142,7 @@
   widget_class->motion_notify_event = meta_frames_motion_notify_event;
   widget_class->enter_notify_event = meta_frames_enter_notify_event;
   widget_class->leave_notify_event = meta_frames_leave_notify_event;
+  widget_class->scroll_event = meta_frames_scroll_event;
 }
 
 static gint
@@ -1904,6 +1907,43 @@
   return TRUE;
 }
 
+static gboolean
+meta_frames_scroll_event (GtkWidget      *widget,
+                          GdkEventScroll *event)
+{
+  MetaUIFrame *frame;
+  MetaFrames *frames;
+  MetaFrameControl control;
+  frames = META_FRAMES (widget);
+  frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
+  if (frame == NULL)
+    return FALSE;
+
+  clear_tip (frames);
+  
+  control = get_control (frames, frame, event->x, event->y);
+
+  if (control == META_FRAME_CONTROL_TITLE &&
+          event->direction == 0 || event->direction == 1)
+  {
+      MetaFrameFlags flags;
+      flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
+            
+      if (flags & META_FRAME_ALLOWS_SHADE)
+      {
+        /* vladimir owes nall some beer from OR ;) */
+        if (event->direction == 1)
+          meta_core_unshade (gdk_display,
+                             frame->xwindow);
+        else
+          meta_core_shade (gdk_display,
+                           frame->xwindow);
+      }
+      return(TRUE);
+  }
+  return(FALSE);
+}
+
 static GdkRectangle*
 control_rect (MetaFrameControl control,
               MetaFrameGeometry *fgeom)
