Skip to content
Commits on Source (11)
variables:
DEBIAN_FRONTEND: noninteractive
stages:
- build
.base_build_template: &base_build
stage: build
image: ubuntu:devel
.ubuntu_deps_install_template: &ubuntu_deps_install
apt-get update &&
apt-get install -q -y --no-install-recommends
build-essential
docbook-xml
gettext
gobject-introspection
gtk-doc-tools
libgirepository1.0-dev
libglib2.0-dev
libglib2.0-doc
libgtk-3-dev
libgtk-3-doc
libstartup-notification0-dev
libx11-dev
libxext-dev
libxres-dev
meson
ninja-build
build:ubuntu:meson:
<<: *base_build
before_script:
- *ubuntu_deps_install
script:
- meson _build -Dgtk_doc=true
- ninja -C _build
==============
Version 40.1
==============
Fixes
* Revert "pager: do not change workspace size from size_allocate"
(Alberts Muktupāvels)
Translations
* Anders Jonsson (sv)
==============
Version 40.0
==============
......
......@@ -122,6 +122,8 @@ static void wnck_pager_get_preferred_height_for_width (GtkWidget *widget,
int width,
int *minimum_height,
int *natural_height);
static void wnck_pager_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean wnck_pager_draw (GtkWidget *widget,
cairo_t *cr);
static gboolean wnck_pager_button_press (GtkWidget *widget,
......@@ -247,6 +249,7 @@ wnck_pager_class_init (WnckPagerClass *klass)
widget_class->get_preferred_width_for_height = wnck_pager_get_preferred_width_for_height;
widget_class->get_preferred_height = wnck_pager_get_preferred_height;
widget_class->get_preferred_height_for_width = wnck_pager_get_preferred_height_for_width;
widget_class->size_allocate = wnck_pager_size_allocate;
widget_class->draw = wnck_pager_draw;
widget_class->button_press_event = wnck_pager_button_press;
widget_class->button_release_event = wnck_pager_button_release;
......@@ -684,6 +687,62 @@ wnck_pager_get_preferred_height_for_width (GtkWidget *widget,
*natural_height = *minimum_height = MAX (height, 0);
}
static gboolean
_wnck_pager_queue_resize (gpointer data)
{
gtk_widget_queue_resize (GTK_WIDGET (data));
return FALSE;
}
static void
wnck_pager_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
WnckPager *pager;
int workspace_size;
GtkBorder padding;
int width;
int height;
pager = WNCK_PAGER (widget);
width = allocation->width;
height = allocation->height;
_wnck_pager_get_padding (pager, &padding);
width -= padding.left + padding.right;
height -= padding.top + padding.bottom;
g_assert (pager->priv->n_rows > 0);
if (pager->priv->orientation == GTK_ORIENTATION_VERTICAL)
{
if (pager->priv->show_all_workspaces)
workspace_size = (width - (pager->priv->n_rows - 1)) / pager->priv->n_rows;
else
workspace_size = width;
}
else
{
if (pager->priv->show_all_workspaces)
workspace_size = (height - (pager->priv->n_rows - 1))/ pager->priv->n_rows;
else
workspace_size = height;
}
workspace_size = MAX (workspace_size, 1);
if (workspace_size != pager->priv->workspace_size)
{
pager->priv->workspace_size = workspace_size;
g_idle_add (_wnck_pager_queue_resize, pager);
return;
}
GTK_WIDGET_CLASS (wnck_pager_parent_class)->size_allocate (widget,
allocation);
}
static void
get_workspace_rect (WnckPager *pager,
int space,
......
/*
* Copyright (C) 2021 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef WNCK_HANDLE_PRIVATE_H
......
/*
* Copyright (C) 2021 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
......
project('libwnck',
'c',
version: '40.0',
version: '40.1',
meson_version: '>= 0.50.0')
LIBWNCK_SOVERSION = 0
......
This diff is collapsed.