@@ -14,6 +14,8 @@ public class Gala.ScreenshotManager : Object {
1414 public WindowManager wm { get ; construct; }
1515 [DBus (visible = false )]
1616 public NotificationsManager notifications_manager { get ; construct; }
17+ [DBus (visible = false )]
18+ public FilterManager filter_manager { get ; construct; }
1719
1820 private bool ? _is_redacted_font_available = null ;
1921 private bool is_redacted_font_available {
@@ -45,8 +47,8 @@ public class Gala.ScreenshotManager : Object {
4547 private string prev_font_mono;
4648 private uint conceal_timeout;
4749
48- public ScreenshotManager (WindowManager wm , NotificationsManager notifications_manager ) {
49- Object (wm: wm, notifications_manager: notifications_manager);
50+ public ScreenshotManager (WindowManager wm , NotificationsManager notifications_manager , FilterManager filter_manager ) {
51+ Object (wm: wm, notifications_manager: notifications_manager, filter_manager : filter_manager );
5052 }
5153
5254 construct {
@@ -266,8 +268,13 @@ public class Gala.ScreenshotManager : Object {
266268 int width, height;
267269 display. get_size (out width, out height);
268270
271+ filter_manager. pause_for_screenshot = true ;
272+
273+ yield wait_stage_repaint ();
274+
269275 var image = take_screenshot (0 , 0 , width, height, include_cursor);
270276 unconceal_text ();
277+ filter_manager. pause_for_screenshot = false ;
271278
272279 if (flash) {
273280 flash_area (0 , 0 , width, height);
@@ -288,10 +295,13 @@ public class Gala.ScreenshotManager : Object {
288295 public async void screenshot_area_with_cursor (int x , int y , int width , int height , bool include_cursor , bool flash , string filename , out bool success , out string filename_used ) throws DBusError , IOError {
289296 debug (" Taking area screenshot" );
290297
298+ filter_manager. pause_for_screenshot = true ;
299+
291300 yield wait_stage_repaint ();
292301
293302 var image = take_screenshot (x, y, width, height, include_cursor);
294303 unconceal_text ();
304+ filter_manager. pause_for_screenshot = false ;
295305
296306 if (flash) {
297307 flash_area (x, y, width, height);
0 commit comments