Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 704532 | Differences between
and this patch

Collapse All | Expand All

(-)a/ChangeLog (-1 / +1 lines)
Lines 13015-13021 Mon Jun 3 15:12:11 2002 HideToshi Tajima <hidetoshi.tajima@sun.com> Link Here
13015
13015
13016
        Patch from Erwann Chenede for raise_or_lower keybinding
13016
        Patch from Erwann Chenede for raise_or_lower keybinding
13017
	
13017
	
13018
	* src/display.c, src/common.h: POINT_IN_RECT moved to a common
13018
	* src/display.c, src/common.h: META_POINT_IN_RECT moved to a common
13019
	location, removed from here
13019
	location, removed from here
13020
	(meta_rectangle_intersect): move here and make it public
13020
	(meta_rectangle_intersect): move here and make it public
13021
13021
(-)a/src/Makefile.am (-1 / +2 lines)
Lines 142-147 libmuffin_la_SOURCES = \ Link Here
142
	core/stack-tracker.h			\
142
	core/stack-tracker.h			\
143
	core/util.c				\
143
	core/util.c				\
144
	meta/util.h				\
144
	meta/util.h				\
145
	meta/util-private.h		\
145
	core/window-props.c			\
146
	core/window-props.c			\
146
	core/window-props.h			\
147
	core/window-props.h			\
147
	core/window.c				\
148
	core/window.c				\
Lines 281-287 Meta-$(api_version).gir: libmuffin.la Link Here
281
	muffin-enum-types.h			\
282
	muffin-enum-types.h			\
282
	$(libmuffininclude_base_headers)	\
283
	$(libmuffininclude_base_headers)	\
283
	$(filter %.c,$(libmuffin_la_SOURCES))
284
	$(filter %.c,$(libmuffin_la_SOURCES))
284
@META_GIR@_SCANNERFLAGS = $(WARN_SCANNERFLAGS) --warn-all --warn-error
285
@META_GIR@_SCANNERFLAGS = $(WARN_SCANNERFLAGS) --warn-all --warn-error --identifier-prefix=Meta
285
286
286
endif
287
endif
287
288
(-)a/src/compositor/compositor.c (+1 lines)
Lines 74-79 Link Here
74
#include "meta-background-actor-private.h"
74
#include "meta-background-actor-private.h"
75
#include "window-private.h" /* to check window->hidden */
75
#include "window-private.h" /* to check window->hidden */
76
#include "display-private.h" /* for meta_display_lookup_x_window() */
76
#include "display-private.h" /* for meta_display_lookup_x_window() */
77
#include "util-private.h"
77
#include <X11/extensions/shape.h>
78
#include <X11/extensions/shape.h>
78
#include <X11/extensions/Xcomposite.h>
79
#include <X11/extensions/Xcomposite.h>
79
#include "meta-sync-ring.h"
80
#include "meta-sync-ring.h"
(-)a/src/compositor/meta-background.c (+1 lines)
Lines 28-33 Link Here
28
#include <clutter/clutter.h>
28
#include <clutter/clutter.h>
29
#include "cogl-utils.h"
29
#include "cogl-utils.h"
30
#include <meta/errors.h>
30
#include <meta/errors.h>
31
// #include "util-private.h"
31
#include "meta-background-actor-private.h"
32
#include "meta-background-actor-private.h"
32
33
33
struct _MetaBackgroundPrivate
34
struct _MetaBackgroundPrivate
(-)a/src/compositor/plugins/default.c (-5 / +3 lines)
Lines 20-33 Link Here
20
 * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
20
 * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
21
 * 02110-1335, USA.
21
 * 02110-1335, USA.
22
 */
22
 */
23
23
#include <config.h>
24
#include <meta/meta-plugin.h>
24
#include <meta/meta-plugin.h>
25
#include <meta/window.h>
25
#include <meta/window.h>
26
26
27
#include <libintl.h>
27
#include <meta/util.h>
28
#define _(x) dgettext (GETTEXT_PACKAGE, x)
28
#include <glib/gi18n-lib.h>
29
#define N_(x) x
30
31
#include <clutter/clutter.h>
29
#include <clutter/clutter.h>
32
#include <gmodule.h>
30
#include <gmodule.h>
33
#include <string.h>
31
#include <string.h>
(-)a/src/core/core.c (+1 lines)
Lines 29-34 Link Here
29
#include "workspace-private.h"
29
#include "workspace-private.h"
30
#include <meta/prefs.h>
30
#include <meta/prefs.h>
31
#include <meta/errors.h>
31
#include <meta/errors.h>
32
#include "util-private.h"
32
33
33
/* Looks up the MetaWindow representing the frame of the given X window.
34
/* Looks up the MetaWindow representing the frame of the given X window.
34
 * Used as a helper function by a bunch of the functions below.
35
 * Used as a helper function by a bunch of the functions below.
(-)a/src/core/delete.c (-1 / +1 lines)
Lines 25-31 Link Here
25
#define _XOPEN_SOURCE /* for kill() */
25
#define _XOPEN_SOURCE /* for kill() */
26
26
27
#include <config.h>
27
#include <config.h>
28
#include <meta/util.h>
28
#include "util-private.h"
29
#include "window-private.h"
29
#include "window-private.h"
30
#include <meta/errors.h>
30
#include <meta/errors.h>
31
#include <meta/workspace.h>
31
#include <meta/workspace.h>
(-)a/src/core/display.c (-2 / +2 lines)
Lines 1568-1575 window_raise_with_delay_callback (void *data) Link Here
1568
      meta_error_trap_pop (window->display);
1568
      meta_error_trap_pop (window->display);
1569
1569
1570
      point_in_window =
1570
      point_in_window =
1571
        (window->frame && POINT_IN_RECT (root_x, root_y, window->frame->rect)) ||
1571
        (window->frame && META_POINT_IN_RECT (root_x, root_y, window->frame->rect)) ||
1572
        (window->frame == NULL && POINT_IN_RECT (root_x, root_y, window->rect));
1572
        (window->frame == NULL && META_POINT_IN_RECT (root_x, root_y, window->rect));
1573
      if (same_screen && point_in_window)
1573
      if (same_screen && point_in_window)
1574
	meta_window_raise (window);
1574
	meta_window_raise (window);
1575
#ifdef WITH_VERBOSE_MODE
1575
#ifdef WITH_VERBOSE_MODE
(-)a/src/core/keybindings.c (-1 / +1 lines)
Lines 44-50 Link Here
44
#include "frame.h"
44
#include "frame.h"
45
#include "place.h"
45
#include "place.h"
46
#include <meta/prefs.h>
46
#include <meta/prefs.h>
47
#include <meta/util.h>
47
#include "util-private.h"
48
48
49
#include <X11/keysym.h>
49
#include <X11/keysym.h>
50
#include <string.h>
50
#include <string.h>
(-)a/src/core/main.c (-1 / +1 lines)
Lines 49-55 Link Here
49
49
50
#include <config.h>
50
#include <config.h>
51
#include <meta/main.h>
51
#include <meta/main.h>
52
#include <meta/util.h>
52
#include "util-private.h"
53
#include "display-private.h"
53
#include "display-private.h"
54
#include <meta/errors.h>
54
#include <meta/errors.h>
55
#include "ui.h"
55
#include "ui.h"
(-)a/src/core/muffin.c (+1 lines)
Lines 26-31 Link Here
26
#include <meta/main.h>
26
#include <meta/main.h>
27
#include <meta/util.h>
27
#include <meta/util.h>
28
#include "meta-plugin-manager.h"
28
#include "meta-plugin-manager.h"
29
#include <glib/gi18n-lib.h>
29
30
30
#include <glib.h>
31
#include <glib.h>
31
32
(-)a/src/core/prefs.c (-1 / +1 lines)
Lines 33-39 Link Here
33
#include <config.h>
33
#include <config.h>
34
#include <meta/prefs.h>
34
#include <meta/prefs.h>
35
#include "ui.h"
35
#include "ui.h"
36
#include <meta/util.h>
36
#include "util-private.h"
37
#include "meta-plugin-manager.h"
37
#include "meta-plugin-manager.h"
38
#include <glib.h>
38
#include <glib.h>
39
#include <gio/gio.h>
39
#include <gio/gio.h>
(-)a/src/core/screen.c (-1 / +1 lines)
Lines 33-39 Link Here
33
#include <config.h>
33
#include <config.h>
34
#include "screen-private.h"
34
#include "screen-private.h"
35
#include <meta/main.h>
35
#include <meta/main.h>
36
#include <meta/util.h>
36
#include "util-private.h"
37
#include <meta/errors.h>
37
#include <meta/errors.h>
38
#include "window-private.h"
38
#include "window-private.h"
39
#include "frame.h"
39
#include "frame.h"
(-)a/src/core/session.c (+1 lines)
Lines 25-30 Link Here
25
25
26
#include <config.h>
26
#include <config.h>
27
27
28
#include "util-private.h"
28
#include "session.h"
29
#include "session.h"
29
#include <X11/Xatom.h>
30
#include <X11/Xatom.h>
30
31
(-)a/src/core/stack.c (-1 / +1 lines)
Lines 1424-1430 window_contains_point (MetaWindow *window, Link Here
1424
1424
1425
  meta_window_get_outer_rect (window, &rect);
1425
  meta_window_get_outer_rect (window, &rect);
1426
1426
1427
  return POINT_IN_RECT (root_x, root_y, rect);
1427
  return META_POINT_IN_RECT (root_x, root_y, rect);
1428
}
1428
}
1429
1429
1430
static MetaWindow*
1430
static MetaWindow*
(-)a/src/core/util-private.h (+36 lines)
Line 0 Link Here
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
3
/* Mutter utilities */
4
5
/* 
6
 * Copyright (C) 2001 Havoc Pennington
7
 * Copyright (C) 2005 Elijah Newren
8
 * 
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License as
11
 * published by the Free Software Foundation; either version 2 of the
12
 * License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful, but
15
 * WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 * General Public License for more details.
18
 * 
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22
 * 02111-1307, USA.
23
 */
24
25
#ifndef META_UTIL_PRIVATE_H
26
#define META_UTIL_PRIVATE_H
27
28
#include <meta/util.h>
29
#include <glib/gi18n-lib.h>
30
31
void     meta_set_verbose (gboolean setting);
32
void     meta_set_debugging (gboolean setting);
33
void     meta_set_syncing (gboolean setting);
34
void     meta_set_replace_current_wm (gboolean setting);
35
36
#endif
(-)a/src/core/util.c (-1 / +1 lines)
Lines 35-41 Link Here
35
35
36
#include <config.h>
36
#include <config.h>
37
#include <meta/common.h>
37
#include <meta/common.h>
38
#include <meta/util.h>
38
#include "util-private.h"
39
#include <meta/main.h>
39
#include <meta/main.h>
40
40
41
#include <clutter/clutter.h> /* For clutter_threads_add_repaint_func() */
41
#include <clutter/clutter.h> /* For clutter_threads_add_repaint_func() */
(-)a/src/core/window-props.c (+1 lines)
Lines 50-55 Link Here
50
#include <X11/Xatom.h>
50
#include <X11/Xatom.h>
51
#include <unistd.h>
51
#include <unistd.h>
52
#include <string.h>
52
#include <string.h>
53
#include "util-private.h"
53
#ifndef HOST_NAME_MAX
54
#ifndef HOST_NAME_MAX
54
/* Solaris headers apparently don't define this so do so manually; #326745 */
55
/* Solaris headers apparently don't define this so do so manually; #326745 */
55
#define HOST_NAME_MAX 255
56
#define HOST_NAME_MAX 255
(-)a/src/core/window.c (-1 / +1 lines)
Lines 32-38 Link Here
32
#include "window-private.h"
32
#include "window-private.h"
33
#include "boxes-private.h"
33
#include "boxes-private.h"
34
#include "edge-resistance.h"
34
#include "edge-resistance.h"
35
#include <meta/util.h>
35
#include "util-private.h"
36
#include "frame.h"
36
#include "frame.h"
37
#include <meta/errors.h>
37
#include <meta/errors.h>
38
#include "workspace-private.h"
38
#include "workspace-private.h"
(-)a/src/core/xprops.c (-1 / +1 lines)
Lines 83-89 from The Open Group. Link Here
83
#include <config.h>
83
#include <config.h>
84
#include "xprops.h"
84
#include "xprops.h"
85
#include <meta/errors.h>
85
#include <meta/errors.h>
86
#include <meta/util.h>
86
#include "util-private.h"
87
#include "async-getprop.h"
87
#include "async-getprop.h"
88
#include "ui.h"
88
#include "ui.h"
89
#include "muffin-Xatomtype.h"
89
#include "muffin-Xatomtype.h"
(-)a/src/meta/common.h (-1 / +1 lines)
Lines 398-404 void meta_frame_borders_clear (MetaFrameBorders *self); Link Here
398
398
399
/************************************************************/
399
/************************************************************/
400
400
401
#define POINT_IN_RECT(xcoord, ycoord, rect) \
401
#define META_POINT_IN_RECT(xcoord, ycoord, rect) \
402
 ((xcoord) >= (rect).x &&                   \
402
 ((xcoord) >= (rect).x &&                   \
403
  (xcoord) <  ((rect).x + (rect).width) &&  \
403
  (xcoord) <  ((rect).x + (rect).width) &&  \
404
  (ycoord) >= (rect).y &&                   \
404
  (ycoord) >= (rect).y &&                   \
(-)a/src/meta/util.h (-5 lines)
Lines 31-42 Link Here
31
#include <meta/common.h>
31
#include <meta/common.h>
32
32
33
gboolean meta_is_verbose  (void);
33
gboolean meta_is_verbose  (void);
34
void     meta_set_verbose (gboolean setting);
35
gboolean meta_is_debugging (void);
34
gboolean meta_is_debugging (void);
36
void     meta_set_debugging (gboolean setting);
37
gboolean meta_is_syncing (void);
35
gboolean meta_is_syncing (void);
38
void     meta_set_syncing (gboolean setting);
39
void     meta_set_replace_current_wm (gboolean setting);
40
36
41
void meta_debug_spew_real (const char *format,
37
void meta_debug_spew_real (const char *format,
42
                           ...) G_GNUC_PRINTF (1, 2);
38
                           ...) G_GNUC_PRINTF (1, 2);
Lines 97-103 const char* meta_gravity_to_string (int gravity); Link Here
97
93
98
#include <libintl.h>
94
#include <libintl.h>
99
#define _(x) dgettext (GETTEXT_PACKAGE, x)
95
#define _(x) dgettext (GETTEXT_PACKAGE, x)
100
#define N_(x) x
101
96
102
char* meta_g_utf8_strndup (const gchar *src, gsize n);
97
char* meta_g_utf8_strndup (const gchar *src, gsize n);
103
98
(-)a/src/ui/frames.c (-12 / +12 lines)
Lines 2495-2510 get_control (MetaFrames *frames, Link Here
2495
  meta_frames_calc_geometry (frames, frame, &fgeom);
2495
  meta_frames_calc_geometry (frames, frame, &fgeom);
2496
  get_client_rect (&fgeom, fgeom.width, fgeom.height, &client);
2496
  get_client_rect (&fgeom, fgeom.width, fgeom.height, &client);
2497
2497
2498
  if (POINT_IN_RECT (x, y, client))
2498
  if (META_POINT_IN_RECT (x, y, client))
2499
    return META_FRAME_CONTROL_CLIENT_AREA;
2499
    return META_FRAME_CONTROL_CLIENT_AREA;
2500
  
2500
  
2501
  if (POINT_IN_RECT (x, y, fgeom.close_rect.clickable))
2501
  if (META_POINT_IN_RECT (x, y, fgeom.close_rect.clickable))
2502
    return META_FRAME_CONTROL_DELETE;
2502
    return META_FRAME_CONTROL_DELETE;
2503
2503
2504
  if (POINT_IN_RECT (x, y, fgeom.min_rect.clickable))
2504
  if (META_POINT_IN_RECT (x, y, fgeom.min_rect.clickable))
2505
    return META_FRAME_CONTROL_MINIMIZE;
2505
    return META_FRAME_CONTROL_MINIMIZE;
2506
2506
2507
  if (POINT_IN_RECT (x, y, fgeom.menu_rect.clickable))
2507
  if (META_POINT_IN_RECT (x, y, fgeom.menu_rect.clickable))
2508
    return META_FRAME_CONTROL_MENU;
2508
    return META_FRAME_CONTROL_MENU;
2509
2509
2510
  meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
2510
  meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
Lines 2521-2527 get_control (MetaFrames *frames, Link Here
2521
  has_right = (flags & META_FRAME_ALLOWS_RIGHT_RESIZE) != 0;
2521
  has_right = (flags & META_FRAME_ALLOWS_RIGHT_RESIZE) != 0;
2522
  has_bottom = (flags & META_FRAME_ALLOWS_BOTTOM_RESIZE) != 0;
2522
  has_bottom = (flags & META_FRAME_ALLOWS_BOTTOM_RESIZE) != 0;
2523
2523
2524
  if (POINT_IN_RECT (x, y, fgeom.title_rect))
2524
  if (META_POINT_IN_RECT (x, y, fgeom.title_rect))
2525
    {
2525
    {
2526
      if (has_vert && y <= TOP_RESIZE_HEIGHT && has_north_resize)
2526
      if (has_vert && y <= TOP_RESIZE_HEIGHT && has_north_resize)
2527
        return META_FRAME_CONTROL_RESIZE_N;
2527
        return META_FRAME_CONTROL_RESIZE_N;
Lines 2529-2535 get_control (MetaFrames *frames, Link Here
2529
        return META_FRAME_CONTROL_TITLE;
2529
        return META_FRAME_CONTROL_TITLE;
2530
    }
2530
    }
2531
2531
2532
  if (POINT_IN_RECT (x, y, fgeom.max_rect.clickable))
2532
  if (META_POINT_IN_RECT (x, y, fgeom.max_rect.clickable))
2533
    {
2533
    {
2534
      if (flags & META_FRAME_MAXIMIZED &&
2534
      if (flags & META_FRAME_MAXIMIZED &&
2535
          (META_WINDOW_TILED_TOP (window) ||
2535
          (META_WINDOW_TILED_TOP (window) ||
Lines 2542-2573 get_control (MetaFrames *frames, Link Here
2542
        return META_FRAME_CONTROL_MAXIMIZE;
2542
        return META_FRAME_CONTROL_MAXIMIZE;
2543
    }
2543
    }
2544
      
2544
      
2545
  if (POINT_IN_RECT (x, y, fgeom.shade_rect.clickable))
2545
  if (META_POINT_IN_RECT (x, y, fgeom.shade_rect.clickable))
2546
    {
2546
    {
2547
      return META_FRAME_CONTROL_SHADE;
2547
      return META_FRAME_CONTROL_SHADE;
2548
    }
2548
    }
2549
2549
2550
  if (POINT_IN_RECT (x, y, fgeom.unshade_rect.clickable))
2550
  if (META_POINT_IN_RECT (x, y, fgeom.unshade_rect.clickable))
2551
    {
2551
    {
2552
      return META_FRAME_CONTROL_UNSHADE;
2552
      return META_FRAME_CONTROL_UNSHADE;
2553
    }
2553
    }
2554
2554
2555
  if (POINT_IN_RECT (x, y, fgeom.above_rect.clickable))
2555
  if (META_POINT_IN_RECT (x, y, fgeom.above_rect.clickable))
2556
    {
2556
    {
2557
      return META_FRAME_CONTROL_ABOVE;
2557
      return META_FRAME_CONTROL_ABOVE;
2558
    }
2558
    }
2559
2559
2560
  if (POINT_IN_RECT (x, y, fgeom.unabove_rect.clickable))
2560
  if (META_POINT_IN_RECT (x, y, fgeom.unabove_rect.clickable))
2561
    {
2561
    {
2562
      return META_FRAME_CONTROL_UNABOVE;
2562
      return META_FRAME_CONTROL_UNABOVE;
2563
    }
2563
    }
2564
2564
2565
  if (POINT_IN_RECT (x, y, fgeom.stick_rect.clickable))
2565
  if (META_POINT_IN_RECT (x, y, fgeom.stick_rect.clickable))
2566
    {
2566
    {
2567
      return META_FRAME_CONTROL_STICK;
2567
      return META_FRAME_CONTROL_STICK;
2568
    }
2568
    }
2569
2569
2570
  if (POINT_IN_RECT (x, y, fgeom.unstick_rect.clickable))
2570
  if (META_POINT_IN_RECT (x, y, fgeom.unstick_rect.clickable))
2571
    {
2571
    {
2572
      return META_FRAME_CONTROL_UNSTICK;
2572
      return META_FRAME_CONTROL_UNSTICK;
2573
    }
2573
    }
(-)a/src/ui/menu.c (-1 / +1 lines)
Lines 28-34 Link Here
28
#include <string.h>
28
#include <string.h>
29
#include "menu.h"
29
#include "menu.h"
30
#include <meta/main.h>
30
#include <meta/main.h>
31
#include <meta/util.h>
31
#include "util-private.h"
32
#include "core.h"
32
#include "core.h"
33
#include "metaaccellabel.h"
33
#include "metaaccellabel.h"
34
#include "ui.h"
34
#include "ui.h"
(-)a/src/ui/metaaccellabel.c (-1 / +1 lines)
Lines 35-41 Link Here
35
#include "metaaccellabel.h"
35
#include "metaaccellabel.h"
36
#include <gtk/gtk.h>
36
#include <gtk/gtk.h>
37
#include <string.h>
37
#include <string.h>
38
#include <meta/util.h>
38
#include "util-private.h"
39
39
40
static void     meta_accel_label_destroy      (GtkWidget           *object);
40
static void     meta_accel_label_destroy      (GtkWidget           *object);
41
static void     meta_accel_label_finalize     (GObject             *object);
41
static void     meta_accel_label_finalize     (GObject             *object);
(-)a/src/ui/resizepopup.c (-1 / +1 lines)
Lines 23-29 Link Here
23
23
24
#include <config.h>
24
#include <config.h>
25
#include "resizepopup.h"
25
#include "resizepopup.h"
26
#include <meta/util.h>
26
#include "util-private.h"
27
#include <gtk/gtk.h>
27
#include <gtk/gtk.h>
28
#include <gdk/gdkx.h>
28
#include <gdk/gdkx.h>
29
29
(-)a/src/ui/theme-parser.c (-1 / +1 lines)
Lines 23-29 Link Here
23
23
24
#include <config.h>
24
#include <config.h>
25
#include "theme-private.h"
25
#include "theme-private.h"
26
#include <meta/util.h>
26
#include "util-private.h"
27
#include <meta/prefs.h>
27
#include <meta/prefs.h>
28
#include <string.h>
28
#include <string.h>
29
#include <stdlib.h>
29
#include <stdlib.h>
(-)a/src/ui/theme.c (-1 / +1 lines)
Lines 55-61 Link Here
55
55
56
#include <config.h>
56
#include <config.h>
57
#include "theme-private.h"
57
#include "theme-private.h"
58
#include <meta/util.h>
58
#include "util-private.h"
59
#include <meta/gradient.h>
59
#include <meta/gradient.h>
60
#include <meta/prefs.h>
60
#include <meta/prefs.h>
61
#include <gtk/gtk.h>
61
#include <gtk/gtk.h>

Return to bug 704532