*** empty log message ***

This commit is contained in:
Björn Lindqvist 2006-03-29 16:05:23 +00:00
parent d75c170fef
commit 28aeacb247
4 changed files with 27 additions and 36 deletions

View File

@ -1,3 +1,12 @@
2006-03-29 Björn Lindqvist <bjourne@gmail.com>
* src/resizepopup.c:
* src/resizepopup.h:
* src/window.c (meta_window_refresh_resize_popup):
Aggregate the x, y, width and height attributes of MetaResizePopup
to one MetaRectangle rect attribute and update code using the
MetaResizePopup struct. Fixes #335177.
2006-03-28 Elijah Newren <newren gmail com>
* MAINTAINERS: New file. #335026. ;-)

View File

@ -41,10 +41,7 @@ struct _MetaResizePopup
gboolean showing;
int resize_gravity;
int x;
int y;
int width;
int height;
MetaRectangle rect;
int width_inc;
int height_inc;
int min_width;
@ -133,8 +130,8 @@ update_size_window (MetaResizePopup *popup)
gtk_window_get_size (GTK_WINDOW (popup->size_window), &width, &height);
x = popup->x + (popup->width - width) / 2;
y = popup->y + (popup->height - height) / 2;
x = popup->rect.x + (popup->rect.width - width) / 2;
y = popup->rect.y + (popup->rect.height - height) / 2;
if (GTK_WIDGET_REALIZED (popup->size_window))
{
@ -171,10 +168,7 @@ sync_showing (MetaResizePopup *popup)
void
meta_ui_resize_popup_set (MetaResizePopup *popup,
int resize_gravity,
int x,
int y,
int width,
int height,
MetaRectangle rect,
int base_width,
int base_height,
int min_width,
@ -193,27 +187,21 @@ meta_ui_resize_popup_set (MetaResizePopup *popup,
need_update_size = FALSE;
display_w = width - base_width;
display_w = rect.width - base_width;
if (width_inc > 0)
display_w /= width_inc;
display_h = height - base_height;
display_h = rect.height - base_height;
if (height_inc > 0)
display_h /= height_inc;
if (popup->x != x ||
popup->y != y ||
popup->width != width ||
popup->height != height ||
if (!meta_rectangle_equal(&popup->rect, &rect) ||
display_w != popup->horizontal_size ||
display_h != popup->vertical_size)
need_update_size = TRUE;
popup->resize_gravity = resize_gravity;
popup->x = x;
popup->y = y;
popup->width = width;
popup->height = height;
popup->rect = rect;
popup->min_width = min_width;
popup->min_height = min_height;
popup->width_inc = width_inc;

View File

@ -23,6 +23,7 @@
#define META_RESIZEPOPUP_H
/* Don't include gtk.h or gdk.h here */
#include "boxes.h"
#include "common.h"
#include <X11/Xlib.h>
#include <glib.h>
@ -33,10 +34,7 @@ MetaResizePopup* meta_ui_resize_popup_new (Display *display,
void meta_ui_resize_popup_free (MetaResizePopup *popup);
void meta_ui_resize_popup_set (MetaResizePopup *popup,
int resize_gravity,
int x,
int y,
int width,
int height,
MetaRectangle rect,
int base_width,
int base_height,
int min_width,

View File

@ -4333,7 +4333,7 @@ meta_window_client_message (MetaWindow *window,
MetaDisplay *display;
display = window->display;
if (event->xclient.message_type ==
display->atom_net_close_window)
{
@ -7197,7 +7197,7 @@ meta_window_refresh_resize_popup (MetaWindow *window)
if (window->display->grab_resize_popup != NULL)
{
int gravity;
int x, y, width, height;
MetaRectangle rect;
MetaFrameGeometry fgeom;
if (window->frame)
@ -7215,22 +7215,18 @@ meta_window_refresh_resize_popup (MetaWindow *window)
if (window->display->grab_wireframe_active)
{
x = window->display->grab_wireframe_rect.x;
y = window->display->grab_wireframe_rect.y;
width = window->display->grab_wireframe_rect.width;
height = window->display->grab_wireframe_rect.height;
rect = window->display->grab_wireframe_rect;
}
else
{
meta_window_get_position (window, &x, &y);
width = window->rect.width;
height = window->rect.height;
meta_window_get_position (window, &rect.x, &rect.y);
rect.width = window->rect.width;
rect.height = window->rect.height;
}
meta_ui_resize_popup_set (window->display->grab_resize_popup,
gravity,
x, y,
width, height,
rect,
window->size_hints.base_width,
window->size_hints.base_height,
window->size_hints.min_width,