How do I apply this patch?



Hi all, I'm trying to apply this patch I downloaded from bugzilla, and I have no clue how to do it. It's called "gnome-panel-phantom-window.diff"... Can someone point me in the right direction? (the patch is shown below:)

Thanks,
Ben Davis


-------------------------------------------------------------

? title
Index: window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.266
diff -p -u -r1.266 window.c
--- window.c    23 Feb 2003 17:09:46 -0000    1.266
+++ window.c    23 Feb 2003 19:21:24 -0000
@@ -2178,7 +2178,9 @@ meta_window_move_resize_internal (MetaWi
   */
  int client_move_x;
  int client_move_y;
- + const MetaXineramaScreenInfo *old_xsi;
+  const MetaXineramaScreenInfo *new_xsi;
+
  is_configure_request = (flags & META_IS_CONFIGURE_REQUEST) != 0;
  do_gravity_adjust = (flags & META_DO_GRAVITY_ADJUST) != 0;
  is_user_action = (flags & META_USER_MOVE_RESIZE) != 0;
@@ -2186,6 +2188,9 @@ meta_window_move_resize_internal (MetaWi
  /* We don't need it in the idle queue anymore. */
meta_window_unqueue_move_resize (window);
+  /* see which xinerama the window is on to begin */
+  old_xsi = meta_screen_get_xinerama_for_window(window->screen, window);
+
  {
    int oldx, oldy;
    meta_window_get_position (window, &oldx, &oldy);
@@ -2196,7 +2201,7 @@ meta_window_move_resize_internal (MetaWi
                is_user_action ? " (user move/resize)" : "",
                oldx, oldy, window->rect.width, window->rect.height);
  }
- +
  if (window->frame)
    meta_frame_calc_geometry (window->frame,
                              &fgeom);
@@ -2562,6 +2567,13 @@ meta_window_move_resize_internal (MetaWi
  else
    {
      meta_topic (META_DEBUG_GEOMETRY, "Size/position not modified\n");
+    }
+
+  /* invalidate work areas if strut window changes xinerama */
+  new_xsi = meta_screen_get_xinerama_for_window(window->screen, window);
+  if ((new_xsi != old_xsi) && (window->has_struts))
+    {
+      invalidate_work_areas(window);
    }
/* Update struts for new window size */
Index: workspace.c
===================================================================
RCS file: /cvs/gnome/metacity/src/workspace.c,v
retrieving revision 1.42
diff -p -u -r1.42 workspace.c
--- workspace.c    23 Feb 2003 17:09:46 -0000    1.42
+++ workspace.c    23 Feb 2003 19:21:25 -0000
@@ -389,6 +389,9 @@ ensure_work_areas_validated (MetaWorkspa
                          left_strut, right_strut,
                          top_strut, bottom_strut);

+              /* we subtract off the x_origin and y_origin of the xinerama
+               * to get the effective struts for this xinerama
+               */
              left_strut = MAX (left_strut,
                                w->left_strut -
workspace->screen->xinerama_infos[i].x_origin);
@@ -434,9 +437,8 @@ ensure_work_areas_validated (MetaWorkspa
          bottom_strut = top_strut;
        }

-      /* FIXME even if we take struts to apply only to xineramas
-       * that the strut-specifying window overlaps, is it right
-       * to make the struts *relative to* the xinerama?
+      /* We need to add back in the x_origin and y_origin of the xinerama
+       * since we subtracted it off before.
       */
      workspace->work_areas[i].x =
        left_strut + workspace->screen->xinerama_infos[i].x_origin;
@@ -491,19 +493,6 @@ ensure_work_areas_validated (MetaWorkspa
  workspace->all_work_areas.height =
    workspace->screen->height - all_top_strut - all_bottom_strut;

-  /* FIXME Here we disable all the per-xinerama work done earlier,
-   * because we don't have a spec for how it should work yet.
-   * If we do rely on which windows overlap what, work areas
-   * will need to be invalidated when we change a strut-setting
-   * window's size/position in move_resize_internal
-   */
-  i = 0;
-  while (i < workspace->screen->n_xinerama_infos)
-    {
-      workspace->work_areas[i] = workspace->all_work_areas;
-      ++i;
-    }
- workspace->work_areas_invalid = FALSE;

  meta_topic (META_DEBUG_WORKAREA,





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]