chop out the portion of the region that's outside the screen.
2002-05-04 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_paint_to_drawable): chop out the portion of the region that's outside the screen. * src/core.c (meta_core_get_screen_size): new function (meta_core_get_frame_extents): new function
This commit is contained in:

committed by
Havoc Pennington

parent
7fbbd0200f
commit
6f8a7f1870
49
src/core.c
49
src/core.c
@@ -451,6 +451,34 @@ meta_core_get_frame_workspace (Display *xdisplay,
|
||||
return meta_window_get_net_wm_desktop (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_frame_extents (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
if (x)
|
||||
*x = window->frame->rect.x;
|
||||
if (y)
|
||||
*y = window->frame->rect.y;
|
||||
if (width)
|
||||
*width = window->frame->rect.width;
|
||||
if (height)
|
||||
*height = window->frame->rect.height;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_core_show_window_menu (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
@@ -579,6 +607,27 @@ meta_core_set_screen_cursor (Display *xdisplay,
|
||||
meta_screen_set_cursor (window->screen, cursor);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_screen_size (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_on_screen);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_on_screen);
|
||||
|
||||
if (width)
|
||||
*width = window->screen->width;
|
||||
if (height)
|
||||
*height = window->screen->height;
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_increment_event_serial (Display *xdisplay)
|
||||
{
|
||||
|
Reference in New Issue
Block a user