qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs display.h qe.c x11.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs display.h qe.c x11.c
Date: Sun, 21 May 2017 04:10:38 -0400 (EDT)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        17/05/21 04:10:37

Modified files:
        .              : display.h qe.c x11.c 

Log message:
        x11: fix toggle-full-screen (bound to C-c f)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/display.h?cvsroot=qemacs&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.287&r2=1.288
http://cvs.savannah.gnu.org/viewcvs/qemacs/x11.c?cvsroot=qemacs&r1=1.55&r2=1.56

Patches:
Index: display.h
===================================================================
RCS file: /sources/qemacs/qemacs/display.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- display.h   15 May 2017 09:44:21 -0000      1.24
+++ display.h   21 May 2017 08:10:37 -0000      1.25
@@ -256,12 +256,6 @@
         s->dpy.dpy_bmp_unlock(s, bitmap);
 }
 
-static inline void dpy_full_screen(QEditScreen *s, int full_screen)
-{
-    if (s->dpy.dpy_full_screen)
-        s->dpy.dpy_full_screen(s, full_screen);
-}
-
 static inline void dpy_describe(QEditScreen *s, EditBuffer *b)
 {
     if (s->dpy.dpy_describe)

Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.287
retrieving revision 1.288
diff -u -b -r1.287 -r1.288
--- qe.c        18 May 2017 14:14:28 -0000      1.287
+++ qe.c        21 May 2017 08:10:37 -0000      1.288
@@ -3097,16 +3097,20 @@
     }
 }
 
-/* NOTE: toggle-full-screen also hide the modeline of the current
-   window and the status line */
+/* NOTE: toggle-full-screen zooms the current pane to the whole screen if
+   possible. It does not hide the modeline not the status line */
 void do_toggle_full_screen(EditState *s)
 {
     QEmacsState *qs = s->qe_state;
     QEditScreen *screen = s->screen;
 
+    if (screen->dpy.dpy_full_screen) {
     qs->is_full_screen = !qs->is_full_screen;
-    dpy_full_screen(screen, qs->is_full_screen);
+        screen->dpy.dpy_full_screen(screen, qs->is_full_screen);
     do_refresh(s);
+    } else {
+        put_status(s, "full screen unsupported on this device");
+    }
 }
 
 void do_toggle_mode_line(EditState *s)

Index: x11.c
===================================================================
RCS file: /sources/qemacs/qemacs/x11.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- x11.c       15 May 2017 09:44:21 -0000      1.55
+++ x11.c       21 May 2017 08:10:37 -0000      1.56
@@ -1074,7 +1074,7 @@
 
     XGetWindowAttributes(xs->display, xs->window, &attr1);
     if (full_screen) {
-        if ((attr1.width != xs->screen_width || attr1.height != 
xs->screen_height)) {
+        if (attr1.width != xs->screen_width || attr1.height != 
xs->screen_height) {
             /* store current window position and size */
             XTranslateCoordinates(xs->display, xs->window, attr1.root, 0, 0,
                                   &xs->last_window_x, &xs->last_window_y, 
&win);
@@ -1083,8 +1083,8 @@
             XMoveResizeWindow(xs->display, xs->window,
                               0, 0, xs->screen_width, xs->screen_height);
         }
-    } else if (!full_screen) {
-        if (attr1.width == xs->screen_width && attr1.height == 
xs->screen_height) {
+    } else {
+        if (xs->last_window_width) {
             XMoveResizeWindow(xs->display, xs->window,
                               xs->last_window_x, xs->last_window_y,
                               xs->last_window_width, xs->last_window_height);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]