They're 0, 0, 100, 100 always, so just use those values everywhere.
g_assert (GDK_IS_MACOS_DISPLAY (self));
g_assert (!parent || GDK_IS_MACOS_SURFACE (parent));
- surface = _gdk_macos_surface_new (self, surface_type, parent, 0, 0, 100, 100);
+ surface = _gdk_macos_surface_new (self, surface_type, parent);
if (surface != NULL)
_gdk_macos_display_surface_added (self, surface);
GType _gdk_macos_popup_surface_get_type (void);
GdkMacosSurface *_gdk_macos_popup_surface_new (GdkMacosDisplay *display,
GdkSurface *parent,
- GdkFrameClock *frame_clock,
- int x,
- int y,
- int width,
- int height);
+ GdkFrameClock *frame_clock);
void _gdk_macos_popup_surface_attach_to_parent (GdkMacosPopupSurface *self);
void _gdk_macos_popup_surface_detach_from_parent (GdkMacosPopupSurface *self);
void _gdk_macos_popup_surface_reposition (GdkMacosPopupSurface *self);
GdkMacosSurface *
_gdk_macos_popup_surface_new (GdkMacosDisplay *display,
GdkSurface *parent,
- GdkFrameClock *frame_clock,
- int x,
- int y,
- int width,
- int height)
+ GdkFrameClock *frame_clock)
{
GDK_BEGIN_MACOS_ALLOC_POOL;
style_mask = NSWindowStyleMaskBorderless;
- _gdk_macos_display_to_display_coords (display, x, y, &nx, &ny);
+ _gdk_macos_display_to_display_coords (display, 0, 0, &nx, &ny);
screen = _gdk_macos_display_get_screen_at_display_coords (display, nx, ny);
screen_rect = [screen frame];
nx -= screen_rect.origin.x;
ny -= screen_rect.origin.y;
- content_rect = NSMakeRect (nx, ny - height, width, height);
+ content_rect = NSMakeRect (nx, ny - 100, 100, 100);
window = [[GdkMacosWindow alloc] initWithContentRect:content_rect
styleMask:style_mask
GdkMacosSurface *_gdk_macos_surface_new (GdkMacosDisplay *display,
GdkSurfaceType surface_type,
- GdkSurface *parent,
- int x,
- int y,
- int width,
- int height);
+ GdkSurface *parent);
NSWindow *_gdk_macos_surface_get_native (GdkMacosSurface *self);
CGDirectDisplayID _gdk_macos_surface_get_screen_id (GdkMacosSurface *self);
const char *_gdk_macos_surface_get_title (GdkMacosSurface *self);
switch (surface_type)
{
case GDK_SURFACE_TOPLEVEL:
- ret = _gdk_macos_toplevel_surface_new (display, frame_clock, x, y, width, height);
+ ret = _gdk_macos_toplevel_surface_new (display, frame_clock);
break;
case GDK_SURFACE_POPUP:
- ret = _gdk_macos_popup_surface_new (display, parent, frame_clock, x, y, width, height);
+ ret = _gdk_macos_popup_surface_new (display, parent, frame_clock);
break;
case GDK_SURFACE_DRAG:
};
GType _gdk_macos_toplevel_surface_get_type (void);
-GdkMacosSurface *_gdk_macos_toplevel_surface_new (GdkMacosDisplay *display,
- GdkFrameClock *frame_clock,
- int x,
- int y,
- int width,
- int height);
+GdkMacosSurface *_gdk_macos_toplevel_surface_new (GdkMacosDisplay *display,
+ GdkFrameClock *frame_clock);
void _gdk_macos_toplevel_surface_attach_to_parent (GdkMacosToplevelSurface *self);
void _gdk_macos_toplevel_surface_detach_from_parent (GdkMacosToplevelSurface *self);
GdkMacosSurface *
_gdk_macos_toplevel_surface_new (GdkMacosDisplay *display,
- GdkFrameClock *frame_clock,
- int x,
- int y,
- int width,
- int height)
+ GdkFrameClock *frame_clock)
{
GDK_BEGIN_MACOS_ALLOC_POOL;
NSWindowStyleMaskMiniaturizable |
NSWindowStyleMaskResizable);
- _gdk_macos_display_to_display_coords (display, x, y + height, &nx, &ny);
+ _gdk_macos_display_to_display_coords (display, 0, 100, &nx, &ny);
screen = _gdk_macos_display_get_screen_at_display_coords (display, nx, ny);
visible_frame = [screen visibleFrame];
- content_rect = NSMakeRect (nx - visible_frame.origin.x, ny - visible_frame.origin.y, width, height);
+ content_rect = NSMakeRect (nx - visible_frame.origin.x, ny - visible_frame.origin.y, 100, 100);
window = [[GdkMacosWindow alloc] initWithContentRect:content_rect
styleMask:style_mask
backing:NSBackingStoreBuffered