~ubuntu-branches/ubuntu/trusty/fluxbox/trusty-proposed

« back to all changes in this revision

Viewing changes to src/Screen.hh

  • Committer: Package Import Robot
  • Author(s): Paul Tagliamonte
  • Date: 2010-08-12 21:16:02 UTC
  • mfrom: (0.1.1) (1.1.10)
  • Revision ID: package-import@ubuntu.com-20100812211602-3tsmzl9in5nmwz7z
Tags: 1.1.1+git20100807.0cc08f9-1
* debian/ dir has been cleaned out, complete repackage
  of most files.
* pulled new archive from git.fluxbox.org HEAD, saved as
  tar.gz.
* Added in fluxbox.* files from the old dfsg tree.
* Added in system.fluxbox-menu file from the old dfsg tree
* Added the source/format file to bump package source
  version from 1.0 to 3.0 (quilt). 
* Changed rules file to match the old dfsg setup so that
  fluxbox behaves nicely.
* Removed entries from copyright that no longer apply.
* Added theme based on Denis Brand ( naran )'s old theme.
* Added a background I whipped up.
* Changed compile flags to point to debian theme by default
* Adding a patch to have fluxbox use x-terminal-emulator
  over xterm. Closes: #591694 (LP: #580485)
* Adding a patch to allow titlebar-window dragging.
* Changed the flags in rules to pull from a script. This script
  lets us un-hardcode what theme is default. Be sure there
  is a theme pack!
* Added comments to my patches.
* Removing debian/docs, empty file.
* Fixing fluxbox.desktop to remove all the warnings from
  desktop-file-validate
* Fixing libtool issue by running an update before
  configure in the rules script.
* Added a compile flag script to auto-detect what platform
  we are running on, and apply the correct theme. This
  should solve Ubuntnu issues later on.
* adding in a get-orig-source rule
* fixing the upstream version number to pinpoint
  the commit ( thanks, lfaraone ).
* adding a rule for get-orig-source. ( thanks again,
  lfaraone ).
* Updated rules to actually allow us to do a build from it
* Removed Denis from the uploaders ( as per an email
  conversation )
* Removing madduck from the uploaders ( thanks for asking,
  lfaraone. ). Thanks for your hard work, madduck.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "FbTk/MultLayers.hh"
40
40
#include "FbTk/NotCopyable.hh"
41
41
#include "FbTk/Observer.hh"
 
42
#include "FbTk/Signal.hh"
42
43
 
43
44
#include <X11/Xresource.h>
44
45
 
84
85
class BScreen: public FbTk::EventHandler, public FbTk::Observer,
85
86
               private FbTk::NotCopyable {
86
87
public:
87
 
    /// a window becomes active / focussed on a different workspace
88
 
    enum FollowModel {
89
 
        IGNORE_OTHER_WORKSPACES = 0, ///< who cares?
90
 
        FOLLOW_ACTIVE_WINDOW,     ///< go to that workspace
91
 
        SEMIFOLLOW_ACTIVE_WINDOW, ///< fetch iconified windows, else follow
92
 
        FETCH_ACTIVE_WINDOW       ///< put that window to the current workspace
93
 
    };
94
 
 
95
 
 
96
88
    typedef std::list<FluxboxWindow *> Icons;
97
89
 
98
90
    typedef std::vector<Workspace *> Workspaces;
134
126
    FbWinFrame::TabPlacement getTabPlacement() const { return *resource.tab_placement; }
135
127
 
136
128
    unsigned int noFocusWhileTypingDelay() const { return *resource.typing_delay; }
137
 
    FollowModel getFollowModel() const { return *resource.follow_model; }
138
 
    FollowModel getUserFollowModel() const { return *resource.user_follow_model; }
139
129
    const bool allowRemoteActions() const { return *resource.allow_remote_actions; }
140
130
    const bool clientMenuUsePixmap() const { return *resource.clientmenu_use_pixmap; }
141
131
    const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; }
208
198
       @name Screen signals
209
199
    */
210
200
    //@{
 
201
    typedef FbTk::Signal<void, BScreen&> ScreenSignal;
211
202
    /// client list signal
212
 
    FbTk::Subject &clientListSig() { return m_clientlist_sig; }
 
203
    ScreenSignal &clientListSig() { return m_clientlist_sig; }
213
204
    /// icon list sig
214
 
    FbTk::Subject &iconListSig() { return m_iconlist_sig; }
 
205
    ScreenSignal &iconListSig() { return m_iconlist_sig; }
215
206
    /// workspace count signal
216
 
    FbTk::Subject &workspaceCountSig() { return m_workspacecount_sig; }
 
207
    ScreenSignal &workspaceCountSig() { return m_workspacecount_sig; }
217
208
    /// workspace names signal
218
 
    FbTk::Subject &workspaceNamesSig() { return m_workspacenames_sig; }
 
209
    ScreenSignal &workspaceNamesSig() { return m_workspacenames_sig; }
219
210
    /// workspace area signal
220
 
    FbTk::Subject &workspaceAreaSig() { return m_workspace_area_sig; }
 
211
    ScreenSignal &workspaceAreaSig() { return m_workspace_area_sig; }
221
212
    /// current workspace signal
222
 
    FbTk::Subject &currentWorkspaceSig() { return m_currentworkspace_sig; }
 
213
    ScreenSignal &currentWorkspaceSig() { return m_currentworkspace_sig; }
223
214
    /// focused window signal
224
 
    FbTk::Subject &focusedWindowSig() { return m_focusedwindow_sig; }
 
215
    FbTk::Signal<void, BScreen&, FluxboxWindow*, WinClient*> &focusedWindowSig() { return m_focusedwindow_sig; }
225
216
    /// reconfigure signal
226
217
    FbTk::Subject &reconfigureSig() { return m_reconfigure_sig; }
227
 
    FbTk::Subject &resizeSig() { return m_resize_sig; }
228
 
    FbTk::Subject &bgChangeSig() { return m_bg_change_sig; }
 
218
    ScreenSignal &resizeSig() { return m_resize_sig; }
 
219
    ScreenSignal &bgChangeSig() { return m_bg_change_sig; }
229
220
    //@}
230
221
 
231
222
    /// called when the screen receives a signal from a subject
235
226
    void keyPressEvent(XKeyEvent &ke);
236
227
    void keyReleaseEvent(XKeyEvent &ke);
237
228
    void buttonPressEvent(XButtonEvent &be);
238
 
    void notifyUngrabKeyboard();
239
229
 
240
230
    /**
241
231
     * Cycles focus of windows
245
235
     */
246
236
    void cycleFocus(int opts = 0, const ClientPattern *pat = 0, bool reverse = false);
247
237
 
 
238
    bool isCycling() const { return m_cycling; }
 
239
 
248
240
    /**
249
241
     * Creates an empty menu with specified label
250
242
     * @param label for the menu
490
482
 
491
483
    const Strut* availableWorkspaceArea(int head) const;
492
484
 
493
 
    ScreenSubject
494
 
    m_clientlist_sig,  ///< client signal
495
 
        m_iconlist_sig, ///< notify if a window gets iconified/deiconified
496
 
        m_workspacecount_sig, ///< workspace count signal
497
 
        m_workspacenames_sig, ///< workspace names signal
498
 
        m_workspace_area_sig, ///< workspace area changed signal
499
 
        m_currentworkspace_sig, ///< current workspace signal
500
 
        m_focusedwindow_sig, ///< focused window signal
501
 
        m_reconfigure_sig, ///< reconfigure signal
502
 
        m_resize_sig, ///< resize signal
503
 
        m_bg_change_sig; ///< background change signal
 
485
    ScreenSubject m_reconfigure_sig; ///< reconfigure signal
 
486
 
 
487
 
 
488
    FbTk::Signal<void, BScreen&, FluxboxWindow*, WinClient*> m_focusedwindow_sig;  ///< focused window signal
 
489
    ScreenSignal m_resize_sig; ///< resize signal
 
490
    ScreenSignal m_workspace_area_sig; ///< workspace area changed signal
 
491
    ScreenSignal m_iconlist_sig; ///< notify if a window gets iconified/deiconified
 
492
    ScreenSignal m_clientlist_sig;  ///< client signal
 
493
    ScreenSignal m_bg_change_sig; ///< background change signal
 
494
    ScreenSignal m_workspacecount_sig; ///< workspace count signal
 
495
    ScreenSignal m_currentworkspace_sig; ///< current workspace signal
 
496
    ScreenSignal m_workspacenames_sig; ///< workspace names signal
504
497
 
505
498
    FbTk::MultLayers m_layermanager;
506
499
 
548
541
            max_ignore_inc, max_disable_move, max_disable_resize,
549
542
            workspace_warping, show_window_pos, auto_raise, click_raises;
550
543
        FbTk::Resource<std::string> default_deco;
551
 
        FbTk::Resource<std::string> rootcommand;
552
544
        FbTk::Resource<FbWinFrame::TabPlacement> tab_placement;
553
545
        FbTk::Resource<std::string> windowmenufile;
554
546
        FbTk::Resource<unsigned int> typing_delay;
555
 
        FbTk::Resource<FollowModel> follow_model, user_follow_model;
556
547
        FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha,
557
 
            unfocused_alpha, menu_alpha, menu_delay, menu_delay_close,
 
548
            unfocused_alpha, menu_alpha, menu_delay,
558
549
            tab_width, tooltip_delay;
559
 
        FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode;
560
 
 
561
 
        FbTk::Resource<int> gc_line_width;
562
 
        FbTk::Resource<FbTk::GContext::LineStyle> gc_line_style;
563
 
        FbTk::Resource<FbTk::GContext::JoinStyle> gc_join_style;
564
 
        FbTk::Resource<FbTk::GContext::CapStyle>  gc_cap_style;
565
550
        FbTk::Resource<bool> allow_remote_actions;
566
551
        FbTk::Resource<bool> clientmenu_use_pixmap;
567
552
        FbTk::Resource<bool> tabs_use_pixmap;