mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-31 10:46:16 +00:00
x11/wf-shell: drop gtkmm workaround after 8e3dc93add
This commit is contained in:
parent
4ee0563f5b
commit
60a8a08888
@ -1,6 +1,7 @@
|
||||
PORTNAME= wf-shell
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.7.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
|
@ -1,79 +0,0 @@
|
||||
Revert https://github.com/WayfireWM/wf-shell/commit/6e3ac5da8d24
|
||||
until x11-toolkits/gtkmm30 is updated to 3.24 or later.
|
||||
|
||||
../src/background/background.cpp:33:35: error: no member named 'create_surface_from_pixbuf' in namespace 'Gdk::Cairo'
|
||||
to_image.source = Gdk::Cairo::create_surface_from_pixbuf(image,
|
||||
~~~~~~~~~~~~^
|
||||
|
||||
--- src/background/background.cpp.orig 2020-03-21 19:18:51 UTC
|
||||
+++ src/background/background.cpp
|
||||
@@ -21,19 +21,17 @@ void BackgroundDrawingArea::show_image(Glib::RefPtr<Gd
|
||||
{
|
||||
if (!image)
|
||||
{
|
||||
- to_image.source.clear();
|
||||
- from_image.source.clear();
|
||||
+ to_image.pbuf.clear();
|
||||
+ from_image.pbuf.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
from_image = to_image;
|
||||
- to_image.source = Gdk::Cairo::create_surface_from_pixbuf(image,
|
||||
- this->get_scale_factor());
|
||||
+ to_image.pbuf = image;
|
||||
+ to_image.x = offset_x;
|
||||
+ to_image.y = offset_y;
|
||||
+ fade.animate(from_image.pbuf ? 0.0 : 1.0, 1.0);
|
||||
|
||||
- to_image.x = offset_x / this->get_scale_factor();
|
||||
- to_image.y = offset_y / this->get_scale_factor();
|
||||
- fade.animate(from_image.source ? 0.0 : 1.0, 1.0);
|
||||
-
|
||||
Glib::signal_idle().connect_once([=] () {
|
||||
this->queue_draw();
|
||||
});
|
||||
@@ -41,19 +39,25 @@ void BackgroundDrawingArea::show_image(Glib::RefPtr<Gd
|
||||
|
||||
bool BackgroundDrawingArea::on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
|
||||
{
|
||||
- if (!to_image.source)
|
||||
+ if (!to_image.pbuf)
|
||||
return false;
|
||||
|
||||
if (fade.running())
|
||||
queue_draw();
|
||||
|
||||
- cr->set_source(to_image.source, to_image.x, to_image.y);
|
||||
+ Gdk::Cairo::set_source_pixbuf(cr, to_image.pbuf, to_image.x, to_image.y);
|
||||
+ cr->rectangle(0, 0, to_image.pbuf->get_width(), to_image.pbuf->get_height());
|
||||
cr->paint_with_alpha(fade);
|
||||
- if (!from_image.source)
|
||||
+
|
||||
+ if (!from_image.pbuf)
|
||||
return false;
|
||||
|
||||
- cr->set_source(from_image.source, from_image.x, from_image.y);
|
||||
+ Gdk::Cairo::set_source_pixbuf(cr, from_image.pbuf,
|
||||
+ from_image.x, from_image.y);
|
||||
+ cr->rectangle(0, 0, from_image.pbuf->get_width(),
|
||||
+ from_image.pbuf->get_height());
|
||||
cr->paint_with_alpha(1.0 - fade);
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
--- src/background/background.hpp.orig 2020-03-21 19:18:51 UTC
|
||||
+++ src/background/background.hpp
|
||||
@@ -11,9 +11,9 @@ class WayfireBackground;
|
||||
|
||||
class BackgroundImage
|
||||
{
|
||||
- public:
|
||||
+ public:
|
||||
double x, y;
|
||||
- Cairo::RefPtr<Cairo::Surface> source;
|
||||
+ Glib::RefPtr<Gdk::Pixbuf> pbuf;
|
||||
};
|
||||
|
||||
class BackgroundDrawingArea : public Gtk::DrawingArea
|
Loading…
Reference in New Issue
Block a user