/[svn]/qsampler/trunk/src/qsampler.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsampler.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2998 by capela, Mon Sep 26 09:37:11 2016 UTC revision 3001 by capela, Sat Oct 8 22:08:39 2016 UTC
# Line 203  public: Line 203  public:
203                  m_pWidget = pWidget;                  m_pWidget = pWidget;
204          #ifdef CONFIG_X11          #ifdef CONFIG_X11
205          #ifdef CONFIG_XUNIQUE          #ifdef CONFIG_XUNIQUE
                 XGrabServer(m_pDisplay);  
206                  m_wOwner = m_pWidget->winId();                  m_wOwner = m_pWidget->winId();
207                  XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime);                  if (m_pDisplay && m_wOwner) {
208                  XUngrabServer(m_pDisplay);                          XGrabServer(m_pDisplay);
209                            XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime);
210                            XUngrabServer(m_pDisplay);
211                    }
212          #endif  // CONFIG_XUNIQUE          #endif  // CONFIG_XUNIQUE
213          #endif  // CONFIG_X11          #endif  // CONFIG_X11
214          }          }
# Line 219  public: Line 221  public:
221          {          {
222          #ifdef CONFIG_X11          #ifdef CONFIG_X11
223          #ifdef CONFIG_XUNIQUE          #ifdef CONFIG_XUNIQUE
224                  if (m_wOwner != None) {                  if (m_pDisplay && m_wOwner != None) {
225                          // First, notify any freedesktop.org WM                          // First, notify any freedesktop.org WM
226                          // that we're about to show the main widget...                          // that we're about to show the main widget...
227                          Screen *pScreen = XDefaultScreenOfDisplay(m_pDisplay);                          Screen *pScreen = XDefaultScreenOfDisplay(m_pDisplay);
# Line 264  public: Line 266  public:
266  #ifdef CONFIG_XUNIQUE  #ifdef CONFIG_XUNIQUE
267          void x11PropertyNotify(Window w)          void x11PropertyNotify(Window w)
268          {          {
269                  if (m_pWidget && m_wOwner == w) {                  if (m_pDisplay && m_pWidget && m_wOwner == w) {
270                          // Always check whether our property-flag is still around...                          // Always check whether our property-flag is still around...
271                          Atom aType;                          Atom aType;
272                          int iFormat = 0;                          int iFormat = 0;

Legend:
Removed from v.2998  
changed lines
  Added in v.3001

  ViewVC Help
Powered by ViewVC