Compare commits

...

18 Commits
3.8.7 ... 3.8.9

Author SHA1 Message Date
Matthias Clasen
aeddd3e48b 3.8.9 2014-01-27 15:18:10 -05:00
Ignacio Casal Quinteiro
4a42503509 win32: handle again gtk-font-name
This code is ugly but it seems to do the work
2014-01-27 09:45:28 +01:00
Ignacio Casal Quinteiro
87eae26934 win32: scale slider with marks was off by 2 pixels 2014-01-27 09:40:21 +01:00
Ignacio Casal Quinteiro
799d1f7adb win32: actually match the separator 2014-01-24 21:59:46 +01:00
Ignacio Casal Quinteiro
9fde11c4c1 win32: set color for scale marks 2014-01-24 21:55:00 +01:00
Ignacio Casal Quinteiro
5c25c0ad9a win32: add margin to scale trough 2014-01-24 21:54:56 +01:00
Ignacio Casal Quinteiro
40b3e69a09 win32: add more width to the slider to not cut it when using marks 2014-01-24 21:54:46 +01:00
Chun-wei Fan
dcec13444f gtk.vcxprojin: Fix Missing Semicolon 2013-12-30 12:33:22 +08:00
Benjamin Otte
5ea59fb1dd configure: Bump micro_version
This was apparently forgotten in commit f5fb6db1e
2013-12-13 16:59:09 +01:00
Carlos Garnacho
26fa630c65 x11: Handle XINotifyPassiveGrab/Ungrab in focus events
The focus handling code is shared between core and XI2 implementations,
so just handle the extra XI2 types for passive grabs. Those must be dealt
with in the same way than active grabs. Focus events with this crossing
mode could happen currently through the XIGrabFocusIn passive grab.

https://bugzilla.gnome.org/show_bug.cgi?id=719762
2013-12-04 21:45:34 -05:00
Carlos Garnacho
860d987001 x11: Handle all XI2 crossing mode values in switch
This fixes potential assertions if a GTK+ app gets to receive
a XINotifyPassiveGrab/Ungrab pointer crossing event, currently
triggerable by XIGrabEnter passive grabs.

http://bugzilla.gnome.org/show_bug.cgi?id=719762
2013-12-04 21:45:25 -05:00
Chun-wei Fan
27b5e17404 build/win32/vs*/README.txt: Re-word a bit
Use PATH rather than path to make things clearer
2013-11-29 10:10:34 +08:00
Chun-wei Fan
e071a0c117 Visual C++ Projects: Add rules to generate GTK DBus sources
Since commit c66f194d the gtkdbusgenerated.[c|h] are not included in the
dist tarball and thus have to be generated, which broke the Visual C++
builds.

This patch adds custom build rules for the Visual C++ projects so that
gtkdbusgenerated.[c|h] will be generated upon building the GTK+ DLL
sources, so that the build will be fixed.

This also tells people building GTK+ from the projects that they need
to have Python 2/3 installed and the Python interpretor needs to be in
their PATH before building GTK+ from the projects.
2013-11-29 10:10:13 +08:00
Matthias Clasen
f5fb6db1e3 Bump version 2013-11-26 21:06:00 -05:00
Matthias Clasen
09ed01e8a7 3.8.8 2013-11-26 20:47:50 -05:00
Marek Kasik
9feda1c92c printing: Fix memory leak when listing Avahi printers
Return values of g_variant_get_child_value() were not unreffed
correctly together with one value returned by g_variant_get().
Use g_variant_get_data() instead of copying each byte separately.

https://bugzilla.gnome.org/show_bug.cgi?id=712799
2013-11-26 14:23:44 +01:00
Carlos Garnacho
0f02cd2bcb x11: Unset GdkX11DeviceXI2 scroll valuators on device change
Scroll valuators were being just appended again and again, leading
to 1) a growing memory issue anytime a device changed 2) the first
scroll valuators to stay permanent on the application lifetime, as
the first stored valuators would always match.

https://bugzilla.gnome.org/show_bug.cgi?id=705203
2013-11-25 17:54:07 +01:00
Carlos Garnacho
a20e7634b6 x11: keep track of the screen pixel size by calculating the bounding box of monitors
This is so we always have the latest information given by XRandR (or other), and not
rely on Core protocol information that might not have been updated yet.

This is specially visible when a monitor is connected (less frequent) or disconnected
(much more frequent), callbacks on GdkScreen::monitors-changed that call
gdk_screen_get_width/height() could get the screen size previous to the monitor
rearrangement.

So in order to fix this, keep track of the latest monitors information, and calculate
the bounding box in order to know the screen size.

https://bugzilla.gnome.org/show_bug.cgi?id=715029
2013-11-25 17:44:16 +01:00
18 changed files with 221 additions and 58 deletions

22
NEWS
View File

@@ -1,3 +1,25 @@
Overview of Changes in GTK+ 3.8.9
=================================
* Bugs fixed:
719762 translate_crossing_mode() assertion error sinc...
win32: add more width to the slider to not cut...
win32: add margin to scale trough
win32: set color for scale marks
win32: actually match the separator
win32: scale slider with marks was off by 2 pixels
win32: handle again gtk-font-name
Overview of Changes in GTK+ 3.8.8
=================================
* Bugs fixed:
705203 Natural scroll doesn't work immediately
712799 Memory leak when listing Avahi printers
715029 Ensure GdkScreen::monitors-changed gets emitted...
Overview of Changes in GTK+ 3.8.7
=================================

View File

@@ -20,6 +20,11 @@ ATK and GLib. External dependencies are at least Cairo
gettext-runtime, fontconfig*, freetype*, expat*. See the
build/win32/vs10/README.txt file in glib for details where to unpack them.
You will also need a Python 2.x/3.x interpretor installed on your system,
which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe)
needs to be in your PATH before attempting the build of GTK+.
It is recommended that one builds the dependencies with VS10 as far as
possible, especially those from and using the GTK+ stack (i.e. GLib,
Cairo, ATK, Pango, GDK-Pixbuf), so that crashes caused by mixing calls

View File

@@ -2,9 +2,9 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="UserMacros">
<VSVer>10</VSVer>
<GlibEtcInstallRoot>..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
<GlibEtcInstallRoot>$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
<GlibEtcInstallRootFromBuildWin32>..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRootFromBuildWin32>
<CopyDir>$(GlibEtcInstallRoot)</CopyDir>
<CopyDir>..\..\..\..\vs$(VSVer)\$(Platform)</CopyDir>
<DefDir>$(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)</DefDir>
<ApiVersion>3.0</ApiVersion>
<GtkBinaryVersion>3.0.0</GtkBinaryVersion>
@@ -710,6 +710,13 @@ cd vs$(VSVer)
</DoGenGir>
<GtkGenerateGdkDef>echo EXPORTS &gt;"$(DefDir)\gdk.def" &amp;&amp; cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols &gt;&gt;"$(DefDir)\gdk.def"</GtkGenerateGdkDef>
<GtkGenerateGtkDef>echo EXPORTS &gt;"$(DefDir)\gtk.def" &amp;&amp; cl /EP -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols &gt;&gt;"$(DefDir)\gtk.def"</GtkGenerateGtkDef>
<GenerateGtkDbusBuiltSources>
cd ..\..\..\gtk
python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml
cd $(SolutionDir)
</GenerateGtkDbusBuiltSources>
<GtkLibtoolCompatibleDllPrefix>lib</GtkLibtoolCompatibleDllPrefix>
<GtkLibtoolCompatibleDllSuffix>-$(ApiVersion)-0</GtkLibtoolCompatibleDllSuffix>
<GtkSeparateVSDllPrefix />
@@ -795,6 +802,9 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h
<BuildMacro Include="GtkGenerateGtkDef">
<Value>$(GtkGenerateGtkDef)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkDbusBuiltSources">
<Value>$(GenerateGtkDbusBuiltSources)</Value>
</BuildMacro>
<BuildMacro Include="GtkLibtoolCompatibleDllPrefix">
<Value>$(GtkLibtoolCompatibleDllPrefix)</Value>
</BuildMacro>

View File

@@ -36,8 +36,7 @@
<ClCompile Include="..\..\..\modules\input\thai-charprop.c"><Filter>Source Files</Filter></ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gdk\gtk.symbols">
<Filter>Resource Files</Filter>
</CustomBuild>
<CustomBuild Include="..\..\..\gdk\gtk.symbols"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
</Project>

View File

@@ -177,6 +177,20 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkGenerateGtkDef)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)gtk.def;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc" />
@@ -212,4 +226,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -19,6 +19,11 @@ ATK and GLib. External dependencies are at least Cairo
gettext-runtime, fontconfig*, freetype*, expat*. See the
build/win32/vs9/README.txt file in glib for details where to unpack them.
You will also need a Python 2.x/3.x interpretor installed on your system,
which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe)
needs to be in your PATH before attempting the build of GTK+.
It is recommended that one builds the dependencies with VS9 as far as
possible, especially those from and using the GTK+ stack (i.e. GLib,
Cairo, ATK, Pango, GDK-Pixbuf), so that crashes caused by mixing calls

View File

@@ -33,7 +33,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
/>
<UserMacro
Name="GlibEtcInstallRoot"
Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
Value="$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(PlatformName)"
/>
<UserMacro
Name="GlibEtcInstallRootFromBuildWin32"
@@ -41,7 +41,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
/>
<UserMacro
Name="CopyDir"
Value="$(GlibEtcInstallRoot)"
Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
/>
<UserMacro
Name="ApiVersion"
@@ -445,6 +445,14 @@ cd vs$(VSVer)&#x0D;&#x0A;
Name="GtkGenerateGtkDef"
Value="echo EXPORTS &gt;&quot;$(IntDir)\gtk.def&quot; &amp;&amp; cl /EP -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols &gt;&gt;&quot;$(IntDir)\gtk.def&quot;"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSources"
Value="
cd ..\..\..\gtk&#x0D;&#x0A;
python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
"
/>
<UserMacro
Name="GtkLibtoolCompatibleDllPrefix"
Value="lib"

View File

@@ -210,6 +210,36 @@
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\gtkdbusinterfaces.xml">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
</Filter>
<Filter

View File

@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [8])
m4_define([gtk_micro_version], [7])
m4_define([gtk_interface_age], [7])
m4_define([gtk_micro_version], [9])
m4_define([gtk_interface_age], [9])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],

View File

@@ -406,7 +406,6 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
g_value_set_boolean (value, TRUE);
return TRUE;
}
#if 0
/*
* With 'MS Sans Serif' as windows menu font (default on win98se) you'll get a
* bunch of :
@@ -423,7 +422,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
/* Pango finally uses GetDeviceCaps to scale, we use simple
* approximation here.
*/
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? -3*ncm.lfMenuFont.lfHeight/4 : 10);
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? - 3 * ncm.lfMenuFont.lfHeight / 4 : 10);
if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision)
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
name, ncm.lfMenuFont.lfFaceName));
@@ -431,7 +430,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
/* Avoid issues like those described in bug #135098 */
g_utf8_validate (ncm.lfMenuFont.lfFaceName, -1, NULL))
{
char* s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
char *s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : %s\n", name, s));
g_value_set_string (value, s);
@@ -440,7 +439,6 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
}
}
}
#endif
return FALSE;
}

View File

@@ -859,6 +859,14 @@ _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device)
}
}
void
_gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device)
{
if (device->scroll_valuators->len > 0)
g_array_remove_range (device->scroll_valuators, 0,
device->scroll_valuators->len);
}
gint
_gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device)
{

View File

@@ -838,6 +838,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
*/
if (toplevel->has_pointer &&
mode != NotifyGrab &&
#ifdef XINPUT_2
mode != XINotifyPassiveGrab &&
mode != XINotifyPassiveUngrab &&
#endif /* XINPUT_2 */
mode != NotifyUngrab)
toplevel->has_pointer_focus = (focus_in) ? FALSE : TRUE;
@@ -845,6 +849,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
case NotifyNonlinear:
case NotifyNonlinearVirtual:
if (mode != NotifyGrab &&
#ifdef XINPUT_2
mode != XINotifyPassiveGrab &&
mode != XINotifyPassiveUngrab &&
#endif /* XINPUT_2 */
mode != NotifyUngrab)
toplevel->has_focus_window = (focus_in) ? TRUE : FALSE;
/* We pretend that the focus moves to the grab
@@ -860,6 +868,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
* grab is in effect
*/
if (mode != NotifyGrab &&
#ifdef XINPUT_2
mode != XINotifyPassiveGrab &&
mode != XINotifyPassiveUngrab &&
#endif /* XINPUT_2 */
mode != NotifyUngrab)
toplevel->has_pointer_focus = (focus_in) ? TRUE : FALSE;
break;

View File

@@ -765,6 +765,7 @@ handle_device_changed (GdkX11DeviceManagerXI2 *device_manager,
if (device)
{
_gdk_device_reset_axes (device);
_gdk_device_xi2_unset_scroll_valuators ((GdkX11DeviceXI2 *) device);
translate_device_classes (display, device, ev->classes, ev->num_classes);
g_signal_emit_by_name (G_OBJECT (device), "changed");
@@ -779,12 +780,16 @@ translate_crossing_mode (gint mode)
{
switch (mode)
{
case NotifyNormal:
case XINotifyNormal:
return GDK_CROSSING_NORMAL;
case NotifyGrab:
case XINotifyGrab:
case XINotifyPassiveGrab:
return GDK_CROSSING_GRAB;
case NotifyUngrab:
case XINotifyUngrab:
case XINotifyPassiveUngrab:
return GDK_CROSSING_UNGRAB;
case XINotifyWhileGrabbed:
/* Fall through, unexpected in pointer crossing events */
default:
g_assert_not_reached ();
}

View File

@@ -230,6 +230,8 @@ guint _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
XIButtonState *buttons_state,
XIGroupState *group_state);
gint _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device);
void _gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device);
GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *device_manager_xi2,
gint device_id);

View File

@@ -96,13 +96,13 @@ gdk_x11_screen_get_display (GdkScreen *screen)
static gint
gdk_x11_screen_get_width (GdkScreen *screen)
{
return WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen);
return GDK_X11_SCREEN (screen)->width;
}
static gint
gdk_x11_screen_get_height (GdkScreen *screen)
{
return HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen);
return GDK_X11_SCREEN (screen)->height;
}
static gint
@@ -895,8 +895,8 @@ _gdk_x11_screen_get_edge_monitors (GdkScreen *screen,
gint *right)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
gint top_most_pos = HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen);
gint left_most_pos = WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen);
gint top_most_pos = x11_screen->height;
gint left_most_pos = x11_screen->width;
gint bottom_most_pos = 0;
gint right_most_pos = 0;
gint monitor_num;
@@ -1025,6 +1025,30 @@ init_multihead (GdkScreen *screen)
HeightOfScreen (x11_screen->xscreen));
}
static void
update_bounding_box (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
gint i, x1, y1, x2, y2;
x1 = y1 = G_MAXINT;
x2 = y2 = G_MININT;
for (i = 0; i < x11_screen->n_monitors; i++)
{
GdkX11Monitor *monitor;
monitor = &x11_screen->monitors[i];
x1 = MIN (x1, monitor->geometry.x);
y1 = MIN (y1, monitor->geometry.y);
x2 = MAX (x2, monitor->geometry.x + monitor->geometry.width);
y2 = MAX (y2, monitor->geometry.y + monitor->geometry.height);
}
x11_screen->width = x2 - x1;
x11_screen->height = y2 - y1;
}
GdkScreen *
_gdk_x11_screen_new (GdkDisplay *display,
gint screen_number)
@@ -1050,7 +1074,8 @@ _gdk_x11_screen_new (GdkDisplay *display,
_gdk_x11_screen_init_visuals (screen);
_gdk_x11_screen_init_root_window (screen);
update_bounding_box (screen);
return screen;
}
@@ -1122,11 +1147,13 @@ process_monitors_change (GdkScreen *screen)
x11_screen->monitors, x11_screen->n_monitors) ||
x11_screen->primary_monitor != primary_monitor;
free_monitors (monitors, n_monitors);
if (changed)
g_signal_emit_by_name (screen, "monitors-changed");
{
update_bounding_box (screen);
g_signal_emit_by_name (screen, "monitors-changed");
}
}
void

View File

@@ -47,6 +47,9 @@ struct _GdkX11Screen
GdkX11Monitor *monitors;
gint primary_monitor;
gint width;
gint height;
/* Xft resources for the display, used for default values for
* the Xft/ XSETTINGS
*/

View File

@@ -432,19 +432,26 @@ GtkButton.check:active:prelight {
.scale {
background-color: transparent;
-GtkScale-value-spacing: 0;
-GtkScale-slider-length: 9;
-GtkScale-slider-length: 12;
-GtkRange-slider-width: 20;
-GtkRange-trough-border: 0;
}
.scale.trough {
margin: 8px 0;
border-style: none;
border-width: 0;
background-image: -gtk-win32-theme-part(trackbar, 1 1, margins (2 0 2 0));
background-image: -gtk-win32-theme-part(trackbar, 1 1);
}
.scale.trough.vertical {
background-image: -gtk-win32-theme-part(trackbar, 1 1, margins (0 2 0 2));
margin: 0 8px;
background-image: -gtk-win32-theme-part(trackbar, 1 1);
}
.scale.mark.separator {
/* defines the color of the actuall marks on the scale */
color: shade(@bg_color, 0.6);
}
.scale.slider {
@@ -493,89 +500,89 @@ GtkButton.check:active:prelight {
}
.scale.slider.scale-has-marks-below {
background-image: -gtk-win32-theme-part(trackbar, 4 1);
background-image: -gtk-win32-theme-part(trackbar, 4 1, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-below:prelight {
background-image: -gtk-win32-theme-part(trackbar, 4 2);
background-image: -gtk-win32-theme-part(trackbar, 4 2, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-below:active,
.scale.slider.scale-has-marks-below:prelight:active {
background-image: -gtk-win32-theme-part(trackbar, 4 3);
background-image: -gtk-win32-theme-part(trackbar, 4 3, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-below:focus {
background-image: -gtk-win32-theme-part(trackbar, 4 4);
background-image: -gtk-win32-theme-part(trackbar, 4 4, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-below:insensitive {
background-image: -gtk-win32-theme-part(trackbar, 4 5);
background-image: -gtk-win32-theme-part(trackbar, 4 5, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-below.vertical {
background-image: -gtk-win32-theme-part(trackbar, 8 1);
background-image: -gtk-win32-theme-part(trackbar, 8 1, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-below.vertical:prelight {
background-image: -gtk-win32-theme-part(trackbar, 8 2);
background-image: -gtk-win32-theme-part(trackbar, 8 2, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-below.vertical:active,
.scale.slider.scale-has-marks-below.vertical:prelight:active {
background-image: -gtk-win32-theme-part(trackbar, 8 3);
background-image: -gtk-win32-theme-part(trackbar, 8 3, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-below.vertical:focus {
background-image: -gtk-win32-theme-part(trackbar, 8 4);
background-image: -gtk-win32-theme-part(trackbar, 8 4, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-below.vertical:insensitive {
background-image: -gtk-win32-theme-part(trackbar, 8 5);
background-image: -gtk-win32-theme-part(trackbar, 8 5, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-above {
background-image: -gtk-win32-theme-part(trackbar, 5 1);
background-image: -gtk-win32-theme-part(trackbar, 5 1, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-above:prelight {
background-image: -gtk-win32-theme-part(trackbar, 5 2);
background-image: -gtk-win32-theme-part(trackbar, 5 2, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-above:active,
.scale.slider.scale-has-marks-above:prelight:active {
background-image: -gtk-win32-theme-part(trackbar, 5 3);
background-image: -gtk-win32-theme-part(trackbar, 5 3, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-above:focus {
background-image: -gtk-win32-theme-part(trackbar, 5 4);
background-image: -gtk-win32-theme-part(trackbar, 5 4, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-above:insensitive {
background-image: -gtk-win32-theme-part(trackbar, 5 5);
background-image: -gtk-win32-theme-part(trackbar, 5 5, margins(0 -2 0 0));
}
.scale.slider.scale-has-marks-above.vertical {
background-image: -gtk-win32-theme-part(trackbar, 7 1);
background-image: -gtk-win32-theme-part(trackbar, 7 1, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-above.vertical:prelight {
background-image: -gtk-win32-theme-part(trackbar, 7 2);
background-image: -gtk-win32-theme-part(trackbar, 7 2, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-above.vertical:active,
.scale.slider.scale-has-marks-above.vertical:prelight:active {
background-image: -gtk-win32-theme-part(trackbar, 7 3);
background-image: -gtk-win32-theme-part(trackbar, 7 3, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-above.vertical:focus {
background-image: -gtk-win32-theme-part(trackbar, 7 4);
background-image: -gtk-win32-theme-part(trackbar, 7 4, margins(0 0 -2 0));
}
.scale.slider.scale-has-marks-above.vertical:insensitive {
background-image: -gtk-win32-theme-part(trackbar, 7 5);
background-image: -gtk-win32-theme-part(trackbar, 7 5, margins(0 0 -2 0));
}
/* Progress bars */

View File

@@ -2626,10 +2626,11 @@ avahi_service_resolver_cb (GObject *source_object,
GError *error = NULL;
gchar *suffix = NULL;
gchar *tmp;
gsize length;
gint interface;
gint protocol;
gint aprotocol;
gint i, j;
gint i;
output = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object),
res,
@@ -2655,20 +2656,26 @@ avahi_service_resolver_cb (GObject *source_object,
{
child = g_variant_get_child_value (txt, i);
tmp = g_new0 (gchar, g_variant_n_children (child) + 1);
for (j = 0; j < g_variant_n_children (child); j++)
length = g_variant_get_size (child);
if (length > 0)
{
tmp[j] = g_variant_get_byte (g_variant_get_child_value (child, j));
}
tmp = g_strndup (g_variant_get_data (child), length);
g_variant_unref (child);
if (g_str_has_prefix (tmp, "rp="))
{
suffix = g_strdup (tmp + 3);
g_free (tmp);
break;
}
if (g_str_has_prefix (tmp, "rp="))
{
suffix = g_strdup (tmp + 3);
g_free (tmp);
break;
}
g_free (tmp);
else
{
g_variant_unref (child);
}
}
if (suffix)
@@ -2702,6 +2709,7 @@ avahi_service_resolver_cb (GObject *source_object,
g_free (suffix);
}
g_variant_unref (txt);
g_variant_unref (output);
}
else