10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #include <stdlib.h>
27
28 #include "glass_screen.h"
29 #include "glass_general.h"
30 #include "glass_wrapper.h"
31
32 #include <X11/Xatom.h>
33 #include <gdk/gdk.h>
34 #include <gdk/gdkx.h>
35
36 jfloat OverrideUIScale = -1.0f;
37
38 static guint get_current_desktop(GdkScreen *screen) {
39 Display* display = gdk_x11_display_get_xdisplay(gdk_display_get_default());
40 Atom currentDesktopAtom = XInternAtom(display, "_NET_CURRENT_DESKTOP", True);
41 guint ret = 0;
42
43 Atom type;
44 int format;
45 gulong num, left;
46 unsigned long *data = NULL;
47
48 if (currentDesktopAtom == None) {
49 return 0;
50 }
|
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #include <stdlib.h>
27
28 #include "glass_screen.h"
29 #include "glass_general.h"
30
31 #include <X11/Xatom.h>
32 #include <gdk/gdk.h>
33 #include <gdk/gdkx.h>
34
35 jfloat OverrideUIScale = -1.0f;
36
37 static guint get_current_desktop(GdkScreen *screen) {
38 Display* display = gdk_x11_display_get_xdisplay(gdk_display_get_default());
39 Atom currentDesktopAtom = XInternAtom(display, "_NET_CURRENT_DESKTOP", True);
40 guint ret = 0;
41
42 Atom type;
43 int format;
44 gulong num, left;
45 unsigned long *data = NULL;
46
47 if (currentDesktopAtom == None) {
48 return 0;
49 }
|