[gnome-games/wip/exalm/gtk4: 18/34] ui: Replace GdkWindow with GdkSurface
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/gtk4: 18/34] ui: Replace GdkWindow with GdkSurface
- Date: Wed, 12 Sep 2018 11:55:40 +0000 (UTC)
commit 9c8cabef32047e56536961c4780c1e8959c3c956
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sun Jul 29 01:16:22 2018 +0500
ui: Replace GdkWindow with GdkSurface
src/ui/application-window.vala | 6 +++---
src/ui/display-box.vala | 14 +++++++-------
src/ui/game-thumbnail.vala | 8 ++++----
3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index acc276fd..c2e69af3 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -505,11 +505,11 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
if (display == null)
return null;
- var window = get_window ();
- if (window == null)
+ var surface = get_surface ();
+ if (surface == null)
return null;
- var monitor = display.get_monitor_at_window (window);
+ var monitor = display.get_monitor_at_surface (surface);
if (monitor == null)
return null;
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index b7b562a4..4bef1774 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -115,20 +115,20 @@ private class Games.DisplayBox : Gtk.Bin {
}
private void show_cursor (bool show) {
- var window = get_window ();
- if (window == null)
+ var surface = get_surface ();
+ if (surface == null)
return;
- if ((show && window.cursor == null) ||
- (!show && window.cursor != null))
+ if ((show && surface.cursor == null) ||
+ (!show && surface.cursor != null))
return;
if (!show) {
- var display = window.get_display ();
- window.cursor = new Gdk.Cursor.for_display (display, Gdk.CursorType.BLANK_CURSOR);
+ var display = surface.get_display ();
+ surface.cursor = new Gdk.Cursor.for_display (display, Gdk.CursorType.BLANK_CURSOR);
}
else
- window.cursor = null;
+ surface.cursor = null;
}
private void set_display (Gtk.Widget display) {
diff --git a/src/ui/game-thumbnail.vala b/src/ui/game-thumbnail.vala
index f72d8902..cb71c83e 100644
--- a/src/ui/game-thumbnail.vala
+++ b/src/ui/game-thumbnail.vala
@@ -60,7 +60,7 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
public struct DrawingContext {
Cairo.Context cr;
- Gdk.Window? window;
+ Gdk.Surface? surface;
Gtk.StyleContext style;
Gtk.StateFlags state;
int width;
@@ -72,14 +72,14 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
}
public override bool draw (Cairo.Context cr) {
- var window = get_window ();
+ var surface = get_surface ();
var style = get_style_context ();
var state = get_state_flags ();
var width = get_allocated_width ();
var height = get_allocated_height ();
DrawingContext context = {
- cr, window, style, state, width, height
+ cr, surface, style, state, width, height
};
if (icon == null)
@@ -289,7 +289,7 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
}
private void draw_pixbuf (DrawingContext context, Gdk.Pixbuf pixbuf) {
- var surface = Gdk.cairo_surface_create_from_pixbuf (pixbuf, 1, context.window);
+ var surface = Gdk.cairo_surface_create_from_pixbuf (pixbuf, 1, context.surface);
var mask = get_mask (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]