summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
authorRory MacQueen <rorymacqueen@gmail.com>2015-02-13 16:54:19 -0200
committerRory MacQueen <rorymacqueen@gmail.com>2015-02-13 16:54:19 -0200
commitaae53fcb3b6d518b74c36b2fb5b24c77b8c21006 (patch)
treeaac13395ad2e1be5f94d0a9f15b472b219af583c /endless
parent26ec308fbdfe79f2f4d113e70456a079e65ae73d (diff)
parent982ae567da6e1ff8b3598453d85b0d9ec7ba5bd3 (diff)
Merge pull request #2751 from endlessm/sdk/1893
Remove clamp_allocation
Diffstat (limited to 'endless')
-rw-r--r--endless/eoswindow.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index 8b73dcc..0b39ffb 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -454,41 +454,12 @@ eos_window_finalize (GObject *object)
G_OBJECT_CLASS (eos_window_parent_class)->finalize (object);
}
-/* Clamp our size request calls so we never ask for a minimal size greater than
- the available work area. */
-static void
-clamp_allocation (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- if (gtk_widget_get_realized (widget))
- {
- GdkScreen *default_screen = gdk_screen_get_default ();
- GdkWindow *gdkwindow = gtk_widget_get_window (widget);
- int monitor = gdk_screen_get_monitor_at_window (default_screen, gdkwindow);
- GdkRectangle workarea;
- gdk_screen_get_monitor_workarea (default_screen, monitor, &workarea);
- if (allocation->width > workarea.width) {
- g_critical ("EosWindow receiving allocation %d greater than the available " \
- "workarea width %d. This probably means your minimal width request " \
- "is too big.", allocation->width, workarea.width);
- allocation->width = workarea.width;
- }
- if (allocation->height > workarea.height) {
- g_critical ("EosWindow receiving allocation %d greater than the available " \
- "workarea height %d. This probably means your minimal height request " \
- "is too big.", allocation->height, workarea.height);
- allocation->height = workarea.height;
- }
- }
-}
-
/* Updates the base font size depending on the window size. */
static void
eos_window_size_allocate (GtkWidget *window, GtkAllocation *allocation)
{
EosWindow *self = EOS_WINDOW (window);
EosWindowPrivate *priv = eos_window_get_instance_private (self);
- clamp_allocation(window, allocation);
if (priv->font_scaling_active)
{