~donadigo/wingpanel-indicator-notifications/notification-open-app

« back to all changes in this revision

Viewing changes to src/Widgets/NotificationEntry.vala

  • Committer: donadigos159 at gmail
  • Date: 2016-06-20 15:00:26 UTC
  • Revision ID: donadigos159@gmail.com-20160620150026-ny0auyhzmg5qtn3n
General code improvements; if notification clicked and does not have a default action, focus the app instead

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        }
62
62
    }
63
63
 
 
64
    public Wnck.Window? get_app_window () {
 
65
        Wnck.Window? window = null;
 
66
        Wnck.Screen.get_default ().get_windows ().@foreach ((_window) => {
 
67
            if (_window.get_pid () == notification.pid) {
 
68
                window = _window;
 
69
                return;
 
70
            }
 
71
        });
 
72
 
 
73
        return window;        
 
74
    }
 
75
 
64
76
    private void add_widgets () {
65
77
        var grid = new Gtk.Grid ();
66
78
        grid.margin_start = 40;