[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk ef67659 045/100: Set screen/display dpi res to make broadwa
From: |
Yuuki Harano |
Subject: |
feature/pgtk ef67659 045/100: Set screen/display dpi res to make broadway work as expected |
Date: |
Tue, 24 Nov 2020 08:02:34 -0500 (EST) |
branch: feature/pgtk
commit ef67659e985dcc31a48cfb3c5eefcf4d9f6aee6e
Author: Jeff Walsh <jewalsh@redhat.com>
Commit: Jeff Walsh <jeff.walsh@drtusers-MacBook-Pro.local>
Set screen/display dpi res to make broadway work as expected
* src/pgtkterm.c (pgtk_initialize_display_info)
(window_state_event, pgtk_term_init):
* src/gtkutil.c (xg_create_frame_widgets):
* src/pgtkterm.c (pgtk_initialize_display_info)
(window_state_event, pgtk_term_init):
* src/ftcrfont.c (ftcrfont_open):
---
src/ftcrfont.c | 2 ++
src/gtkutil.c | 1 -
src/pgtkfns.c | 4 ++--
src/pgtkterm.c | 14 ++++++++++----
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 8fffb33..5bae8da 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -136,7 +136,9 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int
pixel_size)
filename = XCAR (val);
size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
if (size == 0)
+ {
size = pixel_size;
+ }
block_input ();
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 6573205..4bd803c 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1377,7 +1377,6 @@ xg_create_frame_widgets (struct frame *f)
wtop = gtk_window_new (type);
#ifdef HAVE_PGTK
gtk_widget_add_events(wtop, GDK_ALL_EVENTS_MASK);
- gtk_window_set_hide_titlebar_when_maximized(GTK_WINDOW(wtop), TRUE);
#endif
/* gtk_window_set_has_resize_grip is a Gtk+ 3.0 function but Ubuntu
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index e7ab208..69a7430 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -3160,7 +3160,7 @@ When using Gtk+ tooltips, the tooltip face is not used.
*/);
}
-
+#ifdef PGTK_DEBUG
#include <stdarg.h>
#include <time.h>
void pgtk_log(const char *file, int lineno, const char *fmt, ...)
@@ -3181,7 +3181,7 @@ void pgtk_log(const char *file, int lineno, const char
*fmt, ...)
va_end(ap);
fputc('\n', stderr);
}
-#ifdef PGTK_DEBUG
+
void pgtk_backtrace(const char *file, int lineno)
{
Lisp_Object bt = make_uninit_vector(10);
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index d7ac68c..0ab86b7 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -828,8 +828,8 @@ pgtk_initialize_display_info (struct pgtk_display_info
*dpyinfo)
Initialize global info and storage for display.
--------------------------------------------------------------------------
*/
{
- dpyinfo->resx = 72.27; /* used 75.0, but this makes pt == pixel, expected
*/
- dpyinfo->resy = 72.27;
+ dpyinfo->resx = 96;
+ dpyinfo->resy = 96;
dpyinfo->color_p = 1;
dpyinfo->n_planes = 32;
dpyinfo->root_window = 42; /* a placeholder.. */
@@ -5401,7 +5401,7 @@ static gboolean window_state_event(GtkWidget *widget,
GdkEvent *event, gpointer
if (inev.ie.kind != NO_EVENT)
evq_enqueue(&inev);
- return TRUE;
+ return FALSE;
}
static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer
*user_data)
@@ -6297,7 +6297,13 @@ pgtk_term_init (Lisp_Object display_name, char
*resource_name)
{
GdkScreen *gscr = gdk_display_get_default_screen(dpyinfo->gdpy);
- gdouble dpi = gdk_screen_get_resolution(gscr);
+
+ GSettings *set = g_settings_new("org.gnome.desktop.interface");
+ gdouble x = g_settings_get_double(set,"text-scaling-factor");
+ gdouble dpi = 0;
+
+ dpi = 96.0 * x;
+ gdk_screen_set_resolution(gscr, dpi);
dpyinfo->resx = dpi;
dpyinfo->resy = dpi;
}
- feature/pgtk bfbcb11 026/100: implement set-tool-bar-position and set-sticky, (continued)
- feature/pgtk bfbcb11 026/100: implement set-tool-bar-position and set-sticky, Yuuki Harano, 2020/11/24
- feature/pgtk af5b725 061/100: * src/pgtkmenu.c: change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk e649275 058/100: * src/pgtkterm.c: change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk de7b0da 049/100: use pgtk_menu_set_in_use., Yuuki Harano, 2020/11/24
- feature/pgtk af1e279 073/100: Restore support for terminal only emacs in PGTK (add --with-pgtk), Yuuki Harano, 2020/11/24
- feature/pgtk 8669feb 054/100: Make icons and titles work like on X, Yuuki Harano, 2020/11/24
- feature/pgtk 20dbd4e 069/100: Change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk 9e56fa9 034/100: Support focus on click event, Yuuki Harano, 2020/11/24
- feature/pgtk 385e85c 038/100: End Resize flickering by copying surface rather than just clearing, Yuuki Harano, 2020/11/24
- feature/pgtk cbd28cd 046/100: improve code readability., Yuuki Harano, 2020/11/24
- feature/pgtk ef67659 045/100: Set screen/display dpi res to make broadway work as expected,
Yuuki Harano <=
- feature/pgtk d109dab 059/100: * src/pgtkfns.c: change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk 9eb35f9 033/100: experimental support of tab-bar., Yuuki Harano, 2020/11/24
- feature/pgtk 25cf592 067/100: Change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk e7190d8 075/100: Fix non-English layout does not work, Yuuki Harano, 2020/11/24
- feature/pgtk 28073ba 083/100: Re-implement childframe with emacsgtkfixed, Yuuki Harano, 2020/11/24
- feature/pgtk 6c43496 074/100: Fix font lock is not applied on continued lines, Yuuki Harano, 2020/11/24
- feature/pgtk 9704e23 081/100: Enable GtkIMContext by default, Yuuki Harano, 2020/11/24
- feature/pgtk b60d4c9 086/100: Fix crash on creating child frames., Yuuki Harano, 2020/11/24
- feature/pgtk b1b7440 098/100: Work around gtk_im_context_filter_keypress() issue with super key, Yuuki Harano, 2020/11/24
- feature/pgtk 992ef48 041/100: update redisplay_interface., Yuuki Harano, 2020/11/24