mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
*** empty log message ***
This commit is contained in:
parent
d75c170fef
commit
28aeacb247
@ -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>
|
2006-03-28 Elijah Newren <newren gmail com>
|
||||||
|
|
||||||
* MAINTAINERS: New file. #335026. ;-)
|
* MAINTAINERS: New file. #335026. ;-)
|
||||||
|
@ -41,10 +41,7 @@ struct _MetaResizePopup
|
|||||||
gboolean showing;
|
gboolean showing;
|
||||||
|
|
||||||
int resize_gravity;
|
int resize_gravity;
|
||||||
int x;
|
MetaRectangle rect;
|
||||||
int y;
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
int width_inc;
|
int width_inc;
|
||||||
int height_inc;
|
int height_inc;
|
||||||
int min_width;
|
int min_width;
|
||||||
@ -133,8 +130,8 @@ update_size_window (MetaResizePopup *popup)
|
|||||||
|
|
||||||
gtk_window_get_size (GTK_WINDOW (popup->size_window), &width, &height);
|
gtk_window_get_size (GTK_WINDOW (popup->size_window), &width, &height);
|
||||||
|
|
||||||
x = popup->x + (popup->width - width) / 2;
|
x = popup->rect.x + (popup->rect.width - width) / 2;
|
||||||
y = popup->y + (popup->height - height) / 2;
|
y = popup->rect.y + (popup->rect.height - height) / 2;
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (popup->size_window))
|
if (GTK_WIDGET_REALIZED (popup->size_window))
|
||||||
{
|
{
|
||||||
@ -171,10 +168,7 @@ sync_showing (MetaResizePopup *popup)
|
|||||||
void
|
void
|
||||||
meta_ui_resize_popup_set (MetaResizePopup *popup,
|
meta_ui_resize_popup_set (MetaResizePopup *popup,
|
||||||
int resize_gravity,
|
int resize_gravity,
|
||||||
int x,
|
MetaRectangle rect,
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height,
|
|
||||||
int base_width,
|
int base_width,
|
||||||
int base_height,
|
int base_height,
|
||||||
int min_width,
|
int min_width,
|
||||||
@ -193,27 +187,21 @@ meta_ui_resize_popup_set (MetaResizePopup *popup,
|
|||||||
|
|
||||||
need_update_size = FALSE;
|
need_update_size = FALSE;
|
||||||
|
|
||||||
display_w = width - base_width;
|
display_w = rect.width - base_width;
|
||||||
if (width_inc > 0)
|
if (width_inc > 0)
|
||||||
display_w /= width_inc;
|
display_w /= width_inc;
|
||||||
|
|
||||||
display_h = height - base_height;
|
display_h = rect.height - base_height;
|
||||||
if (height_inc > 0)
|
if (height_inc > 0)
|
||||||
display_h /= height_inc;
|
display_h /= height_inc;
|
||||||
|
|
||||||
if (popup->x != x ||
|
if (!meta_rectangle_equal(&popup->rect, &rect) ||
|
||||||
popup->y != y ||
|
|
||||||
popup->width != width ||
|
|
||||||
popup->height != height ||
|
|
||||||
display_w != popup->horizontal_size ||
|
display_w != popup->horizontal_size ||
|
||||||
display_h != popup->vertical_size)
|
display_h != popup->vertical_size)
|
||||||
need_update_size = TRUE;
|
need_update_size = TRUE;
|
||||||
|
|
||||||
popup->resize_gravity = resize_gravity;
|
popup->resize_gravity = resize_gravity;
|
||||||
popup->x = x;
|
popup->rect = rect;
|
||||||
popup->y = y;
|
|
||||||
popup->width = width;
|
|
||||||
popup->height = height;
|
|
||||||
popup->min_width = min_width;
|
popup->min_width = min_width;
|
||||||
popup->min_height = min_height;
|
popup->min_height = min_height;
|
||||||
popup->width_inc = width_inc;
|
popup->width_inc = width_inc;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#define META_RESIZEPOPUP_H
|
#define META_RESIZEPOPUP_H
|
||||||
|
|
||||||
/* Don't include gtk.h or gdk.h here */
|
/* Don't include gtk.h or gdk.h here */
|
||||||
|
#include "boxes.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <glib.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_free (MetaResizePopup *popup);
|
||||||
void meta_ui_resize_popup_set (MetaResizePopup *popup,
|
void meta_ui_resize_popup_set (MetaResizePopup *popup,
|
||||||
int resize_gravity,
|
int resize_gravity,
|
||||||
int x,
|
MetaRectangle rect,
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height,
|
|
||||||
int base_width,
|
int base_width,
|
||||||
int base_height,
|
int base_height,
|
||||||
int min_width,
|
int min_width,
|
||||||
|
16
src/window.c
16
src/window.c
@ -7197,7 +7197,7 @@ meta_window_refresh_resize_popup (MetaWindow *window)
|
|||||||
if (window->display->grab_resize_popup != NULL)
|
if (window->display->grab_resize_popup != NULL)
|
||||||
{
|
{
|
||||||
int gravity;
|
int gravity;
|
||||||
int x, y, width, height;
|
MetaRectangle rect;
|
||||||
MetaFrameGeometry fgeom;
|
MetaFrameGeometry fgeom;
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
@ -7215,22 +7215,18 @@ meta_window_refresh_resize_popup (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->display->grab_wireframe_active)
|
if (window->display->grab_wireframe_active)
|
||||||
{
|
{
|
||||||
x = window->display->grab_wireframe_rect.x;
|
rect = window->display->grab_wireframe_rect;
|
||||||
y = window->display->grab_wireframe_rect.y;
|
|
||||||
width = window->display->grab_wireframe_rect.width;
|
|
||||||
height = window->display->grab_wireframe_rect.height;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_window_get_position (window, &x, &y);
|
meta_window_get_position (window, &rect.x, &rect.y);
|
||||||
width = window->rect.width;
|
rect.width = window->rect.width;
|
||||||
height = window->rect.height;
|
rect.height = window->rect.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_ui_resize_popup_set (window->display->grab_resize_popup,
|
meta_ui_resize_popup_set (window->display->grab_resize_popup,
|
||||||
gravity,
|
gravity,
|
||||||
x, y,
|
rect,
|
||||||
width, height,
|
|
||||||
window->size_hints.base_width,
|
window->size_hints.base_width,
|
||||||
window->size_hints.base_height,
|
window->size_hints.base_height,
|
||||||
window->size_hints.min_width,
|
window->size_hints.min_width,
|
||||||
|
Loading…
Reference in New Issue
Block a user