/[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 3065 by capela, Mon Jan 2 12:11:50 2017 UTC revision 3465 by capela, Mon Feb 11 16:51:26 2019 UTC
# Line 1  Line 1 
1  // qsampler.cpp  // qsampler.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2017, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2019, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007,2008,2015 Christian Schoenebeck     Copyright (C) 2007,2008,2015 Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
# Line 41  Line 41 
41  #define CONFIG_DATADIR  CONFIG_PREFIX "/share"  #define CONFIG_DATADIR  CONFIG_PREFIX "/share"
42  #endif  #endif
43    
44  #if WIN32  #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
45  #define RELATIVE_LOCALE_DIR "/share/locale"  #define RELATIVE_LOCALE_DIR "/share/locale"
46  #elif defined(__APPLE__)  #elif defined(__APPLE__)
47  #define RELATIVE_LOCALE_DIR "/../Resources"  #define RELATIVE_LOCALE_DIR "/../Resources"
# Line 168  public: Line 168  public:
168                  }                  }
169          #ifdef CONFIG_X11          #ifdef CONFIG_X11
170          #ifdef CONFIG_XUNIQUE          #ifdef CONFIG_XUNIQUE
171                  // Instance uniqueness initialization...                  m_pDisplay = NULL;
172                  m_pDisplay = QX11Info::display();                  m_aUnique = 0;
173                  m_aUnique  = XInternAtom(m_pDisplay, QSAMPLER_XUNIQUE, false);                  m_wOwner = 0;
                 XGrabServer(m_pDisplay);  
                 m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique);  
                 XUngrabServer(m_pDisplay);  
174          #if QT_VERSION >= 0x050100          #if QT_VERSION >= 0x050100
175                  m_pXcbEventFilter = new qsamplerXcbEventFilter(this);                  m_pXcbEventFilter = new qsamplerXcbEventFilter(this);
176                  installNativeEventFilter(m_pXcbEventFilter);                  installNativeEventFilter(m_pXcbEventFilter);
177                    if (QX11Info::isPlatformX11()) {
178            #endif
179                            // Instance uniqueness initialization...
180                            m_pDisplay = QX11Info::display();
181                            m_aUnique  = XInternAtom(m_pDisplay, QSAMPLER_XUNIQUE, false);
182                            XGrabServer(m_pDisplay);
183                            m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique);
184                            XUngrabServer(m_pDisplay);
185            #if QT_VERSION >= 0x050100
186                    }
187          #endif          #endif
188          #endif  // CONFIG_XUNIQUE          #endif  // CONFIG_XUNIQUE
189          #endif  // CONFIG_X11          #endif  // CONFIG_X11
# Line 428  int main ( int argc, char **argv ) Line 435  int main ( int argc, char **argv )
435  #endif  #endif
436  #endif  #endif
437          qsamplerApplication app(argc, argv);          qsamplerApplication app(argc, argv);
438    #if QT_VERSION >= 0x050600
439            app.setAttribute(Qt::AA_EnableHighDpiScaling);
440    #endif
441          #if defined(__APPLE__)  //  Toshi Nagata 20080105          #if defined(__APPLE__)  //  Toshi Nagata 20080105
442          {          {
443                  //  Set the plugin path to @exetutable_path/../plugins                  //  Set the plugin path to @exetutable_path/../plugins

Legend:
Removed from v.3065  
changed lines
  Added in v.3465

  ViewVC Help
Powered by ViewVC